From patchwork Fri Dec 22 21:13:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quentin Schulz X-Patchwork-Id: 122662 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2745089qgn; Fri, 22 Dec 2017 13:17:04 -0800 (PST) X-Google-Smtp-Source: ACJfBosU8QIzkjmmwmfARcMNVgCyptUBb5ccDrC11BwbSeKq3xDZ8pT30+dzx59GXn/nUt7i1vPb X-Received: by 10.80.217.6 with SMTP id t6mr16896058edj.217.1513977424871; Fri, 22 Dec 2017 13:17:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513977424; cv=none; d=google.com; s=arc-20160816; b=o35uaz3No06JPQ0MgOxwAlVPN6HfcwlUDZCMHMdRtaJJnXOPyqi7yMLgQTfbyzbU05 3RO3JuZPK4r3W+TV4Ad9Hc/007pUwG9VoV8i5EVTCKhWR80Hpvt+B9VCYAfAbRv18Yv3 VGzOb+dF97JS/t8rc/7ThZnx9b5YosgOhiQt58HGEODG3AYvBR63hGnxNH2ZN4lM7N/W Pc7iatJYNZWmJUcGXwq2eqHcckVK645TYcamTPLefyfXBgk3mottEEunqGaLrxe0xw8C o6blmst67hH+8xQ8hAY18M5zeeSJ877X28sNh9EYt3k9E6B7Kvob542sYFjHEf3/DkHq 3ooQ== 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=fies7QBSRqzE1yaZ+x4eVoL04wK0kCzHsQc1VqKvkaU=; b=Nwp3akwZtnwsHXbZyTvYlwbGLsk8VIrzTdyxDH8KrqUqCfmXDhaPkDj/9C0LcLvl0d XsgTXYYgK1Y++g4N+wM4U6uRbAyVs24qgq/TMWeEo4PK6vaYD+4UmL8OpZpgIvl1OzXt aYr7FGh2H+vVs9s8JOX4LVFtu2vELjDyBNjSy4MHi+w6H93pujj42zO8itYLtuqQKK+n yqQxrK9nnsFL9ifyc3BwBjWTJ4pQebda9Cxx6cRbyrDGfm89l7fPGM2P1qMDG+wa2lbz lcmclxvnYUGHFxYIEeemeir0cRgARelUPb3Ntr93V47uvVlyEOMVwzTR2fzyRP9VHkgF eJwg== 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 57si3484241edz.9.2017.12.22.13.17.04; Fri, 22 Dec 2017 13:17:04 -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 65539C21FA4; Fri, 22 Dec 2017 21:15:56 +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 D2832C21FBB; Fri, 22 Dec 2017 21:14:30 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 8F150C21FBB; Fri, 22 Dec 2017 21:14:19 +0000 (UTC) Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by lists.denx.de (Postfix) with ESMTP id E6A80C21F76 for ; Fri, 22 Dec 2017 21:14:15 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 13C032092B; Fri, 22 Dec 2017 22:14:15 +0100 (CET) Received: from localhost.localdomain (unknown [80.12.41.248]) by mail.free-electrons.com (Postfix) with ESMTPSA id 737FA203A1; Fri, 22 Dec 2017 22:14:14 +0100 (CET) From: Quentin Schulz To: jagan@openedev.com, maxime.ripard@free-electrons.com, hdegoede@redhat.com, sjg@chromium.org, wd@denx.de, andre.przywara@arm.com, lukma@denx.de Date: Fri, 22 Dec 2017 22:13:39 +0100 Message-Id: <4bba43c82f3da1149c93a6191b74674553d6a970.1513975247.git-series.quentin.schulz@free-electrons.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: References: In-Reply-To: References: Cc: thomas.petazzoni@free-electrons.com, u-boot@lists.denx.de Subject: [U-Boot] [PATCH 05/11] cmd: saveenv: enable the saveenv command when ENV_IS_NOWHERE is defined 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" but another env medium is enabled too Now that it is possible to have multiple environments at the same time, nowhere included, enable the saveenv command when nowhere medium is enabled but accompanied by another medium on which the saveenv command is possible. Signed-off-by: Quentin Schulz --- cmd/nvedit.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/cmd/nvedit.c b/cmd/nvedit.c index c00e1da..84a7004 100644 --- a/cmd/nvedit.c +++ b/cmd/nvedit.c @@ -704,7 +704,19 @@ ulong env_get_ulong(const char *name, int base, ulong default_val) } #ifndef CONFIG_SPL_BUILD -#if defined(CONFIG_CMD_SAVEENV) && !defined(CONFIG_ENV_IS_NOWHERE) +#if defined(CONFIG_CMD_SAVEENV) && (!defined(CONFIG_ENV_IS_NOWHERE) || (\ + defined(CONFIG_ENV_IS_IN_EEPROM) || \ + defined(CONFIG_ENV_IS_IN_FLASH) || \ + defined(CONFIG_ENV_IS_IN_MMC) || \ + defined(CONFIG_ENV_IS_IN_FAT) || \ + defined(CONFIG_ENV_IS_IN_EXT4) || \ + defined(CONFIG_ENV_IS_IN_NAND) || \ + defined(CONFIG_ENV_IS_IN_NVRAM) || \ + defined(CONFIG_ENV_IS_IN_ONENAND) || \ + defined(CONFIG_ENV_IS_IN_SATA) || \ + defined(CONFIG_ENV_IS_IN_SPI_FLASH) || \ + defined(CONFIG_ENV_IS_IN_REMOTE) || \ + defined(CONFIG_ENV_IS_IN_UBI))) static int do_env_save(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) {