[U-Boot] [PATCH] dm: core: Widen the dump tree to show more of the driver's name.

Liviu Dudau Liviu.Dudau at foss.arm.com
Mon Sep 17 16:57:34 UTC 2018


With drivers that have prefix names that are quite long (like
'versatile_') it is useful to have a wider column for the driver's
name when dumping the device driver tree.

Signed-off-by: Liviu Dudau <liviu.dudau at foss.arm.com>
---
 drivers/core/dump.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/core/dump.c b/drivers/core/dump.c
index d7cdb1475d..9d59fa90b2 100644
--- a/drivers/core/dump.c
+++ b/drivers/core/dump.c
@@ -15,8 +15,8 @@ static void show_devices(struct udevice *dev, int depth, int last_flag)
 	int i, is_last;
 	struct udevice *child;
 
-	/* print the first 11 characters to not break the tree-format. */
-	printf(" %-10.10s  %d  [ %c ]   %-10.10s  ", dev->uclass->uc_drv->name,
+	/* print the first 20 characters to not break the tree-format. */
+	printf(" %-10.10s  %d  [ %c ]   %-20.20s  ", dev->uclass->uc_drv->name,
 	       dev_get_uclass_index(dev, NULL),
 	       dev->flags & DM_FLAG_ACTIVATED ? '+' : ' ', dev->driver->name);
 
@@ -49,8 +49,8 @@ void dm_dump_all(void)
 
 	root = dm_root();
 	if (root) {
-		printf(" Class    index  Probed  Driver      Name\n");
-		printf("-----------------------------------------\n");
+		printf(" Class    index  Probed  Driver                Name\n");
+		printf("-----------------------------------------------------------\n");
 		show_devices(root, -1, 0);
 	}
 }
-- 
2.18.0



More information about the U-Boot mailing list