From patchwork Tue Jan 16 09:16:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 124634 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp947563lje; Tue, 16 Jan 2018 01:20:03 -0800 (PST) X-Google-Smtp-Source: ACJfBovoP+0/71Co5YskXVtwuuBlqyNwOPjxGRkBup8NqTvTHCVTu7xKwEZGsa7hNvJTbfljYt4b X-Received: by 10.80.215.91 with SMTP id i27mr29502216edj.95.1516094403710; Tue, 16 Jan 2018 01:20:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516094403; cv=none; d=google.com; s=arc-20160816; b=pKfuHanfBmlM1oSiclzvX4gv7BpSJTct0fVM/vc5fBvQl4nUbbjontTKBS5JqAsWkd huTlkTdChVxLFvmXDuFfgu45OF+8gCsvqwd7dKt/YBCYXL+hRUFNBnKjnKd/05MnR+QB A9HPKnDBtgOX2Owksi0L4V/S/imjKJx3kprBzpEqvMGbIuYm6wEvsdxR39bde1U8RVQs e1kJiJV04LUc+ATb8J+GpyBmynIUGsosFulGwQZFas/Yh1+onQvGuBtbcl+ntAHce+z6 c2Gyp4P8SDSNO7lmi7WKZ6OYnlDy0v6gs5iMAx6308pu+0PUw10qDwso6qYtcFVBwKN1 SlSw== 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=gnxd39ysQNENRKeCOYBIaaDj8V49zAadvYKRwKB+rNLLn14vCkA5HE3HZdIE79l0vD 9XRcWGfExpBhSNMLjU7fLAlJmpNwytB+CpeHCVy0fsMlj5uwbclUJ3UG1Hk3QW6GYab/ 52gAkZXyuSHA586bTho3Zgs7cQvRNkjGd1dQw/K0hUipXWeqdC2eImh5YODv+3FXKGBx 71DOtnxOO7feiYwpQY51/u4/zBRxtqh5TUPaKPVF6KEpt1uBgX2GhooSsOHS/H6ACMqh 9m0m0UztwSq8oMyicwGTR8KxKVOwpWNdt5CSTw5+RcGOjHPFUhmRx5klBiPuPkSK7ofZ vYWg== 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 j61si1501405edc.27.2018.01.16.01.20.03; Tue, 16 Jan 2018 01:20: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 304D8C21E2C; Tue, 16 Jan 2018 09:19:26 +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 6A053C21E0A; Tue, 16 Jan 2018 09:17:11 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 0A148C21E4C; Tue, 16 Jan 2018 09:17:01 +0000 (UTC) Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by lists.denx.de (Postfix) with ESMTP id 1CAE8C21DE8 for ; Tue, 16 Jan 2018 09:16:57 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id EA1EE208BD; Tue, 16 Jan 2018 10:16:55 +0100 (CET) Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id BAFA620725; Tue, 16 Jan 2018 10:16:55 +0100 (CET) From: Maxime Ripard To: Tom Rini Date: Tue, 16 Jan 2018 10:16:42 +0100 Message-Id: <16d0c2060725654bb87a45e766b9752ef1d3b988.1516094113.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 v2 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; }