doc: coninfo man-page
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 1 Apr 2023 10:33:49 +0000 (12:33 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 8 Apr 2023 05:44:33 +0000 (07:44 +0200)
Provide a man-page for the coninfo command.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
doc/usage/cmd/coninfo.rst [new file with mode: 0644]
doc/usage/index.rst

diff --git a/doc/usage/cmd/coninfo.rst b/doc/usage/cmd/coninfo.rst
new file mode 100644 (file)
index 0000000..f913148
--- /dev/null
@@ -0,0 +1,55 @@
+.. SPDX-License-Identifier: GPL-2.0+:
+
+coninfo command
+===============
+
+Synopsis
+--------
+
+::
+
+    coninfo
+
+Description
+-----------
+
+The coninfo command provides a list of available console input and output
+devices and their assignment as stdin, stdout, stderr console devices.
+
+If CONFIG_SYS_CONSOLE_IS_IN_ENV=y, the assignment is controlled by the
+environment variables stdin, stdout, stderr which contain a comma separated
+list of device names.
+
+Example
+--------
+
+.. code-block:: console
+
+    => coninfo
+    List of available devices
+    |-- pl011@9000000 (IO)
+    |   |-- stdin
+    |   |-- stdout
+    |   |-- stderr
+    |-- serial (IO)
+    |-- usbkbd (I)
+    => setenv stdin pl011@9000000,usbkbd
+    => coninfo
+    List of available devices
+    |-- pl011@9000000 (IO)
+    |   |-- stdin
+    |   |-- stdout
+    |   |-- stderr
+    |-- serial (IO)
+    |-- usbkbd (I)
+    |   |-- stdin
+
+Configuration
+-------------
+
+The coninfo command is only available if CONFIG_CMD_CONSOLE=y.
+
+Return value
+------------
+
+The return value $? is always 0 (true).
index 729541b..cdf7109 100644 (file)
@@ -39,6 +39,7 @@ Shell commands
    cmd/cbsysinfo
    cmd/cls
    cmd/cmp
+   cmd/coninfo
    cmd/conitrace
    cmd/cyclic
    cmd/dm