[libcamera-devel] [PATCH v2 1/4] test: camera: buffer_import: Fix error messages
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Tue Feb 25 00:45:43 CET 2020
Hi Niklas,
Thank you for the patch.
On Mon, Feb 24, 2020 at 08:35:58PM +0100, Niklas Söderlund wrote:
> The error message for when a device name can't be resolved to an video
s/an video/a video/
> device is wrong and applies to the next operation bellow it. Move it to
s/bellow/below/
> it's correct location and add a new error message to highlight the
s/it's/its/
> resolution failure.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund at ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
> test/camera/buffer_import.cpp | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp
> index ab6e74bd1671e6f5..6997ea78c9f608c9 100644
> --- a/test/camera/buffer_import.cpp
> +++ b/test/camera/buffer_import.cpp
> @@ -74,13 +74,16 @@ public:
>
> video_ = V4L2VideoDevice::fromEntityName(media_.get(), videoDeviceName);
> if (!video_) {
> + std::cout << "Failed to get video device from entity "
> + << videoDeviceName << std::endl;
> + return TestFail;
> + }
> +
> + if (video_->open()) {
> std::cout << "Unable to open " << videoDeviceName << std::endl;
> return TestFail;
> }
>
> - if (video_->open())
> - return TestFail;
> -
> /* Configure the format. */
> V4L2DeviceFormat format;
> if (video_->getFormat(&format)) {
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list