]> git.sur5r.net Git - u-boot/commitdiff
mmc: Cosmetic fix for nicer, aligned device list printout
authorLubomir Popov <lpopov@mm-sol.com>
Tue, 11 Nov 2014 10:25:42 +0000 (12:25 +0200)
committerPantelis Antoniou <pantelis.antoniou@konsulko.com>
Fri, 12 Dec 2014 18:08:47 +0000 (20:08 +0200)
If print_mmc_devices() was called with a '\n' separator (as done
for example by the "mmc list" command), it offset the 2-nd and
all subsequent lines by one space. Fixing this.

Signed-off-by: Lubomir Popov <l-popov@ti.com>
drivers/mmc/mmc.c

index 8436bc7f5d3c28eaf974efe57da48ae278e867c1..9dc924c412651f8b9b270a47dcfa5b0698f4c68c 100644 (file)
@@ -1408,8 +1408,11 @@ void print_mmc_devices(char separator)
 
                printf("%s: %d", m->cfg->name, m->block_dev.dev);
 
-               if (entry->next != &mmc_devices)
-                       printf("%c ", separator);
+               if (entry->next != &mmc_devices) {
+                       printf("%c", separator);
+                       if (separator != '\n')
+                               puts (" ");
+               }
        }
 
        printf("\n");