From fa46b9ec30558c5c3680b167e7a4b4966c6e9e46 Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Fri, 7 Oct 2011 18:38:08 +0300 Subject: Remove extra verbosity Remove extra verbosity by default; "-v" option brings back what used to be there. The error messages are now being printed by main.c with the possibly helpful error code attached. Signed-off-by: Sakari Ailus Acked-by: Laurent Pinchart --- src/mediactl.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'src/mediactl.c') diff --git a/src/mediactl.c b/src/mediactl.c index 43d1b6a..b9c2a10 100644 --- a/src/mediactl.c +++ b/src/mediactl.c @@ -270,7 +270,7 @@ static inline void media_udev_close(struct udev *udev) } static int media_get_devname_udev(struct udev *udev, - struct media_entity *entity, int verbose) + struct media_entity *entity) { struct udev_device *device; dev_t devnum; @@ -281,9 +281,8 @@ static int media_get_devname_udev(struct udev *udev, return -EINVAL; devnum = makedev(entity->info.v4l.major, entity->info.v4l.minor); - if (verbose) - media_dbg(entity->media, "looking up device: %u:%u\n", - major(devnum), minor(devnum)); + media_dbg(entity->media, "looking up device: %u:%u\n", + major(devnum), minor(devnum)); device = udev_device_new_from_devnum(udev, 'c', devnum); if (device) { p = udev_device_get_devnode(device); @@ -308,7 +307,7 @@ static inline int media_udev_open(struct udev **udev) { return 0; } static inline void media_udev_close(struct udev *udev) { } static inline int media_get_devname_udev(struct udev *udev, - struct media_entity *entity, int verbose) + struct media_entity *entity) { return -ENOTSUP; } @@ -351,7 +350,7 @@ static int media_get_devname_sysfs(struct media_entity *entity) return 0; } -static int media_enum_entities(struct media_device *media, int verbose) +static int media_enum_entities(struct media_device *media) { struct media_entity *entity; struct udev *udev; @@ -400,7 +399,7 @@ static int media_enum_entities(struct media_device *media, int verbose) continue; /* Try to get the device name via udev */ - if (!media_get_devname_udev(udev, entity, verbose)) + if (!media_get_devname_udev(udev, entity)) continue; /* Fall back to get the device name via sysfs */ @@ -429,7 +428,7 @@ void media_debug_set_handler(struct media_device *media, } struct media_device *media_open_debug( - const char *name, int verbose, void (*debug_handler)(void *, ...), + const char *name, void (*debug_handler)(void *, ...), void *debug_priv) { struct media_device *media; @@ -453,7 +452,7 @@ struct media_device *media_open_debug( media_dbg(media, "Enumerating entities\n"); - ret = media_enum_entities(media, verbose); + ret = media_enum_entities(media); if (ret < 0) { media_dbg(media, @@ -478,9 +477,9 @@ struct media_device *media_open_debug( return media; } -struct media_device *media_open(const char *name, int verbose) +struct media_device *media_open(const char *name) { - return media_open_debug(name, verbose, NULL, NULL); + return media_open_debug(name, NULL, NULL); } void media_close(struct media_device *media) -- cgit v1.2.3