aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2010-04-24 20:56:46 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2010-04-24 20:56:46 +0000
commit3457b26ece045d246779a9e8f4a1e7cb840d7573 (patch)
tree0c4bb5037062b02b95d09648d721f45e25dcee26
parent09fb2873a50d505c755f87013745e06c34826dee (diff)
downloadsg3_utils-3457b26ece045d246779a9e8f4a1e7cb840d7573.tar.gz
bump to 1.30, some spc4r24 updates, sg_read_long --readonly option; spelling
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@338 6180dd3e-e324-4e3e-922d-17de1ae2f315
-rw-r--r--ChangeLog5
-rw-r--r--README48
-rw-r--r--README.freebsd53
-rw-r--r--README.solaris82
-rw-r--r--README.tru6428
-rw-r--r--README.win3237
-rw-r--r--configure.ac2
-rw-r--r--debian/changelog6
-rw-r--r--doc/sg_format.88
-rw-r--r--doc/sg_read_block_limits.82
-rw-r--r--doc/sg_readcap.82
-rw-r--r--doc/sg_wr_mode.82
-rw-r--r--doc/sginfo.82
-rw-r--r--lib/sg_lib_data.c6
-rw-r--r--sg3_utils.spec6
-rw-r--r--src/sg_inq.c2
-rw-r--r--src/sg_inq_data.c14
-rw-r--r--src/sg_logs.c6
-rw-r--r--src/sg_read_long.c21
-rw-r--r--src/sg_test_rwbuf.c4
-rw-r--r--src/sg_wr_mode.c4
21 files changed, 214 insertions, 126 deletions
diff --git a/ChangeLog b/ChangeLog
index 764f9aad..a177ac5a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,11 @@ Each utility has its own version number, date of last change and
some description at the top of its ".c" file. All utilities in the main
directory have their own "man" pages. There is also a sg3_utils man page.
+Changelog for sg3_utils-1.30 [20100424] [svn: r338]
+ - sg_inq: update version descriptor list to spc4r24
+ - sg_lib: sync asc/ascq list to spc4r24
+ - sg_read_long: add --readonly option (open() is rw)
+
Changelog for sg3_utils-1.29 [20100406] [svn: r334]
- sg_rtpg: new logical block dependent state and bit (spc4r23)
- sg_start: add '--readonly' option for ATA disks
diff --git a/README b/README
index fdbe70ba..8f4fe3f3 100644
--- a/README
+++ b/README
@@ -72,7 +72,7 @@ resets) still need to use the Linux sg driver. Note that various
drivers (e.g. cdrom/sr) have different open() flag and permissions policies
that the user may need to take into account.
-If you have problems or questions about them please contact the author.
+If users have problems or questions about them please contact the author.
Documentation for the Linux sg device driver can be found at:
http://sg.danny.cz/sg/p/sg_v3_ho.html . This is written in DocBook and the
original xml can be found in the same directory with the ".xml" extension.
@@ -86,27 +86,14 @@ as they please. Attribution is encouraged. Please check the code as other
contributors (apart from the author) may also have copyright notices. For a
list of contributors see the CREDITS file.
-The include/sg_lib_data.h and lib/sg_lib_data.c files contain ASCII text
-corresponding to most of the SCSI commands, errors and warning conditions.
-The interface to this data plus several related helper functions are found
-x in the include/sg_lib.h and lib/sg_lib.c files. The include/sg_cmds_basic.h
-and lib/sg_cmds_basic.c" files contains code to invoke common SCSI commands
-and associated response processing. The include/sg_cmds_mmc.h and
-lib/sg_cmds_mmc.c files contain code to invoke SCSI commands specific to MMC
-(for cd/dvd/bd devices). The include/sg_cmds_extra.h and lib/sg_cmds_extra.c
-files contains code to invoke lesser used SCSI commands and associated
-response processing. All are guided by recent drafts at www.t10.org which
-is the home site of SCSI (draft) standards. Linux specific code has been
-removed from above mentioned files. The SCSI command implementations
-in lib/sg_cmds_basic.c, lib/sg_cmds_mmc.c and lib/sg_cmds_extra.c access the
-OS pass-through mechanism via the function based interface defined in
-include/sg_pt.h . The Linux specific implementation of that pass through is
-found in the lib/sg_pt_linux.c file. Since almost all of the utilities use
-these files, a shared library called "libsgutils<num>.so" is built. Use of
-this library cuts down the size of binary distributions of sg3_utils
-significantly. The build scripts provided in the lib subdirectory builds
-libsgutils<num>.so The rest of the source code files have been relocated to
-the src subdirectory. See the INSTALL file for more information.
+To save the repetition of common code (e.g. SCSI error processing) and
+reduce the size of the executable files, a shared library called
+libsgutils<num>.so (its Linux name) is created during the build process.
+That library is built from the contents of the include and lib
+subdirectories. The header files in the include subdirectory can be seen
+as the API of libsgutils and are commented with that in mind. The SCSI
+pass-through code for the supported operating systems is found in the lib
+subdirectory with names like sg_pt_linux.c and sg_pt_win32.c .
All the utilities in the src subdirectory have "man" pages that are
placed in the doc subdirectory. There is also a sg3_utils (8) man page that
@@ -160,12 +147,19 @@ may require packages containing those utilities to be installed. The
libtool utility is also required. Naturally a C compiler is required
and due to the vagaries of libtool a C++ compiler also.
+The "./configure" takes many command line options with the defaults
+being usually sufficient to start with. One quirk is that the location
+of the installation is under the /usr/local directory. So the sg_inq
+utility will be installed at /usr/local/bin/sg_inq . This is controlled
+by the "--prefix=<directory>" option which defaults to
+"--prefix=/usr/local". As an example to install the executables in /usr/bin
+and disable the creation of the shared library (libsgutils<num>.so) this
+invocation could be used: "./configure --prefix=/usr --disable-shared".
+
The C code in this package is written for portability rather than speed.
It assumes a level of C99 compliance and favours POSIX system and library
calls over OS specific calls.
-More generic build information can be found in the INSTALL file.
-
In Linux there are package build files for "rpm" based and for "deb" based
systems. The 'sg3_utils.spec' file in the main directory can be used like
this: 'rpmbuild -ba sg3_utils.spec' in a rpmbuild tree SPECS directory.
@@ -218,8 +212,8 @@ top level build infrastructure. Linux binary distributions of the sg3_utils
package (e.g. "rpm" and debian packages) typically contain the shared
library, the utilities found in the 'src' subdirectory, their associated man
pages and some documentation files (e.g. README, INSTALL, CREDITS, COPYING
-and COVERAGE). See the INSTALL file for instructions about building and
-installing from a source "tarball".
+and COVERAGE). See the INSTALL file for generic instructions about building
+with autotools (e.g. ./configure ).
Man pages can be read (without building and installing the package) by
going to the 'doc' subdirectory and executing something like this:
@@ -364,4 +358,4 @@ See http://sg.danny.cz/sg/tools.html
Doug Gilbert
-31st March 2010
+8th April 2010
diff --git a/README.freebsd b/README.freebsd
index 3a178615..d0da5709 100644
--- a/README.freebsd
+++ b/README.freebsd
@@ -61,41 +61,46 @@ http://sg.danny.cz/sg/sg3_utils.html .
A copy of the "sg3_utils.html" file is in the "doc" subdirectory.
-See the INSTALL file (at the end) for instructions on how to build
-sg3_utils on FreeBSD. If the "./configure ; make" sequence fails, try
-running "./autogen.sh" first. Some man pages have examples which use
-linux device names which hopefully will not confuse the FreeBSD users.
+The executables and library can be built from the source code in
+the tarball and installed with the familiar
+"./configure ; make ; make install" sequence. If this fails try
+running the "./autogen.sh" script prior to that sequence. There
+are generic instruction on configure and friend in the INSTALL file.
+
+Some man pages have examples which use linux device names which
+hopefully will not confuse the FreeBSD users.
+
+Device naming
+=============
+In FreeBSD disks have block names like '/dev/da0' with a corresponding
+pass-through device name like '/dev/pass0'. Use this command
+"camcontrol devlist" to see that SCSI devices available.
Details
=======
-The ported utilities listed above, all use SCSI command functions
-declared in sg_cmds_basic.h and sg_cmds_extra.h . Those SCSI command
-functions are implemented in the corresponding ".c" files. The ".c"
-files pass SCSI commands to the host operating system via
-an interface declared in sg_pt.h . There are currently four
-implementations of that interface depending on the host operating
-system:
+Most of the ported utilities listed above use SCSI command functions
+declared in sg_cmds_*.h headers . Those SCSI command functions are
+implemented in the corresponding ".c" files. The ".c" files pass SCSI
+commands to the host operating system via an interface declared in sg_pt.h .
+There are currently five implementations of that interface depending on
+the host operating system:
- sg_pt_linux.c
- sg_pt_freebsd.c
- sg_pt_osf1.c [Tru64]
- sg_pt_win32.c
+ - sg_pt_solaris.c
-The sg_pt_freebsd.c file uses the FreeBSD CAM SCSI pass through
-mechanism. Hence only FreeBSD device nodes that support CAM can
-be used. These can be viewed with the "camcontrol devlist"
-command. To access ATAPI devices (e.g. ATAPI DVD drives) the
-kernel may need to be configured with the "atapicam" device.
-
-Disks is FreeBSD have names like '/dev/da0' while the corresponding
-pass-through device may be '/dev/pass0'.
+The sg_pt_freebsd.c file uses the FreeBSD CAM SCSI pass through mechanism.
+Hence only FreeBSD device nodes that support CAM can be used. These can be
+viewed with the "camcontrol devlist" command. To access ATAPI devices (e.g.
+ATAPI DVD drives) the kernel may need to be configured with the "atapicam"
+device.
-At the present time these utilities have been lightly tested on a
-FreeBSD version 7.0 system with some SCSI disks, a SCSI tape
-drive and an ATAPI CD drive.
+FreeBSD 8.0 is the most recent version of FreeBSD tested with these
+utilities.
-See the FreeBSD section in the INSTALL file for install directions.
Doug Gilbert
-20th September 2009
+10th April 2010
diff --git a/README.solaris b/README.solaris
index 0e1a9925..75f30cac 100644
--- a/README.solaris
+++ b/README.solaris
@@ -1,9 +1,12 @@
Introduction
============
-The Solaris port of sg3_utils contains those utilities that are _not_
-specific to Linux. In some cases a utility could be ported but
-requires more work. An example is sg_dd which needs more work
-beyond the SCSI command pass through mechanism.
+The Solaris port of sg3_utils contains those utilities that are
+_not_ specific to Linux.
+
+The dd variants from the sg3_utils package (e.g. sg_dd) rely on too many
+Linux idiosyncracies to be easily ported. A new package called 'ddpt'
+contains a utility with similar functionality to sg_dd and is available
+for Solaris.
Supported Utilities
===================
@@ -56,31 +59,78 @@ http://sg.danny.cz/sg/sg3_utils.html .
A copy of the "sg3_utils.html" file is in the "doc" subdirectory.
-See the INSTALL file (at the end) for instructions on how to build
-sg3_utils on FreeBSD. Some man pages have examples which use linux
-device names which hopefully will not confuse the FreeBSD users.
+The executables and library can be built from the source code in
+the tarball and installed with the familiar
+"./configure ; make ; make install" sequence. If this fails try
+running the "./autogen.sh" script prior to that sequence. There
+are generic instruction on configure and friend in the INSTALL file.
+
+Some man pages have examples which use linux device names which
+hopefully will not confuse the Solaris users.
+
+Device naming
+=============
+In Solaris, SCSI device names below the '/dev' directory have a
+form like: c5t4d3s2 where the number following "c" is the controller
+(HBA) number, the number following "t" is the target number (from
+the SCSI parallel interface days) and the number following "d" is
+the LUN. Following the "s" is the slice number which is related to
+a partition and by convention "s2" is the whole disk.
+
+OpenSolaris also has a c5t4d3p2 form where the number following
+the "p" is the partition number apart from "p0" which is the whole
+disk. So a whole disk may be referred to as either:
+ - c5t4d3
+ - c5t4d3s2
+ - c5t4d3p0
+
+And these device names are duplicated in the /dev/dsk and /dev/rdsk
+directories. The former is the block device name and the latter
+is for "raw" (or char device) access which is what sg3_utils needs.
+So in openSolaris something of the form:
+ sg_inq /dev/rdsk/c5t4d3p0
+should work. If it doesn't add a '-vvv' option. If that is attempted
+on the /dev/dsk/c5t4d3p0 variant an inappropriate ioctl for device
+error will result.
+The device names within the /dev directory are typically symbolic
+links to much longer topological names in the /device directory.
+
+In Solaris cd/dvd/bd players seem to be treated as disks and so are
+found in the /dev/rdsk directory. Tape drives appear in the /dev/rmt
+directory.
+
+There is also a sgen (SCSI generic) driver which by default does not
+attach to any device. See the /kernel/drv/sgen.conf file to control
+what is attached. Any attached device will have a device name of
+the form /dev/scsi/c5t4d3 .
+
+Listing available SCSI devices in Solaris seems to be a challenge.
+"Use the 'format' command" advice works but seems a very dangerous
+way to list devices. [It does prompt again before doing any damage.]
+'devfsadm -Cv' cleans out the clutter in the /dev/rdsk directory,
+only leaving what is "live". The "cfgadm -v" command looks promising.
Details
=======
The ported utilities listed above, all use SCSI command functions
declared in sg_cmds_basic.h and sg_cmds_extra.h . Those SCSI command
functions are implemented in the corresponding ".c" files. The ".c"
-files pass SCSI commands to the host operating system via
-an interface declared in sg_pt.h . There are currently four
-implementations of that interface depending on the host operating
-system:
+files pass SCSI commands to the host operating system via an interface
+declared in sg_pt.h . There are currently five implementations of that
+interface depending on the host operating system:
- sg_pt_linux.c
- sg_pt_freebsd.c
- sg_pt_osf1.c [Tru64]
- sg_pt_solaris.c
- sg_pt_win32.c
-The sg_pt_solaris.c file uses the "uscsi" SCSI pass through
-mechanism.
-
-See the Solaris section in the INSTALL file for install directions.
+The sg_pt_solaris.c file uses the "uscsi" SCSI pass through mechanism. There
+seems to be no corresponding ATA pass through and recent SATA disks do not
+seem to have a SAT layer in front of them (within Solaris). If SAT is
+present (perhaps externally or within a HBA) then that would allow SATA
+disks to accept SCSI commands including the SCSI ATA PASS THROUGH commands.
Doug Gilbert
-20th September 2009
+10th April 2010
diff --git a/README.tru64 b/README.tru64
index e531f75b..9c9bea04 100644
--- a/README.tru64
+++ b/README.tru64
@@ -55,29 +55,31 @@ section 8). An overview of sg3_utils can be found at:
http://sg.danny.cz/sg/sg3_utils.html .
A copy of the "sg3_utils.html" file is in the "doc" subdirectory.
+This package uses autotools infrastructure with the now common
+"./configure ; make ; make install" sequence needed to build and install
+from the source found in the tarball. If the "./configure" sequence
+fails try using the ./autogen.sh prior to that sequence.
-See the INSTALL file (at the end) for instructions on how to build
-sg3_utils on Tru64. Files that are Tru64 specific use the "osf1"
-suffix (apart from this one). Some man pages have examples which
-use linux device names which hopefully will not confuse the Tru64 users.
+Some man pages have examples which use linux device names which hopefully
+will not confuse Tru64 users.
Details
=======
-The ported utilities listed above, all use SCSI command functions
-declared in sg_cmds_basic.h and sg_cmds_extra.h . Those SCSI command
-functions are implemented in the corresponding ".c" files. The ".c"
-files pass SCSI commands to the host operating system via
-an interface declared in sg_pt.h . There are currently four
-implementations of that interface depending on the host operating
+Most of the ported utilities listed above use SCSI command functions
+declared in sg_cmds_*.h headers . Those SCSI command functions are
+implemented in the corresponding ".c" files. The ".c" files pass SCSI
+commands to the host operating system via an interface declared in sg_pt.h .
+There are currently five implementations of that interface depending on
+the host operating system:
system:
- sg_pt_linux.c
- sg_pt_osf1.c [Tru64]
- sg_pt_freebsd.c
+ - sg_pt_solaris.c
- sg_pt_win32.c
-The sg_pt_osf1.c file uses the Tru64 CAM SCSI pass through
-mechanism.
+The sg_pt_osf1.c file uses the Tru64 CAM SCSI pass through mechanism.
Tru64 does not have general library support for "long" options
(e.g. "--verbose") which are used extensively by most of the
@@ -88,4 +90,4 @@ subdirectory. Currently only the Tru64 port uses it.
Doug Gilbert
-20th September 2009
+10th April 2010
diff --git a/README.win32 b/README.win32
index 21cef930..5df272a9 100644
--- a/README.win32
+++ b/README.win32
@@ -72,10 +72,8 @@ file. An overview of sg3_utils can be found at:
http://sg.danny.cz/sg/sg3_utils.html .
A copy of the "sg3_utils.html" file is in the "doc" subdirectory.
-
-See the INSTALL file (towards the end) for instructions on how to build
-sg3_utils on Windows operating systems. Some man pages have examples which
-use linux device names which hopefully will not confuse Windows users.
+Some man pages have examples which use linux device names which hopefully
+will not confuse Windows users.
Two pass-through variants
=========================
@@ -106,18 +104,19 @@ prior to the 'make' call.
Details
=======
-The ported utilities listed above, all use SCSI command functions declared in
-sg_cmds_basic.h and sg_cmds_extra.h . Those SCSI command functions are
-implemented in the corresponding ".c" files. The ".c" files pass SCSI commands
-to the host operating system via an interface declared in sg_pt.h . There are
-currently four implementations of that interface depending on the host
-operating system:
+Most of the ported utilities listed above use SCSI command functions
+declared in sg_cmds_*.h headers . Those SCSI command functions are
+implemented in the corresponding ".c" files. The ".c" files pass SCSI
+commands to the host operating system via an interface declared in sg_pt.h .
+There are currently five implementations of that interface depending on
+the host operating system:
- sg_pt_linux.c
- sg_pt_freebsd.c
- sg_pt_osf1.c [Tru64]
+ - sg_pt_solaris.c
- sg_pt_win32.c
-The ASPI32 interface which requires a dll from Adaptec ia not supported.
+The ASPI32 interface which requires a dll from Adaptec is not supported.
The sg_scan utility is a special version for Windows and it attempts to show
the various available storage device names, one per line. Here is an example
@@ -173,11 +172,15 @@ on Windows setting the SG_LIB_MINGW define may help.
Build environments
==================
-This package has various Makefiles so that these utilities can be built
-in either a cygwin and MinGW environment, called Makefile.win32 and
-Makefile.mingw respectively. The executables produced are console
-applications that can be executed in either a cygwin, MSYS or "cmd" shell.
-See the INSTALL file for more details.
+This package uses autotools infrastructure with the now common
+"./configure ; make ; make install" sequence needed to build and install
+from the source found in the tarball. Two Windows environments for building
+Unix code are supported: cygwin and MinGW. If the "./configure" sequence
+fails try using the ./autogen.sh prior to that sequence. The executables
+produced are console applications that can be executed in either a cygwin,
+MSYS or "cmd" shell. Various build options are available by giving
+command line options to "./configure", see the INSTALL file for generic
+information about the build infrastructure.
Binary and Text files
=====================
@@ -192,4 +195,4 @@ mode" with the setmode() Windows command.
Doug Gilbert
-20th September 2009
+10th April 2010
diff --git a/configure.ac b/configure.ac
index 1cf17671..5c7314f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT(sg3_utils, 1.29, dgilbert@interlog.com)
+AC_INIT(sg3_utils, 1.30, dgilbert@interlog.com)
AM_INIT_AUTOMAKE
AM_MAINTAINER_MODE
diff --git a/debian/changelog b/debian/changelog
index 7f4f30cf..1fb5bc3d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+sg3-utils (1.30-0.1) unstable; urgency=low
+
+ * New upstream version
+
+ -- Doug Gilbert <dgilbert@interlog.com> Thu, 08 Apr 2010 11:00:00 -0400
+
sg3-utils (1.29-0.1) unstable; urgency=low
* New upstream version
diff --git a/doc/sg_format.8 b/doc/sg_format.8
index ec18aad8..66c59e12 100644
--- a/doc/sg_format.8
+++ b/doc/sg_format.8
@@ -38,7 +38,7 @@ the response to a READ CAPACITY command. The reason for this double check is
to detect a "format corrupt" state (see NOTES section). This usage will not
modify the disk.
.PP
-When this utility is used with the "--format" (or "-F") option it will attempt
+When this utility is used with the "\-\-format" (or "\-F") option it will attempt
to format the given DEVICE. There is a 10 second pause during which time the
user is invited (twice 5 seconds apart) to abort sg_format. This occurs just
prior the SCSI FORMAT UNIT command being issued. See the NOTES section for
@@ -130,8 +130,8 @@ sets the FMTPINFO field in the FORMAT UNIT cdb to a value between 0 and 3.
The default value is 0. The FMTPINFO field from SBC\-3 revision 16 is a 2
bit field (bits 7 and 6 of byte 1 in the cdb). Prior to that it was a single
bit field (bit 7 of byte 1 in the cdb) and there was an accompanying bit
-called RTO_REQ (bit 6 of byte 1 in the cdb). The deprecated options "--pinfo"
-and "--rto-req" represent the older usage. This option should be used in
+called RTO_REQ (bit 6 of byte 1 in the cdb). The deprecated options "\-\-pinfo"
+and "\-\-rto\-req" represent the older usage. This option should be used in
their place. This option has no action unless \fI\-\-format\fR is given.
.TP
\fB\-F\fR, \fB\-\-format\fR
@@ -154,7 +154,7 @@ allow for 64 bit logical block addresses. Specifically this option sets
the "longlba" flag in the MODE SENSE (10) command and uses READ CAPACITY (16)
rather than READ CAPACITY (10). This option does not set the LONGLIST bit
in the FORMAT UNIT command. The LONGLIST bit is set as required depending
-other parameters (e.g. when '--pie=PIE' is greater than zero).
+other parameters (e.g. when '\-\-pie=PIE' is greater than zero).
.TP
\fB\-P\fR, \fB\-\-pfu\fR=\fIPFU\fR
sets the "Protection Field Usage" field in the parameter block associated
diff --git a/doc/sg_read_block_limits.8 b/doc/sg_read_block_limits.8
index 18e73af3..cc07132e 100644
--- a/doc/sg_read_block_limits.8
+++ b/doc/sg_read_block_limits.8
@@ -1,6 +1,6 @@
.TH SG_READ_BLOCK_LIMITS "8" "June 2009" "sg3_utils\-1.28" SG3_UTILS
.SH NAME
-sg_read_block limits \- sends a SCSI READ BLOCK LIMITS command
+sg_read_block, limits \- sends a SCSI READ BLOCK LIMITS command
.SH SYNOPSIS
.B sg_read_block_limits
[\fI\-\-help\fR] [\fI\-\-hex\fR] [\fI\-\-raw\fR] [\fI\-\-verbose\fR]
diff --git a/doc/sg_readcap.8 b/doc/sg_readcap.8
index fb577c4d..c7c463fc 100644
--- a/doc/sg_readcap.8
+++ b/doc/sg_readcap.8
@@ -75,7 +75,7 @@ is used on a device whose size is too large then a last block address
of 0xffffffff is returned (if the device complies with SBC\-2).
.TP
\fB\-\-16\fR
-Use the 16 byte cdb variant of the READ CAPACITY command. See the '--long'
+Use the 16 byte cdb variant of the READ CAPACITY command. See the '\-\-long'
option.
.TP
\fB\-O\fR, \fB\-\-old\fR
diff --git a/doc/sg_wr_mode.8 b/doc/sg_wr_mode.8
index e115504c..c53d0759 100644
--- a/doc/sg_wr_mode.8
+++ b/doc/sg_wr_mode.8
@@ -130,7 +130,7 @@ modify parts of the mode page which are changeable. The device should
do that and if some part is not changeable then it should
report: "Invalid field in parameter list".
.PP
-Some mode pages are not savable. If so an attempt to use the \fI\-\-save\fR
+Some mode pages are not saveable. If so an attempt to use the \fI\-\-save\fR
option should cause an error to be reported from the device: "Illegal field
in cdb".
.PP
diff --git a/doc/sginfo.8 b/doc/sginfo.8
index 552d15e3..70ae824e 100644
--- a/doc/sginfo.8
+++ b/doc/sginfo.8
@@ -156,7 +156,7 @@ shown (in hex).
.TP
\fB\-u\fR \fIPN\fR[,\fISPN\fR]
Display information from mode page number \fIPN\fR (and optionally \fISPN\fR)
-in hex form. \fIPN\f is a mode page number in a decimal number from 0 to 63
+in hex form. \fIPN\fR is a mode page number in a decimal number from 0 to 63
inclusive. \fISPN\fR is the mode subpage number and is assumed to be 0 if
not given. \fISPN\fR is a decimal number from 1 to 255 inclusive. A page
number of 63 returns all pages supported by the device in ascending order
diff --git a/lib/sg_lib_data.c b/lib/sg_lib_data.c
index 5d471677..70b62350 100644
--- a/lib/sg_lib_data.c
+++ b/lib/sg_lib_data.c
@@ -15,7 +15,7 @@
#endif
-const char * sg_lib_version_str = "1.58 20100329"; /* spc-4 rev 23 */
+const char * sg_lib_version_str = "1.59 20100415"; /* spc-4 rev 24 */
struct sg_lib_value_name_t sg_lib_normal_opcodes[] = {
{0, 0, "Test Unit Ready"},
@@ -793,6 +793,10 @@ struct sg_lib_asc_ascq_t sg_lib_asc_ascq[] =
{0x53,0x02,"Medium removal prevented"},
{0x53,0x03,"Medium removal prevented by data transfer element"},
{0x53,0x04,"Medium thread or unthread failure"},
+ {0x53,0x05,"Volume identifier invalid"},
+ {0x53,0x06,"Volume identifier missing"},
+ {0x53,0x07,"Duplicate volume identifier"},
+ {0x53,0x08,"Element status unknown"},
{0x54,0x00,"SCSI to host system interface failure"},
{0x55,0x00,"System resource failure"},
{0x55,0x01,"System buffer full"},
diff --git a/sg3_utils.spec b/sg3_utils.spec
index 020947a6..86dffaa2 100644
--- a/sg3_utils.spec
+++ b/sg3_utils.spec
@@ -1,6 +1,6 @@
Summary: Utilities for devices that use SCSI command sets
Name: sg3_utils
-Version: 1.29
+Version: 1.30
# Release: 1%{?dist}
Release: 1
License: GPL
@@ -79,6 +79,10 @@ fi
%{_libdir}/*.la
%changelog
+* Thu Apr 08 2010 - dgilbert at interlog dot com
+- track t10 changes
+ * sg3_utils-1.30
+
* Wed Mar 31 2010 - dgilbert at interlog dot com
- track t10 changes
* sg3_utils-1.29
diff --git a/src/sg_inq.c b/src/sg_inq.c
index 7b1d3eeb..012f2de7 100644
--- a/src/sg_inq.c
+++ b/src/sg_inq.c
@@ -66,7 +66,7 @@
* information [MAINTENANCE IN, service action = 0xc]; see sg_opcodes.
*/
-static char * version_str = "0.88 20100331"; /* SPC-4 rev 23 */
+static char * version_str = "0.89 20100416"; /* SPC-4 rev 24 */
#define VPD_SUPPORTED_VPDS 0x0
diff --git a/src/sg_inq_data.c b/src/sg_inq_data.c
index 16f7a526..1b31fd61 100644
--- a/src/sg_inq_data.c
+++ b/src/sg_inq_data.c
@@ -39,7 +39,7 @@ struct sg_version_descriptor {
const char * name;
};
-/* table from SPC-4 revision 23 [sorted numerically (from Annex D.8)] */
+/* table from SPC-4 revision 24 [sorted numerically (from Annex D.8)] */
/* Can also be obtained from : http://www.t10.org/lists/stds.txt */
struct sg_version_descriptor sg_version_descriptor_arr[] = {
{0x0, "Version Descriptor not supported or No standard identified"},
@@ -60,7 +60,9 @@ struct sg_version_descriptor sg_version_descriptor_arr[] = {
{0x87, "SAM-4 T10/1683-D revision 13"},
{0x8b, "SAM-4 T10/1683-D revision 14"},
{0x90, "SAM-4 ANSI INCITS 447-2008"},
+ {0x92, "SAM-4 ISO/IEC 14776-414"},
{0xa0, "SAM-5 (no version claimed)"},
+ {0xa2, "SAM-5 T10/2104-D revision 4"},
{0x120, "SPC (no version claimed)"},
{0x13b, "SPC T10/0995-D revision 11a"},
{0x13c, "SPC ANSI INCITS 301-1997"},
@@ -122,6 +124,7 @@ struct sg_version_descriptor sg_version_descriptor_arr[] = {
{0x30f, "SPC-3 T10/1416-D revision 22"},
{0x312, "SPC-3 T10/1416-D revision 23"},
{0x314, "SPC-3 ANSI INCITS 408-2005"},
+ {0x316, "SPC-3 ISO/IEC 14776-453"},
{0x320, "SBC-2 (no version claimed)"},
{0x322, "SBC-2 T10/1417-D revision 5a"},
{0x324, "SBC-2 T10/1417-D revision 15"},
@@ -169,6 +172,7 @@ struct sg_version_descriptor sg_version_descriptor_arr[] = {
{0x460, "SPC-4 (no version claimed)"},
{0x461, "SPC-4 T10/1731-D revision 16"},
{0x462, "SPC-4 T10/1731-D revision 18"},
+ {0x463, "SPC-4 T10/1731-D revision 23"},
{0x480, "SMC-3 (no version claimed)"},
{0x4a0, "ADC-2 (no version claimed)"},
{0x4a7, "ADC-2 T10/1741-D revision 7"},
@@ -235,6 +239,7 @@ struct sg_version_descriptor sg_version_descriptor_arr[] = {
{0xa1c, "FCP-3 ISO/IEC 14776-223"},
{0xa20, "ADT-2 (no version claimed)"},
{0xa22, "ADT-2 T10/1742-D revision 06"},
+ {0xa27, "ADT-2 T10/1742-D revision 08"},
{0xa40, "FCP-4 (no version claimed)"},
{0xa42, "FCP-4 T10/1828-D revision 01"},
{0xaa0, "SPI (no version claimed)"},
@@ -331,9 +336,11 @@ struct sg_version_descriptor sg_version_descriptor_arr[] = {
{0xec0, "FC-SP-2 (no version claimed)"},
{0xee0, "FC-FS-3 (no version claimed)"},
{0xee2, "FC-FS-3 T11/1861-D revision 0.9"},
+ {0xee7, "FC-FS-3 T11/1861-D revision 1.0"},
{0xf00, "FC-LS-2 (no version claimed)"},
- {0xf03, "FC-LS-2 T11/2103D revision 2.11"},
+ {0xf03, "FC-LS-2 T11/2103-D revision 2.11"},
{0xf20, "FC-PI-5 (no version claimed)"},
+ {0xf27, "FC-PI-5 T11/2118-D revision 2.00"},
{0x12a0, "FC-SCM (no version claimed)"},
{0x12a3, "FC-SCM T11/1824DT revision 1.0"},
{0x12c0, "FC-DA-2 (no version claimed)"},
@@ -378,6 +385,7 @@ struct sg_version_descriptor sg_version_descriptor_arr[] = {
{0x1730, "USB Mass Storage Class Bulk-Only Transport, Revision 1.0"},
{0x1740, "UAS (no version claimed)"}, /* USB attached SCSI */
{0x1743, "UAS T10/2095-D revision 02"},
+ {0x1747, "UAS T10/2095-D revision 04"},
{0x1ea0, "SAT (no version claimed)"},
{0x1ea7, "SAT T10/1711-D rev 8"},
{0x1eab, "SAT T10/1711-D rev 9"},
@@ -387,7 +395,7 @@ struct sg_version_descriptor sg_version_descriptor_arr[] = {
{0x1ec8, "SAT-2 T10/1826-D revision 09"},
{0x1ee0, "SAT-3 (no version claimed)"},
{0x20a0, "SPL (no version claimed)"},
- {0x20a3, "SPL T10/2124D revision 6a"},
+ {0x20a3, "SPL T10/2124-D revision 6a"},
{0xffc0, "IEEE 1667 (no version claimed)"},
{0xffc1, "IEEE 1667-2006"},
{0xffc2, "IEEE 1667-2009"},
diff --git a/src/sg_logs.c b/src/sg_logs.c
index 770c542a..25079998 100644
--- a/src/sg_logs.c
+++ b/src/sg_logs.c
@@ -25,7 +25,7 @@
*/
-static char * version_str = "0.95 20100331"; /* SPC-4 revision 23 */
+static char * version_str = "0.95 20100423"; /* SPC-4 revision 23 */
#define MX_ALLOC_LEN (0xfffc)
#define SHORT_RESP_LEN 128
@@ -1410,7 +1410,7 @@ static const char * self_test_result[] = {
"aborted by SEND DIAGNOSTIC",
"aborted other than by SEND DIAGNOSTIC",
"unknown error, unable to complete",
- "self test completed with failure in test segment (which one unkown)",
+ "self test completed with failure in test segment (which one unknown)",
"first segment in self test failed",
"second segment in self test failed",
"another segment in self test failed",
@@ -1656,7 +1656,7 @@ show_ie_page(unsigned char * resp, int len, int show_pcb, int full)
printf("\n Threshold temperature = %d C [IBM "
"extension]", ucp[7]);
else
- printf("\n Treshold temperature = <not "
+ printf("\n Threshold temperature = <not "
"available>");
}
}
diff --git a/src/sg_read_long.c b/src/sg_read_long.c
index 5359fcb4..6aebf70b 100644
--- a/src/sg_read_long.c
+++ b/src/sg_read_long.c
@@ -16,7 +16,7 @@
#include "sg_cmds_extra.h"
/* A utility program for the Linux OS SCSI subsystem.
- * Copyright (C) 2004-2008 D. Gilbert
+ * Copyright (C) 2004-2010 D. Gilbert
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
@@ -29,7 +29,7 @@
the sector data and the ECC bytes.
*/
-static char * version_str = "1.16 20080510";
+static char * version_str = "1.17 20100424";
#define MAX_XFER_LEN 10000
@@ -45,6 +45,7 @@ static struct option long_options[] = {
{"lba", 1, 0, 'l'},
{"out", 1, 0, 'o'},
{"pblock", 0, 0, 'p'},
+ {"readonly", 0, 0, 'r'},
{"verbose", 0, 0, 'v'},
{"version", 0, 0, 'V'},
{"xfer_len", 1, 0, 'x'},
@@ -57,9 +58,9 @@ usage()
fprintf(stderr, "Usage: "
"sg_read_long [--16] [--correct] [--help] [--lba=LBA] "
"[--out=OF]\n"
- " [--pblock] [--verbose] [--version] "
- "[--xfer_len=BTL]\n"
- " DEVICE\n"
+ " [--pblock] [--readonly] [--verbose] "
+ "[--version]\n"
+ " [--xfer_len=BTL] DEVICE\n"
" where:\n"
" --16|-S do READ LONG(16) (default: "
"READ LONG(10))\n"
@@ -70,6 +71,8 @@ usage()
" (default: 0)\n"
" --out=OF|-o OF output in binary to file named OF\n"
" --pblock|-p fetch physical block containing LBA\n"
+ " --readonly|-r open DEVICE read-only (def: open it "
+ "read-write)\n"
" --verbose|-v increase verbosity\n"
" --version|-V print version string and"
" exit\n"
@@ -140,6 +143,7 @@ main(int argc, char * argv[])
int do_16 = 0;
int pblock = 0;
uint64_t llba = 0;
+ int readonly = 0;
int verbose = 0;
int64_t ll;
int got_stdout;
@@ -152,7 +156,7 @@ main(int argc, char * argv[])
while (1) {
int option_index = 0;
- c = getopt_long(argc, argv, "chl:o:pSvVx:", long_options,
+ c = getopt_long(argc, argv, "chl:o:prSvVx:", long_options,
&option_index);
if (c == -1)
break;
@@ -179,6 +183,9 @@ main(int argc, char * argv[])
case 'p':
pblock = 1;
break;
+ case 'r':
+ ++readonly;
+ break;
case 'S':
do_16 = 1;
break;
@@ -226,7 +233,7 @@ main(int argc, char * argv[])
usage();
return SG_LIB_SYNTAX_ERROR;
}
- sg_fd = sg_cmds_open_device(device_name, 0 /* rw */, verbose);
+ sg_fd = sg_cmds_open_device(device_name, readonly, verbose);
if (sg_fd < 0) {
fprintf(stderr, ME "open error: %s: %s\n", device_name,
safe_strerror(-sg_fd));
diff --git a/src/sg_test_rwbuf.c b/src/sg_test_rwbuf.c
index 031d579f..4e93398c 100644
--- a/src/sg_test_rwbuf.c
+++ b/src/sg_test_rwbuf.c
@@ -39,7 +39,7 @@
#include "sg_io_linux.h"
-static char * version_str = "1.07 20080318";
+static char * version_str = "1.07 20100423";
#define BPI (signed)(sizeof(int))
@@ -520,6 +520,6 @@ err_out:
if ((0 == ret) && (! do_quick))
printf ("Success\n");
else if (times > 1)
- printf ("Failed after %d succesful cycles\n", k);
+ printf ("Failed after %d successful cycles\n", k);
return (ret >= 0) ? ret : SG_LIB_CAT_OTHER;
}
diff --git a/src/sg_wr_mode.c b/src/sg_wr_mode.c
index b1d94e94..fc7e48f3 100644
--- a/src/sg_wr_mode.c
+++ b/src/sg_wr_mode.c
@@ -24,7 +24,7 @@
* mode page on the given device.
*/
-static char * version_str = "1.10 20100312";
+static char * version_str = "1.10 20100423";
#define ME "sg_wr_mode: "
@@ -497,7 +497,7 @@ int main(int argc, char * argv[])
if (! force) {
if ((! (ref_md[off] & 0x80)) && save) {
fprintf(stderr, "PS bit in existing mode page indicates that "
- "it is not savable\n but '--save' option given\n");
+ "it is not saveable\n but '--save' option given\n");
goto err_out;
}
read_in[0] &= 0x7f; /* mask out PS bit, reserved in mode select */