aboutsummaryrefslogtreecommitdiff
path: root/doc/scsi_readcap.8
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@google.com>2022-11-23 20:04:46 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-11-23 20:04:46 +0000
commit62b99c09a4bbb75fea6c309c77ebf856323d908c (patch)
tree207cdb23f8257e270a30143fde23d2033901581f /doc/scsi_readcap.8
parent8718296061e35ba33bf88847e7498f3d7e38f8f1 (diff)
parent3c61bd9e26bf930f865e28e7eef48856653d1c98 (diff)
downloadsg3_utils-62b99c09a4bbb75fea6c309c77ebf856323d908c.tar.gz
Merge remote-tracking branch 'aosp/upstream-main' into HEAD am: 448b67b18a am: d39ef90544 am: 3c61bd9e26
Original change: https://android-review.googlesource.com/c/platform/external/sg3_utils/+/2312210 Change-Id: I0362cffa263ba632a3e2058f8f50f32e024b2cc3 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'doc/scsi_readcap.8')
-rw-r--r--doc/scsi_readcap.851
1 files changed, 51 insertions, 0 deletions
diff --git a/doc/scsi_readcap.8 b/doc/scsi_readcap.8
new file mode 100644
index 00000000..d898ce9c
--- /dev/null
+++ b/doc/scsi_readcap.8
@@ -0,0 +1,51 @@
+.TH SCSI_READCAP "8" "May 2013" "sg3_utils\-1.36" SG3_UTILS
+.SH NAME
+scsi_readcap \- do SCSI READ CAPACITY command on disks
+.SH SYNOPSIS
+.B scsi_readcap
+[\fI\-\-brief\fR] [\fI\-\-help\fR] [\fI\-\-long\fR] [\fI\-\-verbose\fR]
+\fIDEVICE\fR [\fIDEVICE\fR]*
+.SH DESCRIPTION
+.\" Add any additional description here
+.PP
+This bash shell script calls the sg_readcap utility on each given
+\fIDEVICE\fR. This will send a SCSI READ CAPACITY command to each
+\fIDEVICE\fR.
+.PP
+The default action of this script is to send the 10 byte cdb READ
+CAPACITY(10) command to each \fIDEVICE\fR. If a response indicates
+the number of blocks is greater than or equal to '2**32 \- 1' then
+the READ CAPACITY(16) is sent and its response is output.
+.SH OPTIONS
+Arguments to long options are mandatory for short options as well.
+.TP
+\fB\-b\fR, \fB\-\-brief\fR
+shortens the output to two hexadecimal numbers, both prefixed by '0x'.
+The first number is the number of blocks available and the second is
+the size of each blocks in bytes (e.g. '0x12a19eb0 0x200'). If an error
+is detected '0x0 0x0' is output and the script continues if there are
+more \fIDEVICE\fRs.
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+print out the usage message then exit.
+.TP
+\fB\-l\fR, \fB\-\-long\fR
+the default is to send the READ CAPACITY(10) command (i.e. the 10 byte
+cdb variant). When this option is given the READ CAPACITY(16) command
+is sent. The latter command yields more information in its response.
+.TP
+\fB\-v\fR, \fB\-\-verbose\fR
+increase level or verbosity.
+.SH EXIT STATUS
+The exit status of this script is 0 when it is successful. Otherwise the
+exit status is that of the last sg_readcap utility called. See
+the sg3_utils(8) man page.
+.SH AUTHORS
+Written by D. Gilbert
+.SH COPYRIGHT
+Copyright \(co 2009\-2013 Douglas Gilbert
+.br
+This software is distributed under a BSD\-2\-Clause license. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+.SH "SEE ALSO"
+.B sg_readcap (sg3_utils)