dm: Tidy up 'dm tree' output when there are many devices
[platform/kernel/u-boot.git] / drivers / core / dump.c
index 04217cb..8fbfd93 100644 (file)
@@ -16,7 +16,7 @@ static void show_devices(struct udevice *dev, int depth, int last_flag)
        struct udevice *child;
 
        /* print the first 20 characters to not break the tree-format. */
-       printf(" %-10.10s  %d  [ %c ]   %-20.20s  ", dev->uclass->uc_drv->name,
+       printf(" %-10.10s  %2d  [ %c ]   %-20.20s  ", dev->uclass->uc_drv->name,
               dev_get_uclass_index(dev, NULL),
               dev->flags & DM_FLAG_ACTIVATED ? '+' : ' ', dev->driver->name);
 
@@ -49,7 +49,7 @@ void dm_dump_all(void)
 
        root = dm_root();
        if (root) {
-               printf(" Class    index  Probed  Driver                Name\n");
+               printf(" Class     Index  Probed  Driver                Name\n");
                printf("-----------------------------------------------------------\n");
                show_devices(root, -1, 0);
        }