mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 2/2] Documentation: state: clarify how to access state device parameters
Date: Tue, 10 Nov 2020 16:34:30 +0100	[thread overview]
Message-ID: <20201110153430.32123-2-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20201110153430.32123-1-a.fatoum@pengutronix.de>

Users may be inclined to use hyphens in state variable names as this is
customary for device tree nodes. Such variables can't be read with
$state.example-variable or written with state.example-variable=,
because it's incompatible with Hush. Adjust the documentation to nudge
users into the correct direction (${state.example-variabe} and setenv)

Suggested-by: Matthias Fend <Matthias.Fend@wolfvision.net>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 Documentation/user/state.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/user/state.rst b/Documentation/user/state.rst
index 78ce24f9edce..54aa396257f9 100644
--- a/Documentation/user/state.rst
+++ b/Documentation/user/state.rst
@@ -684,9 +684,9 @@ Frontend
 --------
 
 As frontend a *state* instance is a regular barebox device which has
-device parameters for the *state* variables. With this the variables can
+:ref:`device_parameters` for the *state* variables. With this the variables can
 be accessed like normal shell variables. The ``state`` command is used
 to save/restore a *state* variable set to the backend device.
 
-After initializing the variable can be accessed with ``$state.foo``.
-``state -s`` stores the *state* to the backend device.
+After initializing the variable can be accessed with ``${state.foo}`` or
+:ref:`command_setenv`. ``state -s`` stores the *state* to the backend device.
-- 
2.28.0


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2020-11-10 15:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-10 15:34 [PATCH 1/2] doc: add note about characters like hyphens in variable names Ahmad Fatoum
2020-11-10 15:34 ` Ahmad Fatoum [this message]
2020-11-13  7:53 ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201110153430.32123-2-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox