1SG_READ_BUFFER(8)                  SG3_UTILS                 SG_READ_BUFFER(8)
2
3
4

NAME

6       sg_read_buffer - send a SCSI READ BUFFER command
7

SYNOPSIS

9       sg_read_buffer  [--help]  [--hex]  [--id=ID] [--length=LEN] [--mode=MO]
10       [--offset=OFF] [--raw] [--verbose] [--version] DEVICE
11

DESCRIPTION

13       Sends a SCSI READ BUFFER command to the  DEVICE,  and  if  there  is  a
14       response  either  decodes  it,  prints it in hexadecimal or sends it in
15       binary to stdout. If a response is received  for  a  "descriptor"  mode
16       then,  in  the  absence of --hex and --raw, it is decoded. Response for
17       non-descriptor modes are output in hexadecimal unless the --raw  option
18       is given.
19

OPTIONS

21       Arguments to long options are mandatory for short options as well.
22
23       -h, --help
24              output  the usage message then exit. If used multiple times also
25              prints the mode names and their acronyms.
26
27       -H, --hex
28              output the response in hexadecimal.
29
30       -i, --id=ID
31              this option sets the buffer id field in the cdb. ID is  a  value
32              between 0 (default) and 255 inclusive.
33
34       -l, --length=LEN
35              where  LEN is the length, in bytes, that is placed in the "allo‐
36              cation length" field in the cdb. The default value is 4 (bytes).
37              The device may respond with less bytes.
38
39       -m, --mode=MO
40              this  option  sets  the  mode  field  in  the cdb. MO is a value
41              between 0 (default) and 31 inclusive. Alternatively an abbrevia‐
42              tion  can  be  given.   To list the available mode abbreviations
43              given an invalid one (e.g. '--mode=xxx').
44
45       -o, --offset=OFF
46              this option sets the buffer offset field in the cdb.  OFF  is  a
47              value between 0 (default) and 2**24-1 . It is a byte offset.
48
49       -r, --raw
50              if a response is received then it is sent in binary to stdout.
51
52       -v, --verbose
53              increase the level of verbosity, (i.e. debug output).
54
55       -V, --version
56              print the version string and then exit.
57

NOTES

59       All  numbers  given  with  options are assumed to be decimal.  Alterna‐
60       tively numerical values can be given in hexadecimal preceded by  either
61       "0x" or "0X" (or has a trailing "h" or "H").
62

EXIT STATUS

64       The exit status of sg_read_buffer is 0 when it is successful. Otherwise
65       see the sg3_utils(8) man page.
66

AUTHORS

68       Written by Luben Tuikov and Douglas Gilbert.
69

REPORTING BUGS

71       Report bugs to <dgilbert at interlog dot com>.
72
74       Copyright © 2006-2007 Luben Tuikov and Douglas Gilbert
75       This software is distributed under a FreeBSD license. There is NO  war‐
76       ranty;  not  even  for MERCHANTABILITY or FITNESS FOR A PARTICULAR PUR‐
77       POSE.
78

SEE ALSO

80       sg_write_buffer(sg3_utils)
81
82
83
84sg3_utils-1.23                   January 2007                SG_READ_BUFFER(8)
Impressum