[U-Boot] [RFC PATCH 08/22] dm: Use '*' to indicate a device is activated
Simon Glass
sjg at chromium.org
Sat May 24 23:21:07 CEST 2014
Make both dm enumeration commands support showing whether a driver is active
or not, and use a consistent indicator (an asterisk).
Signed-off-by: Simon Glass <sjg at chromium.org>
---
test/dm/cmd_dm.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/test/dm/cmd_dm.c b/test/dm/cmd_dm.c
index c6b2eb8..ee02314 100644
--- a/test/dm/cmd_dm.c
+++ b/test/dm/cmd_dm.c
@@ -23,9 +23,9 @@ static int display_succ(struct device *in, char *buf)
char local[16];
struct device *pos, *n, *prev = NULL;
- printf("%s- %s @ %08x", buf, in->name, (uint)map_to_sysmem(in));
- if (in->flags & DM_FLAG_ACTIVATED)
- puts(" - activated");
+ printf("%s- %c %s @ %08x", buf,
+ in->flags & DM_FLAG_ACTIVATED ? '*' : ' ',
+ in->name, (uint)map_to_sysmem(in));
puts("\n");
if (list_empty(&in->child_head))
@@ -84,8 +84,9 @@ static int do_dm_dump_uclass(cmd_tbl_t *cmdtp, int flag, int argc,
for (ret = uclass_first_device(id, &dev);
dev;
ret = uclass_next_device(&dev)) {
- printf(" %s @ %08x:\n", dev->name,
- (uint)map_to_sysmem(dev));
+ printf(" %c %s @ %08x:\n",
+ dev->flags & DM_FLAG_ACTIVATED ? '*' : ' ',
+ dev->name, (uint)map_to_sysmem(dev));
}
puts("\n");
}
--
1.9.1.423.g4596e3a
More information about the U-Boot
mailing list