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

NAME

6       sg_read_buffer - send 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.  When  given  twice  the
29              response  is output in hex with the corresponding representation
30              in ASCII to the right of each line.
31
32       -i, --id=ID
33              this option sets the buffer id field in the cdb. ID is  a  value
34              between 0 (default) and 255 inclusive.
35
36       -l, --length=LEN
37              where  LEN is the length, in bytes, that is placed in the "allo‐
38              cation length" field in the cdb. The default value is 4 (bytes).
39              The device may respond with less bytes.
40
41       -m, --mode=MO
42              this  option  sets  the  mode  field  in  the cdb. MO is a value
43              between 0 (default) and 31 inclusive. Alternatively an abbrevia‐
44              tion can be given.  To list the available mode abbreviations use
45              an invalid one (e.g. '--mode=xxx'). As an example, to fetch  the
46              read buffer descriptor give '--mode=desc' .
47
48       -o, --offset=OFF
49              this  option  sets  the buffer offset field in the cdb. OFF is a
50              value between 0 (default) and 2**24-1 . It is a byte offset.
51
52       -r, --raw
53              if a response is received then it is sent in binary to stdout.
54
55       -v, --verbose
56              increase the level of verbosity, (i.e. debug output).
57
58       -V, --version
59              print the version string and then exit.
60

NOTES

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

EXIT STATUS

67       The exit status of sg_read_buffer is 0 when it is successful. Otherwise
68       see the sg3_utils(8) man page.
69

AUTHORS

71       Written by Luben Tuikov and Douglas Gilbert.
72

REPORTING BUGS

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

SEE ALSO

83       sg_write_buffer(sg3_utils)
84
85
86
87sg3_utils-1.35                   November 2012               SG_READ_BUFFER(8)
Impressum