From patchwork Tue Nov 11 10:25:42 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lubomir Popov X-Patchwork-Id: 409223 X-Patchwork-Delegate: panto@antoniou-consulting.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 632A714003E for ; Tue, 11 Nov 2014 21:25:59 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A3A014B867; Tue, 11 Nov 2014 11:25:56 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DJH1lP9ebbda; Tue, 11 Nov 2014 11:25:56 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D08BB4B861; Tue, 11 Nov 2014 11:25:55 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 327304B861 for ; Tue, 11 Nov 2014 11:25:51 +0100 (CET) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kSLSbVG3Nb54 for ; Tue, 11 Nov 2014 11:25:51 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from extserv.mm-sol.com (ns.mm-sol.com [37.157.136.199]) by theia.denx.de (Postfix) with ESMTPS id 1141C4B852 for ; Tue, 11 Nov 2014 11:25:46 +0100 (CET) Received: by extserv.mm-sol.com (Postfix, from userid 33) id E5B7EBF1D; Tue, 11 Nov 2014 12:25:42 +0200 (EET) Received: from 192.91.75.29 (SquirrelMail authenticated user lpopov) by www.mm-sol.com with HTTP; Tue, 11 Nov 2014 12:25:42 +0200 Message-ID: <69bfe9497ed2561e4c54a02c8d8b1142.squirrel@www.mm-sol.com> Date: Tue, 11 Nov 2014 12:25:42 +0200 From: "Lubomir Popov" To: u-boot@lists.denx.de User-Agent: SquirrelMail/1.4.23 [SVN] MIME-Version: 1.0 X-Priority: 3 (Normal) Importance: Normal Cc: panto@antoniou-consulting.com, pantelis.antoniou@gmail.com Subject: [U-Boot] [PATCH] mmc: Cosmetic fix for nicer, aligned device list printout X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list Reply-To: lpopov@mm-sol.com List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de 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 --- 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");