aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2019-01-30 13:46:54 (GMT)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2019-01-30 13:46:54 (GMT)
commitf24e04a82e8ca1bf9021b74bd098789f78321bb3 (patch)
treee41f5bf1b0e85571dc50accedef65e1920dbd71f /utils
parentb519eaa4b1d46c2b965e1a9f21262409b0df94fa (diff)
v4l2-ctl: --list-devices: generate bus_info if missing
If the bus_info in media_device_info is not filled in, then generate it based on the driver name. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'utils')
-rw-r--r--utils/v4l2-ctl/v4l2-ctl-common.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/v4l2-ctl/v4l2-ctl-common.cpp b/utils/v4l2-ctl/v4l2-ctl-common.cpp
index e68114d..c660d15 100644
--- a/utils/v4l2-ctl/v4l2-ctl-common.cpp
+++ b/utils/v4l2-ctl/v4l2-ctl-common.cpp
@@ -224,7 +224,10 @@ static void list_devices()
err = ioctl(fd, MEDIA_IOC_DEVICE_INFO, &mdi);
if (!err) {
- bus_info = mdi.bus_info;
+ if (mdi.bus_info[0])
+ bus_info = mdi.bus_info;
+ else
+ bus_info = std::string("platform:") + mdi.driver;
if (mdi.model[0])
card = mdi.model;
else

Privacy Policy