diff options
author | Lubomir Popov <lpopov@mm-sol.com> | 2014-11-11 10:25:42 (GMT) |
---|---|---|
committer | Pantelis Antoniou <pantelis.antoniou@konsulko.com> | 2014-12-12 18:08:47 (GMT) |
commit | e75eaf100bdf01b94757e2b40365b46a7d380275 (patch) | |
tree | 5e295fa7d09dec1b5f4a5a3203566ffa83b9c3cf /drivers/mmc | |
parent | fc9b0b80435cda721fbdbe507c9e4f388b0ea62b (diff) | |
download | u-boot-e75eaf100bdf01b94757e2b40365b46a7d380275.tar.xz |
mmc: Cosmetic fix for nicer, aligned device list printout
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>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/mmc.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 8436bc7..9dc924c 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -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"); |