diff mbox series

[v3,4/6] sysinfo: Add documentation

Message ID 20230714164424.838842-5-detlev.casanova@collabora.com
State Superseded
Delegated to: Marek Vasut
Headers show
Series Introduce the sysinfo command | expand

Commit Message

Detlev Casanova July 14, 2023, 4:43 p.m. UTC
Add documentation for the sysinfo command with examples.

Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
---
 doc/usage/cmd/sysinfo.rst | 56 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 doc/usage/cmd/sysinfo.rst

Comments

Marek Vasut July 14, 2023, 5:31 p.m. UTC | #1
On 7/14/23 18:43, Detlev Casanova wrote:

[...]

> +Return value
> +------------
> +
> +The return value $? is set to 0 (true) if the command succededd

succeeded -- typo

. If an
> +error occurs, the return value $? is set to 1 (false).

With that fixed:

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Detlev Casanova July 17, 2023, 12:27 p.m. UTC | #2
On Friday, July 14, 2023 1:31:00 P.M. EDT Marek Vasut wrote:
> On 7/14/23 18:43, Detlev Casanova wrote:
> 
> [...]
> 
> > +Return value
> > +------------
> > +
> > +The return value $? is set to 0 (true) if the command succededd
> 
> succeeded -- typo
> 
> . If an
> 
> > +error occurs, the return value $? is set to 1 (false).
> 
> With that fixed:
> 
> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>

Do you need me to make a patch v4 to fix this ?
Marek Vasut July 23, 2023, 10:05 p.m. UTC | #3
On 7/17/23 14:27, Detlev Casanova wrote:
> On Friday, July 14, 2023 1:31:00 P.M. EDT Marek Vasut wrote:
>> On 7/14/23 18:43, Detlev Casanova wrote:
>>
>> [...]
>>
>>> +Return value
>>> +------------
>>> +
>>> +The return value $? is set to 0 (true) if the command succededd
>>
>> succeeded -- typo
>>
>> . If an
>>
>>> +error occurs, the return value $? is set to 1 (false).
>>
>> With that fixed:
>>
>> Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
> 
> Do you need me to make a patch v4 to fix this ?

Yes please, although I see a v4 already, thanks !
diff mbox series

Patch

diff --git a/doc/usage/cmd/sysinfo.rst b/doc/usage/cmd/sysinfo.rst
new file mode 100644
index 00000000000..3dad1f4f38d
--- /dev/null
+++ b/doc/usage/cmd/sysinfo.rst
@@ -0,0 +1,56 @@ 
+.. SPDX-License-Identifier: GPL-2.0+:
+
+sysinfo command
+===============
+
+Synopis
+-------
+
+::
+
+    sysinfo id <varname>
+    sysinfo model <varname>
+    sysinfo revision <varname>
+
+Description
+-----------
+
+The `sysinfo` command is used to show information about the running system
+
+The `sysinfo id` command prints or sets an environment variable to the board id
+as an hex value.
+
+    varname
+        an optional environment variable to store the board id into.
+
+The `sysinfo model` command prints or sets an environment variable to the board
+model name as a string value.
+
+    varname
+        an optional environment variable to store the board model name into.
+
+The `sysinfo revision` command prints or sets an environment variable to the
+board revision in the <MAJOR>.<MINOR> format, where MINOR and MINOR are int
+values.
+
+    varname
+        an optional environment variable to store the board revision into.
+
+Examples
+--------
+
+::
+
+    => sysinfo id
+    0x0b
+    => sysinfo model
+    Renesas Starter Kit Premier board rev 2.1
+    => sysinfo revision varname
+    => env print varname
+    2.1
+
+Return value
+------------
+
+The return value $? is set to 0 (true) if the command succededd. If an
+error occurs, the return value $? is set to 1 (false).