aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--README2
-rw-r--r--debian/changelog2
-rw-r--r--doc/scsi_start.840
-rw-r--r--doc/scsi_stop.841
-rw-r--r--doc/sg3_utils.87
-rw-r--r--lib/sg_lib_data.c4
-rw-r--r--scripts/README8
-rwxr-xr-xscripts/scsi_satl18
-rwxr-xr-xscripts/scsi_start17
-rwxr-xr-xscripts/scsi_stop17
-rw-r--r--sg3_utils.spec4
-rw-r--r--src/sg_inq.c5
-rw-r--r--src/sg_inq_data.c9
-rw-r--r--src/sg_logs.c31
-rw-r--r--src/sg_modes.c3
-rw-r--r--src/sg_vpd.c10
17 files changed, 171 insertions, 51 deletions
diff --git a/ChangeLog b/ChangeLog
index 589d65ad..2355f4bd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,7 @@ 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.28 [20090824] [svn: r290]
+Changelog for sg3_utils-1.28 [20090827] [svn: r291]
- sg_unmap: new utility for thin provisioning
- add examples/sg_unmap_example.txt
- sg_read_block_limits: new utility for tape drives
@@ -22,7 +22,7 @@ Changelog for sg3_utils-1.28 [20090824] [svn: r290]
- add progress indication sense data descriptor (0xa)
- change SG3_UTILS_* constants to SG_LIB_*
- decode service actions within persistent reserve in/out
- - sync with spc4r20
+ - sync with spc4r21
- sg_pt_linux: fix check condition but empty sense buffer; occurred
when sg v3 node used and /usr/include/linux/bsg.h visible
- scripts/sas_disk_blink: moved from this package to sdparm
diff --git a/README b/README
index 2b4833a2..45a70047 100644
--- a/README
+++ b/README
@@ -338,4 +338,4 @@ See http://sg.danny.cz/sg/tools.html
Doug Gilbert
-24th August 2009
+27th August 2009
diff --git a/debian/changelog b/debian/changelog
index 7b6a633e..ac32f681 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,7 @@ sg3-utils (1.28-0.1) unstable; urgency=low
* New upstream version
- -- Doug Gilbert <dgilbert@interlog.com> Mon, 28 Aug 2009 19:00:00 -0400
+ -- Doug Gilbert <dgilbert@interlog.com> Thu, 27 Aug 2009 13:00:00 -0400
sg3-utils (1.27-0.1) unstable; urgency=low
diff --git a/doc/scsi_start.8 b/doc/scsi_start.8
new file mode 100644
index 00000000..20adbb4c
--- /dev/null
+++ b/doc/scsi_start.8
@@ -0,0 +1,40 @@
+.TH SCSI_START "8" "August 2009" "sg3_utils\-1.28" SG3_UTILS
+.SH NAME
+scsi_start \- start one or more SCSI disks
+.SH SYNOPSIS
+.B scsi_start
+[\fI\-\-help\fR] [\fI\-\-verbose\fR] [\fI\-\-wait\fR]
+\fIDEVICE\fR [\fIDEVICE\fR]*
+.SH DESCRIPTION
+.\" Add any additional description here
+.PP
+This bourne shell script calls the sg_start utility on each given
+\fIDEVICE\fR. The purpose is to spin up (start) each given \fIDEVICE\fR.
+.SH OPTIONS
+Arguments to long options are mandatory for short options as well.
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+print out the usage message then exit.
+.TP
+\fB\-v\fR, \fB\-\-verbose\fR
+increase level or verbosity.
+.TP
+\fB\-w\fR, \fB\-\-wait\fR
+wait for the spin up (start) on each given \fIDEVICE\fR to complete.
+The default action is to do each start in immediate mode.
+.SH NOTES
+If a large number of disks are spun up at the same time (i.e. without
+the \fI\-\-wait\fR option) then the power supply may be overloaded.
+.SH EXIT STATUS
+The exit status of this script is 0 when it is successful. Otherwise the
+exit status is that of the last sg_start utility called. See
+the sg3_utils(8) man page.
+.SH AUTHORS
+Written by D. Gilbert
+.SH COPYRIGHT
+Copyright \(co 2009 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 sg_start (sg3_utils)
diff --git a/doc/scsi_stop.8 b/doc/scsi_stop.8
new file mode 100644
index 00000000..ae773508
--- /dev/null
+++ b/doc/scsi_stop.8
@@ -0,0 +1,41 @@
+.TH SCSI_STOP "8" "August 2009" "sg3_utils\-1.28" SG3_UTILS
+.SH NAME
+scsi_stop \- stop (spin down) one or more SCSI disks
+.SH SYNOPSIS
+.B scsi_stop
+[\fI\-\-help\fR] [\fI\-\-verbose\fR] [\fI\-\-wait\fR]
+\fIDEVICE\fR [\fIDEVICE\fR]*
+.SH DESCRIPTION
+.\" Add any additional description here
+.PP
+This bourne shell script calls the sg_start utility on each given
+\fIDEVICE\fR. The purpose is to spin down (stop) each given \fIDEVICE\fR.
+.SH OPTIONS
+Arguments to long options are mandatory for short options as well.
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+print out the usage message then exit.
+.TP
+\fB\-v\fR, \fB\-\-verbose\fR
+increase level or verbosity.
+.TP
+\fB\-w\fR, \fB\-\-wait\fR
+wait for the spin down (stop) on each given \fIDEVICE\fR to complete.
+The default action is to do each stop in immediate mode.
+.SH NOTES
+The sg_start utility calls the SCSI START STOP UNIT command and can
+either start (spin up) or stop (spin down) a SCSI disk depending
+on the given command line options.
+.SH EXIT STATUS
+The exit status of this script is 0 when it is successful. Otherwise the
+exit status is that of the last sg_start utility called. See
+the sg3_utils(8) man page.
+.SH AUTHORS
+Written by D. Gilbert
+.SH COPYRIGHT
+Copyright \(co 2009 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 sg_start (sg3_utils)
diff --git a/doc/sg3_utils.8 b/doc/sg3_utils.8
index 90dc4c38..78fc9e9e 100644
--- a/doc/sg3_utils.8
+++ b/doc/sg3_utils.8
@@ -1,4 +1,4 @@
-.TH SG3_UTILS "8" "April 2009" "sg3_utils\-1.27" SG3_UTILS
+.TH SG3_UTILS "8" "August 2009" "sg3_utils\-1.28" SG3_UTILS
.SH NAME
sg3_utils \- a package of utilities for sending SCSI commands
.SH SYNOPSIS
@@ -235,11 +235,14 @@ in the C programming language. The second hexadecimal representation is a
trailing "h" or "H" as found in (storage) standards. When hex numbers are
given, multipliers cannot be used. For example the decimal value "256" can
be given as "0x100" or "100h".
+.SH SCRIPTS, EXAMPLES and UTILS
+xxxxxxxxxxxxx
.SH WEB SITE
There is a web page discussing this package at
http://sg.danny.cz/sg/sg3_utils.html .
.SH AUTHORS
-Written by Douglas Gilbert.
+Written by Douglas Gilbert. Some utilities have been contributed, see the
+CREDITS file and individual source files (in the 'src' directory).
.SH "REPORTING BUGS"
Report bugs to <dgilbert at interlog dot com>.
.SH COPYRIGHT
diff --git a/lib/sg_lib_data.c b/lib/sg_lib_data.c
index 90331975..5a0422c8 100644
--- a/lib/sg_lib_data.c
+++ b/lib/sg_lib_data.c
@@ -37,7 +37,7 @@
#endif
-const char * sg_lib_version_str = "1.53 20090824"; /* spc-4 rev 20+ */
+const char * sg_lib_version_str = "1.54 20090826"; /* spc-4 rev 21 */
struct sg_lib_value_name_t sg_lib_normal_opcodes[] = {
{0, 0, "Test Unit Ready"},
@@ -692,6 +692,7 @@ struct sg_lib_asc_ascq_t sg_lib_asc_ascq[] =
{0x38,0x02,"Esn - power management class event"},
{0x38,0x04,"Esn - media class event"},
{0x38,0x06,"Esn - device busy class event"},
+ {0x38,0x07,"Thin provisioning soft threshold reached"},
{0x39,0x00,"Saving parameters not supported"},
{0x3A,0x00,"Medium not present"},
{0x3A,0x01,"Medium not present - tray closed"},
@@ -785,6 +786,7 @@ struct sg_lib_asc_ascq_t sg_lib_asc_ascq[] =
{0x4B,0x04,"Nak received"},
{0x4B,0x05,"Data offset error"},
{0x4B,0x06,"Initiator response timeout"},
+ {0x4B,0x07,"Connection lost"},
{0x4C,0x00,"Logical unit failed self-configuration"},
/*
* ASC 0x4D overridden by an "additional2" array entry
diff --git a/scripts/README b/scripts/README
index 3fc79a32..08ac35c6 100644
--- a/scripts/README
+++ b/scripts/README
@@ -26,11 +26,11 @@ information. Following is a usage summary with a one line description:
- fetch capacity/size information for each <device>
scsi_ready [-h] [-v] <device>+
- check the media ready status on each <device>
- scsi_satl [-h] [-L] [-q] <device>
+ scsi_satl [-h] [-L] [-q] [-v] <device>
- check <device> for SCSI to ATA Translation Layer (SATL)
- scsi_start [-h] [-v] <device>+
+ scsi_start [-h] [-v] [-w] <device>+
- start media (i.e. spin up) in each <device>
- scsi_stop [-h] [-v] <device>+
+ scsi_stop [-h] [-v] [-w] <device>+
- stop media (i.e. spin down) in each <device>
scsi_temperature [-h] [-v] <device>+
- check temperature in each <device>
@@ -43,4 +43,4 @@ script. Since it depends on the sdparm utility it has been moved to
the sdparm package in its scripts directory.
Douglas Gilbert
-15th August 2009
+25th August 2009
diff --git a/scripts/scsi_satl b/scripts/scsi_satl
index 2bbdf195..12b4c10a 100755
--- a/scripts/scsi_satl
+++ b/scripts/scsi_satl
@@ -24,11 +24,12 @@
# This script uses utilities from sg3_utils package (version
# 1.22 or later) and sdparm (version 0.99 or later)
#
-# Douglas Gilbert 20080328
+# Douglas Gilbert 20090815
-quiet=0
log=0
+quiet=0
+verbose=""
file_err=0
inv_opcode=0
@@ -47,10 +48,11 @@ total_err=0
usage()
{
- echo "Usage: scsi_satl [-h] [-L] [-q] <device>"
+ echo "Usage: scsi_satl [-h] [-L] [-q] [-v] <device>"
echo " where: -h, --help print usage message"
echo " -L, --log append stderr to 'scsi_satl.err'"
echo " -q, --quiet suppress some output"
+ echo " -v, --verbose more verbose output"
echo ""
echo "Check <device> for SCSI to ATA Translation Layer (SATL) support"
}
@@ -71,6 +73,7 @@ while test ! -z "$opt" -a -z "${opt##-*}"; do
h|-help) usage ; exit 1 ;;
L|-log) let log=$log+1 ;;
q|-quiet) let quiet=$quiet+1 ;;
+ v|-verbose) verbose="-v" ;;
*) echo "Unknown option: -$opt " ; exit 1 ;;
esac
shift
@@ -87,9 +90,14 @@ do
if [ $log -eq 0 ]
then
- $command $1 > /dev/null 2>> /dev/null
+ if [ $verbose ]
+ then
+ $command $verbose $1 > /dev/null
+ else
+ $command $1 > /dev/null 2>> /dev/null
+ fi
else
- $command $1 > /dev/null 2>> scsi_satl.err
+ $command $verbose $1 > /dev/null 2>> scsi_satl.err
fi
res=$?
case "$res" in
diff --git a/scripts/scsi_start b/scripts/scsi_start
index 226e9f2a..cad370a5 100755
--- a/scripts/scsi_start
+++ b/scripts/scsi_start
@@ -5,22 +5,26 @@
# Spin up the given SCSI disk(s).
#
# SCSI disks (or disks that understand SCSI commands)
-# are assumed. The immediate bit is set so the command
-# should return immediately. The disk however will take
-# 10 seconds or more to spin up.
+# are assumed. By default, the immediate bit is set so the
+# command should return immediately. The disk however will
+# take 10 seconds or more to spin up. The '-w' option
+# causes each start to wait until the disk reports that it
+# has started.
#
# This script assumes the sg3_utils package is installed.
#
###############################################
verbose=""
+immediate="-i"
usage()
{
- echo "Usage: scsi_start [-h] [-v] <device>+"
+ echo "Usage: scsi_start [-h] [-v] [-w] <device>+"
echo " where:"
echo " -h, --help print usage message"
echo " -v, --verbose more verbose output"
+ echo " -w, --wait wait for each start to complete"
echo ""
echo "Send SCSI START STOP UNIT command to start each <device>"
}
@@ -37,6 +41,7 @@ while test ! -z "$opt" -a -z "${opt##-*}"; do
case "$opt" in
h|-help) usage ; exit 0 ;;
v|-verbose) verbose="-v" ;;
+ w|-wait) immediate="" ;;
*) echo "Unknown option: -$opt " ; exit 1 ;;
esac
shift
@@ -45,6 +50,6 @@ done
for i
do
- echo "sg_start -i 1 $verbose $i"
- sg_start -i 1 $verbose $i
+ echo "sg_start $immediate 1 $verbose $i"
+ sg_start $immediate 1 $verbose $i
done
diff --git a/scripts/scsi_stop b/scripts/scsi_stop
index c719ab30..a106c206 100755
--- a/scripts/scsi_stop
+++ b/scripts/scsi_stop
@@ -5,22 +5,26 @@
# Spin down the given SCS disk(s).
#
# SCSI disks (or disks that understand SCSI commands)
-# are assumed. The immediate bit is set so the command
-# should return immediately. The disk however will take
-# 10 seconds or more to spin down.
+# are assumed. By default, the immediate bit is set so the
+# command should return immediately. The disk however will
+# take 10 seconds or more to spin down. The '-w' option
+# causes each stop to wait until the disk reports that it
+# has stopped.
#
# This script assumes the sg3_utils package is installed.
#
###############################################
verbose=""
+immediate="-i"
usage()
{
- echo "Usage: scsi_stop [-h] [-v] <device>+"
+ echo "Usage: scsi_stop [-h] [-v] [-w] <device>+"
echo " where:"
echo " -h, --help print usage message"
echo " -v, --verbose more verbose output"
+ echo " -w, --wait wait for each stop to complete"
echo ""
echo "Send SCSI START STOP UNIT command to stop each <device>"
}
@@ -37,6 +41,7 @@ while test ! -z "$opt" -a -z "${opt##-*}"; do
case "$opt" in
h|-help) usage ; exit 0 ;;
v|-verbose) verbose="-v" ;;
+ w|-wait) immediate="" ;;
*) echo "Unknown option: -$opt " ; exit 1 ;;
esac
shift
@@ -45,6 +50,6 @@ done
for i
do
- echo "sg_start -i 0 $verbose $i"
- sg_start -i 0 $verbose $i
+ echo "sg_start $immediate 0 $verbose $i"
+ sg_start $immediate 0 $verbose $i
done
diff --git a/sg3_utils.spec b/sg3_utils.spec
index cf935de1..a457e697 100644
--- a/sg3_utils.spec
+++ b/sg3_utils.spec
@@ -79,8 +79,8 @@ fi
%{_libdir}/*.la
%changelog
-* Mon Aug 24 2009 - dgilbert at interlog dot com
-- add sg_unmap, sg_read_block_limits; sg_logs: cache memory stats lpage
+* Thu Aug 27 2009 - dgilbert at interlog dot com
+- add sg_unmap, sg_read_block_limits
* sg3_utils-1.28
* Sat Apr 11 2009 - dgilbert at interlog dot com
diff --git a/src/sg_inq.c b/src/sg_inq.c
index 430c10b0..749539a1 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.84 20090612"; /* SPC-4 rev 20 */
+static char * version_str = "0.85 20090826"; /* SPC-4 rev 21 */
#define VPD_SUPPORTED_VPDS 0x0
@@ -725,7 +725,8 @@ static const char * network_service_type_arr[] =
"status",
"logging",
"code download",
- "reserved[0x6]", "reserved[0x7]", "reserved[0x8]", "reserved[0x9]",
+ "administrative configuration service",
+ "reserved[0x7]", "reserved[0x8]", "reserved[0x9]",
"reserved[0xa]", "reserved[0xb]", "reserved[0xc]", "reserved[0xd]",
"reserved[0xe]", "reserved[0xf]", "reserved[0x10]", "reserved[0x11]",
"reserved[0x12]", "reserved[0x13]", "reserved[0x14]", "reserved[0x15]",
diff --git a/src/sg_inq_data.c b/src/sg_inq_data.c
index c684d2f2..31b589f4 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 20 [sorted numerically (from Annex D.8)] */
+/* table from SPC-4 revision 21 [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"},
@@ -172,6 +172,7 @@ struct sg_version_descriptor sg_version_descriptor_arr[] = {
{0x4a0, "ADC-2 (no version claimed)"},
{0x4a7, "ADC-2 T10/1741-D revision 7"},
{0x4aa, "ADC-2 T10/1741-D revision 8"},
+ {0x4ac, "ADC-2 ANSI INCITS 441-2008"},
{0x4c0, "SBC-3 (no version claimed)"},
{0x4e0, "MMC-6 (no version claimed)"},
{0x4e3, "MMC-6 T10/1836-D revision 2b"},
@@ -305,8 +306,9 @@ struct sg_version_descriptor sg_version_descriptor_arr[] = {
{0xde4, "FC-PI-2 ANSI INCITS 404-2006"},
{0xe00, "FC-FS-2 (no version claimed)"},
{0xe02, "FC-FS-2 ANSI INCITS 242-2007"},
- {0xe04, "FC-FS-2 ANSI INCITS 242-2007 with AM1 ANSI INCITS 242/AM1-2007"},
+ {0xe03, "FC-FS-2 ANSI INCITS 242-2007 with AM1 ANSI INCITS 242/AM1-2007"},
{0xe20, "FC-LS (no version claimed)"},
+ {0xe21, "FC-LS T11/1620-D revision 1.62"},
{0xe29, "FC-LS ANSI INCITS 433-2007"},
{0xe40, "FC-SP (no version claimed)"},
{0xe42, "FC-SP T11/1570-D revision 1.6"},
@@ -322,6 +324,7 @@ struct sg_version_descriptor sg_version_descriptor_arr[] = {
{0xea6, "FC 10GFC ANSI INCITS 364-2003 with AM1 ANSI INCITS 364/AM1-2007"},
{0xec0, "FC-SP-2 (no version claimed)"},
{0xee0, "FC-FS-3 (no version claimed)"},
+ {0xee2, "FC-FS-3 T11/1861-D revision 0.9"},
{0xf00, "FC-LS-2 (no version claimed)"},
{0xf20, "FC-PI-5 (no version claimed)"},
{0x12c0, "FC-DA-2 (no version claimed)"},
@@ -358,10 +361,12 @@ struct sg_version_descriptor sg_version_descriptor_arr[] = {
{0x1622, "ATA/ATAPI-8 ATA-AST Serial transport (no version claimed)"},
{0x1623, "ATA/ATAPI-8 ATA-ACS ATA/ATAPI command set (no version "
"claimed)"},
+ {0x1628, "ATA/ATAPI-8 ATA-AAM ANSI INCITS 451-2008"},
{0x1728, "Universal Serial Bus Specification, Revision 1.1"},
{0x1729, "Universal Serial Bus Specification, Revision 2.0"},
{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"},
{0x1ea0, "SAT (no version claimed)"},
{0x1ea7, "SAT T10/1711-D rev 8"},
{0x1eab, "SAT T10/1711-D rev 9"},
diff --git a/src/sg_logs.c b/src/sg_logs.c
index 330546e7..5e6526e4 100644
--- a/src/sg_logs.c
+++ b/src/sg_logs.c
@@ -25,12 +25,12 @@
*/
-static char * version_str = "0.88 20090811"; /* SPC-4 revision 20 */
+static char * version_str = "0.89 20090827"; /* SPC-4 revision 21 */
#define MX_ALLOC_LEN (0xfffc)
#define SHORT_RESP_LEN 128
-#define ALL_PAGE_LPAGE 0x0
+#define SUPP_PAGES_LPAGE 0x0
#define BUFF_OVER_UNDER_LPAGE 0x1
#define WRITE_ERR_LPAGE 0x2
#define READ_ERR_LPAGE 0x3
@@ -48,8 +48,8 @@ static char * version_str = "0.88 20090811"; /* SPC-4 revision 20 */
#define PCT_LPAGE 0x1a
#define TAPE_ALERT_LPAGE 0x2e
#define IE_LPAGE 0x2f
-#define NOT_SUBPG_LOG 0x0
-#define ALL_SUBPG_LOG 0xff
+#define NOT_SPG_SUBPG 0x0
+#define SUPP_SPGS_SUBPG 0xff
#define LOW_GRP_STATS_SUBPG 0x1
#define HIGH_GRP_STATS_SUBPG 0x1f
#define CACHE_STATS_SUBPG 0x20
@@ -632,15 +632,15 @@ show_page_name(int pg_code, int subpg_code,
memset(b, 0, sizeof(b));
/* first process log pages that do not depend on peripheral type */
- if (NOT_SUBPG_LOG == subpg_code)
+ if (NOT_SPG_SUBPG == subpg_code)
snprintf(b, sizeof(b) - 1, " 0x%02x ", pg_code);
else
snprintf(b, sizeof(b) - 1, " 0x%02x,0x%02x ", pg_code,
subpg_code);
done = 1;
- if ((NOT_SUBPG_LOG == subpg_code) || (ALL_SUBPG_LOG == subpg_code)) {
+ if ((NOT_SPG_SUBPG == subpg_code) || (SUPP_SPGS_SUBPG == subpg_code)) {
switch (pg_code) {
- case ALL_PAGE_LPAGE: printf("%sSupported log pages", b); break;
+ case SUPP_PAGES_LPAGE: printf("%sSupported log pages", b); break;
case BUFF_OVER_UNDER_LPAGE:
printf("%sBuffer over-run/under-run", b);
break;
@@ -673,7 +673,7 @@ show_page_name(int pg_code, int subpg_code,
break;
}
if (done) {
- if (ALL_SUBPG_LOG == subpg_code)
+ if (SUPP_SPGS_SUBPG == subpg_code)
printf(" and subpages\n");
else
printf("\n");
@@ -706,6 +706,9 @@ show_page_name(int pg_code, int subpg_code,
case 0x8:
printf("%sFormat status (sbc-2)\n", b);
break;
+ case 0xc:
+ printf("%sThin provisioning (sbc-3)\n", b);
+ break;
case 0x15:
printf("%sBackground scan results (sbc-3)\n", b);
break;
@@ -3169,7 +3172,7 @@ show_ascii_page(unsigned char * resp, int len,
pg_code = resp[0] & 0x3f;
subpg_code = spf ? resp[1] : 0;
- if ((ALL_PAGE_LPAGE != pg_code ) && (ALL_SUBPG_LOG == subpg_code)) {
+ if ((SUPP_PAGES_LPAGE != pg_code ) && (SUPP_SPGS_SUBPG == subpg_code)) {
printf("Supported subpages for log page=0x%x\n", pg_code);
for (k = 0; k < num; k += 2)
show_page_name((int)resp[4 + k], (int)resp[4 + k + 1],
@@ -3177,7 +3180,7 @@ show_ascii_page(unsigned char * resp, int len,
return;
}
switch (pg_code) {
- case ALL_PAGE_LPAGE:
+ case SUPP_PAGES_LPAGE:
if (spf) {
printf("Supported log pages and subpages:\n");
for (k = 0; k < num; k += 2)
@@ -3380,7 +3383,7 @@ fetchTemperature(int sg_fd, unsigned char * resp, int max_len,
int res = 0;
optsp->pg_code = TEMPERATURE_LPAGE;
- optsp->subpg_code = NOT_SUBPG_LOG;
+ optsp->subpg_code = NOT_SPG_SUBPG;
res = do_logs(sg_fd, resp, max_len, 0, optsp);
if (0 == res) {
len = (resp[2] << 8) + resp[3] + 4;
@@ -3458,9 +3461,9 @@ main(int argc, char * argv[])
}
}
if (opts.do_list || opts.do_all) {
- opts.pg_code = ALL_PAGE_LPAGE;
+ opts.pg_code = SUPP_PAGES_LPAGE;
if ((opts.do_list > 1) || (opts.do_all > 1))
- opts.subpg_code = ALL_SUBPG_LOG;
+ opts.subpg_code = SUPP_SPGS_SUBPG;
}
if (opts.do_transport) {
if ((opts.pg_code > 0) || (opts.subpg_code > 0) ||
@@ -3570,7 +3573,7 @@ main(int argc, char * argv[])
if (spf)
opts.subpg_code = parr[++k];
else
- opts.subpg_code = NOT_SUBPG_LOG;
+ opts.subpg_code = NOT_SPG_SUBPG;
res = do_logs(sg_fd, rsp_buff, resp_len, 1, &opts);
if (0 == res) {
diff --git a/src/sg_modes.c b/src/sg_modes.c
index 0ac1820f..0399c401 100644
--- a/src/sg_modes.c
+++ b/src/sg_modes.c
@@ -26,7 +26,7 @@
*/
-static char * version_str = "1.31 20090604";
+static char * version_str = "1.32 20090826";
#define DEF_ALLOC_LEN (1024 * 4)
#define DEF_6_ALLOC_LEN 252
@@ -530,6 +530,7 @@ static struct page_code_desc pc_desc_disk[] = {
{0x10, 0x0, "XOR control"},
{0x1a, 0xf1, "ATA Power condition"},
{0x1c, 0x1, "Background control"},
+ {0x1c, 0x2, "Thin provisioning"},
};
static struct page_code_desc pc_desc_tape[] = {
diff --git a/src/sg_vpd.c b/src/sg_vpd.c
index c707de2d..68ff4b12 100644
--- a/src/sg_vpd.c
+++ b/src/sg_vpd.c
@@ -52,7 +52,7 @@
*/
-static char * version_str = "0.33 20090530"; /* spc4r20 + sbc3r19 */
+static char * version_str = "0.34 20090826"; /* spc4r21 + sbc3r19 */
extern void svpd_enumerate_vendor(void);
extern int svpd_decode_vendor(int sg_fd, int num_vpd, int subvalue,
@@ -84,6 +84,8 @@ extern const struct svpd_values_name_t *
#define VPD_MAN_ASS_SN 0xb1 /* SSC-3, ADC-2 */
#define VPD_SECURITY_TOKEN 0xb1 /* OSD */
#define VPD_TA_SUPPORTED 0xb2 /* SSC-3 */
+#define VPD_THIN_PROVISIONING 0xb2 /* SBC-3 */
+#define VPD_AUTOMATION_DEV_SN 0xb3 /* SSC-3 */
/* Device identification VPD page associations */
#define VPD_ASSOC_LU 0
@@ -145,6 +147,8 @@ static struct svpd_values_name_t standard_vpd_pg[] = {
{VPD_ATA_INFO, 0, -1, 0, "ai", "ATA information (SAT)"},
{VPD_ASCII_OP_DEF, 0, -1, 0, "aod",
"ASCII implemented operating definition (obs)"},
+ {VPD_AUTOMATION_DEV_SN, 0, 1, 0, "adsn", "Automation device serial "
+ "number (SSC)"},
{VPD_BLOCK_LIMITS, 0, 0, 0, "bl", "Block limits (SBC)"},
{VPD_BLOCK_DEV_CHARS, 0, 0, 0, "bdc", "Block device characteristics "
"(SBC)"},
@@ -179,6 +183,7 @@ static struct svpd_values_name_t standard_vpd_pg[] = {
{VPD_SECURITY_TOKEN, 0, 0x11, 0, "st", "Security token (OSD)"},
{VPD_SUPPORTED_VPDS, 0, -1, 0, "sv", "Supported VPD pages"},
{VPD_TA_SUPPORTED, 0, 1, 0, "tas", "TapeAlert supported flags (SSC)"},
+ {VPD_THIN_PROVISIONING, 0, 0, 0, "thp", "Thin provisioning (SBC)"},
{0, 0, 0, 0, NULL, NULL},
};
@@ -327,7 +332,8 @@ static const char * network_service_type_arr[] =
"status",
"logging",
"code download",
- "reserved[0x6]", "reserved[0x7]", "reserved[0x8]", "reserved[0x9]",
+ "administrative configuration service",
+ "reserved[0x7]", "reserved[0x8]", "reserved[0x9]",
"reserved[0xa]", "reserved[0xb]", "reserved[0xc]", "reserved[0xd]",
"reserved[0xe]", "reserved[0xf]", "reserved[0x10]", "reserved[0x11]",
"reserved[0x12]", "reserved[0x13]", "reserved[0x14]", "reserved[0x15]",