From patchwork Tue Jan 23 20:16:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 125576 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1983829ljf; Tue, 23 Jan 2018 12:23:04 -0800 (PST) X-Google-Smtp-Source: AH8x227iJTp90S8iCq1gFSwsO34iH0N6qdi7tw5qCeXvkYECIWZTn9lUC2B5CjqLA1s4ZRnM5Jry X-Received: by 10.80.202.193 with SMTP id f1mr21422755edi.30.1516738984006; Tue, 23 Jan 2018 12:23:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516738983; cv=none; d=google.com; s=arc-20160816; b=d933nw6rKq+t86WlYYS4gH0VszLU9pjuX4fyT5CI2DLb4DCoW+RAeIEKof2+Ys8x8l bz+b+VtEArLVUq+MsJY4YQRQtSuWdtnvnrzRdu9c2HTReBoRbVhWU/KOo5EiluE3dPH7 ERoWL3I81WAtFZxXw8AkzbEHdchJZIkbiUcgl+rsGwbL9/LHErV7CckQSIabbRUVTJcA 0MrdLcWfYAozBaEfB5vgAg9pwe/LxMfAP/oEF86qEMSL4sqsuaYURXCEYwytz5MBSWGL g37EYDbsoHCskrVPTCfqnbEAf9+COKrHuTe34O2cRSuTwRKoAZDS6uxhX4ghdWJOsRWe IO1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:references :in-reply-to:message-id:date:to:from:arc-authentication-results; bh=iRCC2lxkddvXGqNWN69MabOKcurl6zpX6gwtVm67A+4=; b=pUB8vquHl3GyRUtObXXPyXhu5qZHpcuOb7U6zY3SeBitvgCUD+V1g1T1J3X4I7OTdc gKvCbhOXe0HKkllI6M3imMFRp7K9+aXGpGNmfWSmj3DCpt3S4zQH6fThyEPpnHFq0B0k a3cjCuRZsuYcgeeQWZkXOKs8sJvnbJi4/LUWY84Ey5HEXLPV2YZ7gmlrDO4wmXWGiUGw MUdROCnW/rANrrHbIXkvSJh+waVdroezuVyGf+BVNdww0Qu4iZYIb1WHLaL3+VOKZ0PI JyeJZ5k/4L22X5ZCnhsrbraKRfwcEKwSIOcto181HW5W7xWmBeEJTKw1OCtB2wbdR2uR YERA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id f18si1445328edb.350.2018.01.23.12.23.03; Tue, 23 Jan 2018 12:23:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 8E514C2212D; Tue, 23 Jan 2018 20:18:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id DD2D9C21DA6; Tue, 23 Jan 2018 20:17:21 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 21A7AC22132; Tue, 23 Jan 2018 20:17:13 +0000 (UTC) Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by lists.denx.de (Postfix) with ESMTP id 9C17EC21E73 for ; Tue, 23 Jan 2018 20:17:09 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 7809520C56; Tue, 23 Jan 2018 21:17:09 +0100 (CET) Received: from localhost (LFbn-1-2035-97.w90-76.abo.wanadoo.fr [90.76.104.97]) by mail.free-electrons.com (Postfix) with ESMTPSA id 4B564207A8; Tue, 23 Jan 2018 21:17:09 +0100 (CET) From: Maxime Ripard To: Tom Rini Date: Tue, 23 Jan 2018 21:16:55 +0100 Message-Id: <2be71a7b8fdf51572b9264358733235936f5aebd.1516723179.git-series.maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: In-Reply-To: References: Cc: Andre Przywara , agraf@suse.de, u-boot@lists.denx.de, Maxime Ripard , Jagan Teki Subject: [U-Boot] [PATCH v3 06/15] env: fat: Make the debug messages play a little nicer X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Since we have global messages to indicate what's going on, the custom messages in the environment drivers only make the output less readable. Make FAT play a little nicer by removing all the extra \n and formatting that is redundant with the global output. Reviewed-by: Andre Przywara Signed-off-by: Maxime Ripard --- env/fat.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/env/fat.c b/env/fat.c index ec49c3905369..158a9a34357b 100644 --- a/env/fat.c +++ b/env/fat.c @@ -55,7 +55,11 @@ static int env_fat_save(void) dev = dev_desc->devnum; if (fat_set_blk_dev(dev_desc, &info) != 0) { - printf("\n** Unable to use %s %d:%d for saveenv **\n", + /* + * This printf is embedded in the messages from env_save that + * will calling it. The missing \n is intentional. + */ + printf("Unable to use %s %d:%d... ", CONFIG_ENV_FAT_INTERFACE, dev, part); return 1; } @@ -63,12 +67,15 @@ static int env_fat_save(void) err = file_fat_write(CONFIG_ENV_FAT_FILE, (void *)&env_new, 0, sizeof(env_t), &size); if (err == -1) { - printf("\n** Unable to write \"%s\" from %s%d:%d **\n", + /* + * This printf is embedded in the messages from env_save that + * will calling it. The missing \n is intentional. + */ + printf("Unable to write \"%s\" from %s%d:%d... ", CONFIG_ENV_FAT_FILE, CONFIG_ENV_FAT_INTERFACE, dev, part); return 1; } - puts("done\n"); return 0; } #endif /* CMD_SAVEENV */ @@ -90,14 +97,22 @@ static int env_fat_load(void) dev = dev_desc->devnum; if (fat_set_blk_dev(dev_desc, &info) != 0) { - printf("\n** Unable to use %s %d:%d for loading the env **\n", + /* + * This printf is embedded in the messages from env_save that + * will calling it. The missing \n is intentional. + */ + printf("Unable to use %s %d:%d... ", CONFIG_ENV_FAT_INTERFACE, dev, part); goto err_env_relocate; } err = file_fat_read(CONFIG_ENV_FAT_FILE, buf, CONFIG_ENV_SIZE); if (err == -1) { - printf("\n** Unable to read \"%s\" from %s%d:%d **\n", + /* + * This printf is embedded in the messages from env_save that + * will calling it. The missing \n is intentional. + */ + printf("Unable to read \"%s\" from %s%d:%d... ", CONFIG_ENV_FAT_FILE, CONFIG_ENV_FAT_INTERFACE, dev, part); goto err_env_relocate; }