This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:
Subject: libmediactl: don't show devnodes if NULL Author: Mauro Carvalho Chehab <[email protected]> Date: Sat Mar 5 07:16:45 2016 -0300 Sometimes, libmediactl won't be able to parse the device node. On several places, this is handled properly, but there are a couple places where it will show "(null)" if the library can't get the devnode's name. Signed-off-by: Mauro Carvalho Chehab <[email protected]> utils/media-ctl/media-ctl.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) --- http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=80250140687552c9d18b9c1398537fb193d49ffc diff --git a/utils/media-ctl/media-ctl.c b/utils/media-ctl/media-ctl.c index 3002fb7e4e12..f45ca43a74b4 100644 --- a/utils/media-ctl/media-ctl.c +++ b/utils/media-ctl/media-ctl.c @@ -351,6 +351,9 @@ static void media_print_topology_dot(struct media_device *media) unsigned int num_links = media_entity_get_links_count(entity); unsigned int npads; + if (!devname) + devname = ""; + switch (media_entity_type(entity)) { case MEDIA_ENT_T_DEVNODE: printf("\tn%08x [label=\"%s\\n%s\", shape=box, style=filled, " @@ -508,6 +511,7 @@ int main(int argc, char **argv) { struct media_device *media; int ret = -1; + const char *devname; if (parse_cmdline(argc, argv)) return EXIT_FAILURE; @@ -562,7 +566,9 @@ int main(int argc, char **argv) goto out; } - printf("%s\n", media_entity_get_devname(entity)); + devname = media_entity_get_devname(entity); + if (devname) + printf("%s\n", devname); } if (media_opts.fmt_pad) { _______________________________________________ linuxtv-commits mailing list [email protected] http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits
