Douglas Gilbert | 7502647 | 2007-06-27 03:51:21 +0000 | [diff] [blame] | 1 | .TH SG_READ_BUFFER "8" "January 2007" "sg3_utils\-1.23" SG3_UTILS |
| 2 | .SH NAME |
| 3 | sg_read_buffer \- send a SCSI READ BUFFER command |
| 4 | .SH SYNOPSIS |
| 5 | .B sg_read_buffer |
| 6 | [\fI\-\-help\fR] [\fI\-\-hex\fR] [\fI\-\-id=ID\fR] [\fI\-\-length=LEN\fR] |
| 7 | [\fI\-\-mode=MO\fR] [\fI\-\-offset=OFF\fR] [\fI\-\-raw\fR] |
| 8 | [\fI\-\-verbose\fR] [\fI\-\-version\fR] \fIDEVICE\fR |
| 9 | .SH DESCRIPTION |
| 10 | .\" Add any additional description here |
| 11 | .PP |
| 12 | Sends a SCSI READ BUFFER command to the \fIDEVICE\fR, and if there |
| 13 | is a response either decodes it, prints it in hexadecimal or sends |
| 14 | it in binary to stdout. If a response is received for a "descriptor" |
| 15 | mode then, in the absence of \fI\-\-hex\fR and \fI\-\-raw\fR, it is |
Douglas Gilbert | 0938f9e | 2007-10-16 15:00:15 +0000 | [diff] [blame] | 16 | decoded. Response for non\-descriptor modes are output in hexadecimal |
Douglas Gilbert | 7502647 | 2007-06-27 03:51:21 +0000 | [diff] [blame] | 17 | unless the \fI\-\-raw\fR option is given. |
| 18 | .SH OPTIONS |
| 19 | Arguments to long options are mandatory for short options as well. |
| 20 | .TP |
| 21 | \fB\-h\fR, \fB\-\-help\fR |
| 22 | output the usage message then exit. If used multiple times also prints |
| 23 | the mode names and their acronyms. |
| 24 | .TP |
| 25 | \fB\-H\fR, \fB\-\-hex\fR |
| 26 | output the response in hexadecimal. |
| 27 | .TP |
| 28 | \fB\-i\fR, \fB\-\-id\fR=\fIID\fR |
| 29 | this option sets the buffer id field in the cdb. \fIID\fR is a value between |
| 30 | 0 (default) and 255 inclusive. |
| 31 | .TP |
| 32 | \fB\-l\fR, \fB\-\-length\fR=\fILEN\fR |
| 33 | where \fILEN\fR is the length, in bytes, that is placed in the "allocation |
| 34 | length" field in the cdb. The default value is 4 (bytes). The device may |
| 35 | respond with less bytes. |
| 36 | .TP |
| 37 | \fB\-m\fR, \fB\-\-mode\fR=\fIMO\fR |
| 38 | this option sets the mode field in the cdb. \fIMO\fR is a value between |
| 39 | 0 (default) and 31 inclusive. Alternatively an abbreviation can be given. |
| 40 | To list the available mode abbreviations given an invalid |
| 41 | one (e.g. '\-\-mode=xxx'). |
| 42 | .TP |
| 43 | \fB\-o\fR, \fB\-\-offset\fR=\fIOFF\fR |
| 44 | this option sets the buffer offset field in the cdb. \fIOFF\fR is a value |
| 45 | between 0 (default) and 2**24\-1 . It is a byte offset. |
| 46 | .TP |
| 47 | \fB\-r\fR, \fB\-\-raw\fR |
| 48 | if a response is received then it is sent in binary to stdout. |
| 49 | .TP |
| 50 | \fB\-v\fR, \fB\-\-verbose\fR |
| 51 | increase the level of verbosity, (i.e. debug output). |
| 52 | .TP |
| 53 | \fB\-V\fR, \fB\-\-version\fR |
| 54 | print the version string and then exit. |
| 55 | .SH NOTES |
| 56 | All numbers given with options are assumed to be decimal. |
| 57 | Alternatively numerical values can be given in hexadecimal preceded by |
| 58 | either "0x" or "0X" (or has a trailing "h" or "H"). |
| 59 | .SH EXIT STATUS |
| 60 | The exit status of sg_read_buffer is 0 when it is successful. Otherwise |
| 61 | see the sg3_utils(8) man page. |
| 62 | .SH AUTHORS |
| 63 | Written by Luben Tuikov and Douglas Gilbert. |
| 64 | .SH "REPORTING BUGS" |
| 65 | Report bugs to <dgilbert at interlog dot com>. |
| 66 | .SH COPYRIGHT |
| 67 | Copyright \(co 2006\-2007 Luben Tuikov and Douglas Gilbert |
| 68 | .br |
| 69 | This software is distributed under a FreeBSD license. There is NO |
| 70 | warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
| 71 | .SH "SEE ALSO" |
| 72 | .B sg_write_buffer(sg3_utils) |