diff options
| author | Tom Rini <[email protected]> | 2025-10-26 07:51:18 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2025-10-26 09:03:36 -0600 |
| commit | 9094482ca7576877b2bfaa57c8e73cfeb536f8b9 (patch) | |
| tree | a7ab2b7409802fe0dd3b2e36ecad3960c4b52004 /doc/usage/cmd/read.rst | |
| parent | fd976ff3a233ae7c6a9f5bec790b02bbbf57bb24 (diff) | |
| parent | 5335f8d25b2f39b9dd954981364f3cddde01895f (diff) | |
Merge tag 'efi-2026-01-rc1-2' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request efi-2026-01-rc1-2
CI:
* https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/28024
Documentation:
* develop: virtio: Fix qemu example (true/false -> on/off)
* separate read and write command documentation
* usage: Add general rule for `$?`
* askenv: Reword and remove return value
* seama: Reword return value section
* usage: Use glob for all commands
* Fix typos and formatting
UEFI:
* console: support editable input fields
Diffstat (limited to 'doc/usage/cmd/read.rst')
| -rw-r--r-- | doc/usage/cmd/read.rst | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/doc/usage/cmd/read.rst b/doc/usage/cmd/read.rst index 840846728fc..9045a7e7e31 100644 --- a/doc/usage/cmd/read.rst +++ b/doc/usage/cmd/read.rst @@ -1,7 +1,10 @@ -.. SPDX-License-Identifier: GPL-2.0-or-later: +.. SPDX-License-Identifier: GPL-2.0-or-later -read and write commands -======================= +.. index:: + single: read (command) + +read command +============ Synopsis -------- @@ -9,14 +12,12 @@ Synopsis :: read <interface> <dev[:part|#partname]> <addr> <blk#> <cnt> - write <interface> <dev[:part|#partname]> <addr> <blk#> <cnt> -The read and write commands can be used for raw access to data in -block devices (or partitions therein), i.e. without going through a -file system. +Description +----------- -read ----- +The read command can be used for raw reading data from a block device +(or a partition therein), i.e. without going through a file system. The block device is specified using the <interface> (e.g. "mmc") and <dev> parameters. If the block device has a partition table, one can @@ -25,20 +26,24 @@ partition name (using the #partname syntax). The command then reads the <cnt> blocks of data starting at block number <blk#> of the given device/partition to the memory address <addr>. -write ------ - -The write command is completely equivalent to the read command, except -of course that the transfer direction is reversed. - Examples -------- +.. code-block:: bash + # Read 2 MiB from partition 3 of mmc device 2 to $loadaddr read mmc 2.3 $loadaddr 0 0x1000 # Read 16 MiB from the partition named 'kernel' of mmc device 1 to $loadaddr read mmc 1#kernel $loadaddr 0 0x8000 - # Write to the third sector of the partition named 'bootdata' of mmc device 0 - write mmc 0#bootdata $loadaddr 2 1 +Configuration +------------- + +The read command is only available if CONFIG_CMD_READ=y. + +Return value +------------ + +The command sets the return value $? to 0 (true) on success or to 1 (false) in +case of an error. |
