mirror of
https://git.libcamera.org/libcamera/libcamera.git
synced 2025-07-17 09:25:07 +03:00
cam: fix printing of camera name
Since commitc8c546fe99
("cam: options: Add option type handling to options parser") introduced type handling for options the context the option is read became important. When reading the camera option for printing there is no explicit context to print it as a string and instead the int context was chosen resulting in: $ cam --camera foo Camera 0 not found While the expected output is: $ cam --camera foo Camera foo not found Fix this by providing the correct context for the camera option when printing it. Fixes:c8c546fe99
("cam: options: Add option type handling to options parser") Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
dd14f1ec2c
commit
71e84c22da
1 changed files with 2 additions and 1 deletions
|
@ -230,7 +230,8 @@ int main(int argc, char **argv)
|
|||
if (options.isSet(OptCamera)) {
|
||||
camera = cm->get(options[OptCamera]);
|
||||
if (!camera) {
|
||||
std::cout << "Camera " << options[OptCamera]
|
||||
std::cout << "Camera "
|
||||
<< std::string(options[OptCamera])
|
||||
<< " not found" << std::endl;
|
||||
goto out;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue