~ubuntu-branches/ubuntu/dapper/sg3-utils/dapper-backports

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
.TH SG_GET_CONFIG "8" "June 2006" "sg3_utils-1.21" SG3_UTILS
.SH NAME
sg_get_config \- invoke SCSI GET CONFIGURATION command on a (cd/dvd) device
.SH SYNOPSIS
.B sg_get_config
[\fI--brief\fR] [\fI--current\fR] [\fI--help\fR] [\fI--hex\fR]
[\fI--inner-hex\fR] [\fI--list\fR] [\fI--rt=<n>\fR] [\fI--starting=<n>\fR]
[\fI--verbose\fR] [\fI--version\fR] \fI<device>\fR
.SH DESCRIPTION
.\" Add any additional description here
.PP
Sends a SCSI GET CONFIGURATION command to the given Linux device and
decodes the response. The response includes the features and profiles
of the device. Typically these devices are CD and DVD players that
may (but not necessarily) have media in them. These devices may well
be connected via ATAPI, USB or IEEE 1394 transports. In such
cases they are "SCSI" devices only in the sense that they use
the "Multi-Media command" set (MMC). MMC is a specialized SCSI
command set whose definition can be found at http://www.t10.org .
.PP
This utility is based on the MMC-4 and MMC-5 draft standards. See
section 5 on "Features and Profile for Multi_Media devices" for more
information on specific feature parameters and profiles. The manufacturer's
product manual may also be useful.
.PP
Since modern DVD writers support many features and profiles, the decoded
output from this utility can be large. There are various ways to cut down
the output. If the '--brief' option is used only the feature names are shown
and the feature parameters are not decoded. Alternatively if only one
feature is of interest then this combination of options is
appropriate: "--rt=2 --starting=<feature_code>". Another possibility is to
show only the features that are relevant to the media in the
drive (i.e. "current") with the "--rt=1" option.
.TP
--brief | -b
show the feature names but don't decode the parameters of those features.
When used with '--list' outputs known feature names but not known profile
names.
.TP
--current | -c
output features marked as current. This option is equivalent to '--rt=1'.
.TP
--help | -h
output the usage message then exit.
.TP
--hex | -H
output the response in hex (don't decode response).
.TP
--inner-hex | -i
decode to the feature name level then output each feature's data in hex.
.TP
--list | -l
list all known feature and profile names. Ignore the device name (if given).
Simply lists the feature names and profiles (followed by their hex values)
that this utility knows about. If '--brief' is also given then only feature
names are listed.
.TP
--rt=<n> | -r <n>
RT value given to GET CONFIGURATION command. Allowable values are 0,
1, 2, or 3 . The command's action also depends on the value given
to '--starting='.  The default value is 0.
When <n> is 0 then all features, regardless of currency, are returned (whose
feature code is greater than or equal to the value given to '--starting=').
When <n> is 1 then all current features are returned (whose
feature code is greater than or equal to the value given to '--starting=').
When <n> is 2 then the feature whose feature code is equal to the value
given to '--starting=', if any, is returned.
When <n> is 3 the response is reserved (probably yields an "illegal
field in cdb" error).
.TP
--starting=<n> | -s <n>
this option works closely with the --rt option. Its value is a feature
code in the range 0 to 0xffff (inclusive). Its default value is 0. A value
prefixed with "0x" is interpreted as hexadecimal.
.TP
--verbose | -v
increase the level of verbosity, (i.e. debug output).
.TP
--version | -V
print the version string and then exit.
.PP
There are multiple versions of the MMC (draft) standards: MMC [1997],
MMC-2 [2000],  MMC-3 [2002], MMC-4 and MMC-5. The first three are now
ANSI INCITS standards with the year they became standards shown in
brackets. The draft immediately prior to standardization can
be found at http://www.t10.org . In the initial MMC standard there
was no GET CONFIGURATION command and the relevant information was
obtained from the "CD capabilities and mechanical status mode
page" (mode page 0x2a). It was later renamed the "MM capabilities and 
mechanical status mode page" and has been made obsolete in MMC-4 and
MMC-5. The GET CONFIGURATION command was introduced in MMC-2 and has
become a replacement for that mode page. New features such as support
for "BD" (blue ray) media type can only be found by using the
GET CONFIGURATION command. Hence older CD players may not support
the GET CONFIGURATION command in which case the "MM capabilities ..."
mode page can be checked with sdpar, sginfo or sg_modes.
.PP
In the 2.4 series of Linux kernels the given device must be
a SCSI generic (sg) device. In the 2.6 series block devices
can also be specified. For example "sg_get_config /dev/hdc"
will work in the 2.6 series kernels as long as /dev/hdc is
an ATAPI device. In the 2.6 series external DVD writers attached
via USB could be queried with "sg_get_config /dev/scd1" for example.
.SH EXIT STATUS
The exit status of sg_get_config is 0 when it is successful. Otherwise see
the sg3_utils(8) man page.
.SH AUTHORS
Written by Douglas Gilbert.
.SH "REPORTING BUGS"
Report bugs to <dgilbert at interlog dot com>.
.SH COPYRIGHT
Copyright \(co 2004-2005 Douglas Gilbert
.br
This software is distributed under a FreeBSD license. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
.SH "SEE ALSO"
.B sginfo, sg_modes, sg_inq, sg_prevent, sg_start (all in sg3_utils)
.B sdparm