Message ID | 20200224193601.1040770-2-niklas.soderlund@ragnatech.se |
---|---|
State | Superseded |
Headers | show |
Series |
|
Related | show |
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@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@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)) {
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)) {
The error message for when a device name can't be resolved to an video device is wrong and applies to the next operation bellow it. Move it to it's correct location and add a new error message to highlight the resolution failure. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> --- test/camera/buffer_import.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)