[PATCH] doc: usage: man-page for ums command

Patrick Delaunay patrick.delaunay at foss.st.com
Wed Jun 2 15:52:47 CEST 2021


Provide a man-page for the ums command for USB Mass Storage.

Signed-off-by: Patrick Delaunay <patrick.delaunay at foss.st.com>
---

 doc/usage/index.rst |  1 +
 doc/usage/ums.rst   | 54 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 55 insertions(+)
 create mode 100644 doc/usage/ums.rst

diff --git a/doc/usage/index.rst b/doc/usage/index.rst
index 41b247bc62..1bab6ae3e9 100644
--- a/doc/usage/index.rst
+++ b/doc/usage/index.rst
@@ -43,3 +43,4 @@ Shell commands
    scp03
    size
    true
+   ums
diff --git a/doc/usage/ums.rst b/doc/usage/ums.rst
new file mode 100644
index 0000000000..cf0e3a9479
--- /dev/null
+++ b/doc/usage/ums.rst
@@ -0,0 +1,54 @@
+.. SPDX-License-Identifier: GPL-2.0+
+
+ums command
+===========
+
+Synopsis
+--------
+
+::
+
+    <USB_controller> [<devtype>] <dev[:part]>
+
+Description
+-----------
+
+Use the USB Mass Storage class (also known as USB MSC or UMS) to make
+accessible a block device (based on UCLASS_BLK) to a host computing device and
+to enable file transfers between the host and the U-Boot device.
+
+This command "ums" stays in the USB's treatment loop until user enters Ctrl-C.
+
+USB_controller
+    USB device number
+
+devtype
+    block device interface, defaults to "mmc"
+
+dev
+    device number for devtype
+
+part
+    partition number, defaults to 0 (first partition)
+
+Example
+-------
+
+::
+
+    => ums 0 mmc 0
+    => ums 0 usb 1:2
+
+Configuration
+-------------
+
+The ums command is only available if CONFIG_CMD_USB_MASS_STORAGE=y.
+
+Return value
+------------
+
+The return value $? is set to 0 (true) when the USB stack was successfully
+started and interrupted Ctrl-C or after USB cable detection issue
+(timeout or cable removal).
+
+If an error occurs, the return value $? is set to 1 (false).
-- 
2.17.1



More information about the U-Boot mailing list