[U-Boot] [PATCH] mmc: Cosmetic fix for nicer, aligned device list printout

Pantelis Antoniou panto at antoniou-consulting.com
Fri Dec 12 19:27:17 CET 2014


Hi Lubomic,

> On Nov 11, 2014, at 12:25 , Lubomir Popov <lpopov at mm-sol.com> wrote:
> 
> 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 at ti.com>
> ---
> drivers/mmc/mmc.c |    7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
> index 44a4feb..e0ea833 100644
> --- a/drivers/mmc/mmc.c
> +++ b/drivers/mmc/mmc.c
> @@ -1401,8 +1401,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");
> -- 
> 1.7.9.5
> 

Applied, thanks

— Pantelis



More information about the U-Boot mailing list