Message ID | 20180720151856.23458-2-semen.protsenko@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp3093786ljj; Fri, 20 Jul 2018 08:19:38 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe34toTHKQOhfxRomHCY22f72RSqkJ1i+XsziDZG2xfDflr8QDPvL1d/iZ48LOxmbt2rH9E X-Received: by 2002:a50:ad0f:: with SMTP id y15-v6mr3089752edc.78.1532099978564; Fri, 20 Jul 2018 08:19:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532099978; cv=none; d=google.com; s=arc-20160816; b=yg5ewGPG4WjC2aFsl3rHdZJhZTSkz92hskPtFjIqzytvnTFo66gcKgpYFIBQBSBdOo PvZcCmeVPPL/FX+7ZoGIH6DPGvTW9MkS45oObR7pcADWFLvtKxPyuTMr4z6FNXmY8Lkp BQ1lFLTvFcAl8xaCr+pdipi3zBgQiSsVCyJKYCBpIr5n6V11eFURnpwFRLqXth3MzFpP YQaHaaTD1ERdFKzun9u4srjLFAoQGy+CLogk3VBvmmNzvWokgXCcOwCreMMidQR/j0DJ jizVpIIROdOX+MMdTXtjw1Nkj9ZTuP84KaOhE1Q5eWWA65PcVKRnFe+3JM3f/c7gleNb zeFg== 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:message-id :date:to:from:dkim-signature:arc-authentication-results; bh=ZvNtQR8IdekDtEbTYgC53/7IraHidDzbFRwt9T3nF/k=; b=LrDEWAimVQAg8nWED0bcMmZ3wlgXHmD0dbPw8mw/EqhANvHbevPdMkYSXpcBoVgMeE e9sgcY0yMmWPmThAN3y1nlj3gcoTKXwq4pyEmSAg2p0Rbb8gETigwjZ23JwxBhW/gmHf qQaFdDwcBs7T+zXcAsgesu6s9F5wi8zol3S4CqlkbEcJyJf5UWSdh2R60Puj4+ER6zWl wXVn1DjBPc/hMbvGV8MEf5dV/YeFIpioPINwV5Wbg6+n6Pen/dX89acBZWyUQnVYtlsw 7wP61PlUHwXDfajUAGEfRkXcOfYZAQLEj6sZntVfb/jLVUp89Nt9pi8KSaIdf+LW1vy6 DzYA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=OSEujhmm; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <u-boot-bounces@lists.denx.de> Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id g63-v6si933354ede.218.2018.07.20.08.19.38; Fri, 20 Jul 2018 08:19:38 -0700 (PDT) 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; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=OSEujhmm; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.denx.de (Postfix, from userid 105) id 1BCECC21DC1; Fri, 20 Jul 2018 15:19:20 +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=RCVD_IN_MSPIKE_H2, T_DKIM_INVALID 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 A97E6C21DFF; Fri, 20 Jul 2018 15:19:07 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 64140C21E0D; Fri, 20 Jul 2018 15:19:02 +0000 (UTC) Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) by lists.denx.de (Postfix) with ESMTPS id EB655C21CB1 for <u-boot@lists.denx.de>; Fri, 20 Jul 2018 15:19:00 +0000 (UTC) Received: by mail-lf1-f67.google.com with SMTP id l16-v6so2053663lfc.13 for <u-boot@lists.denx.de>; Fri, 20 Jul 2018 08:19:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VYCRxU+TmzFsIlj4KgwV0Ev+wUPFnTxzln6/vNxm2/s=; b=OSEujhmmywzg6JDcrBpWkslILcARmIzpC45VJLHV21IJ8SnR813xsjWORkoM3/q4wc h0K7qrgXmGz7HO3YxZIuoOkFXpXsa6dPPGsHS0Syx7+JKqhIyCH9OS34dHi2S0sPPGGB TsYU0FcjLmtENvl51BGX2dRS6UyrRl4Dfz5hs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VYCRxU+TmzFsIlj4KgwV0Ev+wUPFnTxzln6/vNxm2/s=; b=rSz91EHaGfDJEiND9qnZuyXUdxTX1Wmi/rb4IdAP9cJCCvqPQtdZ/M9nx4QEApYn2L TSpfJr+JAv9nVF4HmfxTagOm5xVW7IUx8vmf3A4di6bGbQ5PMpmNb/4kGicIdDlMQpM8 FaPdaYqqIJEYwhjMjl9ptvHxyyDsPc+nyquy8fodNiu00f2ZrilglHaUEcJhDO/5KyhT on8kVGYqldsYVTy5yMfcekZvpgFY/uEbvpPnkO/AawbbSzUiUdNS/6I8ARhH2yAGpgei pnd73oRweXNG6XX1cyKSnelouTuRmhbn5Kx1sdxBdbrIfDEK49xP2OvexLRFmOP1Wqo1 orkw== X-Gm-Message-State: AOUpUlEC0GmedCy26cRgMhs4K3O3Zf2ek0b48qUAWJsrRP6tN3naBzIo m4bSLS1GCKLdseJb8Kx2x/26YA+sXZYPJA== X-Received: by 2002:a19:9b50:: with SMTP id d77-v6mr1681330lfe.108.1532099940157; Fri, 20 Jul 2018 08:19:00 -0700 (PDT) Received: from localhost ([195.238.92.132]) by smtp.gmail.com with ESMTPSA id h40-v6sm332358lfi.84.2018.07.20.08.18.59 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Jul 2018 08:18:59 -0700 (PDT) From: Sam Protsenko <semen.protsenko@linaro.org> To: u-boot@lists.denx.de Date: Fri, 20 Jul 2018 18:18:55 +0300 Message-Id: <20180720151856.23458-2-semen.protsenko@linaro.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180720151856.23458-1-semen.protsenko@linaro.org> References: <20180720151856.23458-1-semen.protsenko@linaro.org> Cc: Maxime Ripard <maxime.ripard@bootlin.com>, Tom Rini <trini@konsulko.com> Subject: [U-Boot] [PATCH v2 1/2] env: Don't print "Failed" error message X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <http://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> |
Series |
env: Make environment loading log more clear
|
expand
|
diff --git a/env/env.c b/env/env.c index 5c0842ac07..c830001eee 100644 --- a/env/env.c +++ b/env/env.c @@ -195,14 +195,16 @@ int env_load(void) continue; printf("Loading Environment from %s... ", drv->name); + /* + * In error case, the error message must be printed during + * drv->load() in some underlying API, and it must be exactly + * one message. + */ ret = drv->load(); - if (ret) - printf("Failed (%d)\n", ret); - else + if (!ret) { printf("OK\n"); - - if (!ret) return 0; + } } return -ENODEV;
"Failed" error message from env_load() only clutters the log with unnecessary details, as we already have all needed warnings by that time. Example: Loading Environment from FAT... MMC: no card present ** Bad device mmc 0 ** Failed (-5) Remove this "Failed" message to keep log short and clear. Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org> --- Changes in v2: - Join two consecutive "if (!ret)" conditions - Add the comment with requirement for underlying API to print error message (as we don't print "Failed" message anymore) env/env.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-)