diff options
author | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-02-24 19:54:38 +0100 |
---|---|---|
committer | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2020-03-06 17:45:48 +0100 |
commit | 42a00cb6172230b822f5c8a910b73e94d4be84cf (patch) | |
tree | 00ee2d4e738acb60a3242261285d01f166f362a8 /test | |
parent | a14b6baca9afe5ad15b49a3ff25b01a6f582689e (diff) |
test: camera: buffer_import: Fix error messages
The error message for when a device name can't be resolved to a video
device is wrong and applies to the next operation below it. Move it to
its correct location and add a new error message to highlight the
resolution failure.
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/camera/buffer_import.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/camera/buffer_import.cpp b/test/camera/buffer_import.cpp index ab6e74bd..6997ea78 100644 --- a/test/camera/buffer_import.cpp +++ b/test/camera/buffer_import.cpp @@ -74,12 +74,15 @@ public: video_ = V4L2VideoDevice::fromEntityName(media_.get(), videoDeviceName); if (!video_) { - std::cout << "Unable to open " << videoDeviceName << std::endl; + std::cout << "Failed to get video device from entity " + << videoDeviceName << std::endl; return TestFail; } - if (video_->open()) + if (video_->open()) { + std::cout << "Unable to open " << videoDeviceName << std::endl; return TestFail; + } /* Configure the format. */ V4L2DeviceFormat format; |