summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2010-07-02 18:16:05 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2010-07-02 18:16:05 +0200
commit40cc7566420f460d73e5750848f6925e1459f549 (patch)
treef0389b7a074c3f394973596514b8acf87b67c3c1
parenteffca90834223bd1d9542cd4f1c6fbcc6e4b3d04 (diff)
Print video device node names in dot diagrams
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-rw-r--r--media.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/media.c b/media.c
index 25e2a96..05fc76c 100644
--- a/media.c
+++ b/media.c
@@ -253,9 +253,9 @@ static void media_print_topology_dot(struct media_device *media)
switch (entity->info.type) {
case MEDIA_ENTITY_TYPE_NODE:
- printf("\tn%08x [label=\"%s\", shape=box, style=filled, "
+ printf("\tn%08x [label=\"%s\\n%s\", shape=box, style=filled, "
"fillcolor=yellow]\n",
- entity->info.id, entity->info.name);
+ entity->info.id, entity->info.name, entity->devname);
break;
case MEDIA_ENTITY_TYPE_SUBDEV:
@@ -329,7 +329,7 @@ static void media_print_topology_text(struct media_device *media)
printf("%*ctype %s subtype %s\n", padding, ' ',
media_entity_type_to_string(entity->info.type),
media_entity_subtype_to_string(entity->info.type, entity->info.subtype));
- if (entity->devname)
+ if (entity->devname[0])
printf("%*cdevice node name %s\n", padding, ' ', entity->devname);
for (j = 0; j < entity->info.pads; j++) {