From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 52A63C433EF for ; Mon, 20 Jun 2022 00:07:32 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id B5BE8839E9; Mon, 20 Jun 2022 02:07:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="o5hz2uAi"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 693E883AB5; Mon, 20 Jun 2022 02:07:29 +0200 (CEST) Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5A334832C3 for ; Mon, 20 Jun 2022 02:07:26 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=takahiro.akashi@linaro.org Received: by mail-pj1-x102c.google.com with SMTP id 73-20020a17090a0fcf00b001eaee69f600so8744661pjz.1 for ; Sun, 19 Jun 2022 17:07:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:in-reply-to; bh=gyMUyfkjmIfBrpP48/NS7/OXl+QLsfyJBJMxk3asb5Q=; b=o5hz2uAiI5iqZyQwR1Yirv7/t9eqqENJ219zC9MtJgXOdr3n20DPFgVr/aRWS+T/2e LX8lIawxD0w0uTZIckFFnfvQLbJv14RBfUD9+vQ1rIcoAkGIIlfDFIx6KAWQF3XmsQW0 sO6k2tfFZjuJF0uFLUxgIhTU4wM4zIwfmNGUTFFtaKOgTFLrXJlt93tIV8nmoUVFik4f iGrWr5B/FlbHsUwkaKYn9e9kMu6bYClplwM6ttNH0XX9L/6QQTDvYP6amdH/uz8Z/N4j 4x4gAUQeHMFn2361Dm9Kp1MmqCtVJjx1q0nAJr6c2j21RwloYA/cmvjhvLadVCsuhkif /QAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to; bh=gyMUyfkjmIfBrpP48/NS7/OXl+QLsfyJBJMxk3asb5Q=; b=0Aw+RXBR+SsiT9aYpnMU5/twzj2nvBIv4Aos/0WJKKJlVN4zGe4s9EH3oMeNI+kSHN 0PMUeYIJKzjrCFmrokQ1/5+7cMxI+t308bSdtSW9GYvOREvoH7+yuTlXSvuFgWruuoPa KkKZdkQmp/WzUMRQmf6417tBuAgNMUZfIMMKUYMhODyWPGXNuKDdDY2LGdjmLjrB9Ioa soEEt7nnKSzK3vTeceyMXAb7Q7yjSfz7lRc5f31vpmGtEd1LTCJ/kPl0DpXZoVFpVdSp vKfP0YAZmi2mjPQLGUbPGGiidGimQeCtUOnJwgHNl9glp35Uz8lmtqGEUp1+LdlfSZIE O1WA== X-Gm-Message-State: AJIora+vm2YxU7OnT10CbEX6iYyY8673b/hpkSM8iyQzjzfvyMA5mVE0 zxapa19mySmvuPbede3SF2zs/A== X-Google-Smtp-Source: AGRyM1ube2AiYaIgr7NA5jqJaC5BvvTY/a3bxvzuEtDDXG7lHFCx4rLZsscFQai4OYPm1dyok8BlZQ== X-Received: by 2002:a17:90b:4cca:b0:1e8:70ed:1a4a with SMTP id nd10-20020a17090b4cca00b001e870ed1a4amr23419708pjb.243.1655683644317; Sun, 19 Jun 2022 17:07:24 -0700 (PDT) Received: from laputa ([2400:4050:c3e1:100:c9ae:b8d8:966f:139a]) by smtp.gmail.com with ESMTPSA id z63-20020a633342000000b0040c5c174b6esm5033483pgz.29.2022.06.19.17.07.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Jun 2022 17:07:23 -0700 (PDT) Date: Mon, 20 Jun 2022 09:07:20 +0900 From: AKASHI Takahiro To: Heinrich Schuchardt Cc: u-boot@lists.denx.de Subject: Re: [PATCH 1/1] doc: man-page for the printenv command Message-ID: <20220620000720.GA8620@laputa> Mail-Followup-To: AKASHI Takahiro , Heinrich Schuchardt , u-boot@lists.denx.de References: <20220619120117.38959-1-heinrich.schuchardt@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220619120117.38959-1-heinrich.schuchardt@canonical.com> X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean Heinrich, Thank you. A few nitpicks. On Sun, Jun 19, 2022 at 02:01:17PM +0200, Heinrich Schuchardt wrote: > Privide a man-page for the printenv command. > > Signed-off-by: Heinrich Schuchardt > --- > doc/usage/cmd/printenv.rst | 90 ++++++++++++++++++++++++++++++++++++++ > doc/usage/index.rst | 1 + > 2 files changed, 91 insertions(+) > create mode 100644 doc/usage/cmd/printenv.rst > > diff --git a/doc/usage/cmd/printenv.rst b/doc/usage/cmd/printenv.rst > new file mode 100644 > index 0000000000..6f1c46006b > --- /dev/null > +++ b/doc/usage/cmd/printenv.rst > @@ -0,0 +1,90 @@ > +.. SPDX-License-Identifier: GPL-2.0+: > + > +printenv command > +================ > + > +Synopsis > +-------- > + > +:: > + > + printenv [-a] [name ...] Refer to "env print" as well? > + printenv -e [-guid guid][-n] [name] ^ space [name ...] "printenv -e" also supports multiple variable names in a command line. > + > +Description > +----------- > + > +The printenv command is used to print environment or UEFI variables. > + > +\-a > + Print environment variables starting with a period ('.'). > + > +\-e > + Print UEFI variables. Without -e environment variables are printed. > + > +\-guid *guid* > + Specify vendor GUID *guid*. If none is specified, all UEFI variables with > + the specified name are printed irrespective of their vendor GUID. > + > +\-n > + don't show hexadecimal dump of value > + > +name > + Variable name. If no name is provided all variables are printed. > + Multiple environment variable names may be specified. > + > +Examples > +-------- > + > +The following examples demonstrates the effect of the *-a* flag when displaying > +environment variables: > + > +:: > + > + => setenv .foo bar > + => printenv > + arch=sandbox > + baudrate=115200 > + board=sandbox > + ... > + stdout=serial,vidconsole > + > + Environment size: 644/8188 bytes > + => printenv -a > + .foo=bar > + arch=sandbox > + baudrate=115200 > + board=sandbox > + ... > + stdout=serial,vidconsole > + > + Environment size: 653/8188 bytes > + => > + > +The next example shows the effect of the *-n* flag when displaying an UEFI You intend to demonstrate not only "-n" but also "-guid" here? -Takahiro Akashi > +variable and how to specify a vendor GUID: > + > +:: > + > + => printenv -e -guid 8be4df61-93ca-11d2-aa0d-00e098032b8c PlatformLangCodes > + PlatformLangCodes: > + 8be4df61-93ca-11d2-aa0d-00e098032b8c (EFI_GLOBAL_VARIABLE_GUID) > + BS|RT|RO, DataSize = 0x6 > + 00000000: 65 6e 2d 55 53 00 en-US. > + => printenv -e -n PlatformLangCodes > + PlatformLangCodes: > + 8be4df61-93ca-11d2-aa0d-00e098032b8c (EFI_GLOBAL_VARIABLE_GUID) > + BS|RT|RO, DataSize = 0x6 > + => > + > +Configuration > +============= > + > +UEFI variables are only supported if CONFIG_CMD_NVEDIT_EFI=y. The value of UEFI > +variables can only be displayed if CONFIG_HEXDUMP=y. > + > +Return value > +------------ > + > +The return value $? is 1 (false) if a specified variable is not found. > +Otherwise $? is set to 0 (true). > diff --git a/doc/usage/index.rst b/doc/usage/index.rst > index c03f4aef9e..cbe49244c8 100644 > --- a/doc/usage/index.rst > +++ b/doc/usage/index.rst > @@ -48,6 +48,7 @@ Shell commands > cmd/md > cmd/mmc > cmd/pinmux > + cmd/printenv > cmd/pstore > cmd/qfw > cmd/reset > -- > 2.36.1 >