aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2014-04-23 03:56:37 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2014-04-23 03:56:37 +0000
commite4aa6f27ed29206248d4b165d27342183321104a (patch)
tree40c0811c836f5415803d16805168b29d82e64743
parent3358076c6d498ebf134f5750c492d2a0aeb34081 (diff)
downloadsg3_utils-e4aa6f27ed29206248d4b165d27342183321104a.tar.gz
sg_format: add --ip_def option to fully provision; doco
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@569 6180dd3e-e324-4e3e-922d-17de1ae2f315
-rw-r--r--ChangeLog3
-rw-r--r--doc/sg_format.833
-rw-r--r--doc/sg_persist.829
-rw-r--r--doc/sg_write_buffer.867
-rw-r--r--src/sg_format.c61
-rw-r--r--src/sg_persist.c14
6 files changed, 149 insertions, 58 deletions
diff --git a/ChangeLog b/ChangeLog
index 53ba2473..5a1921a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,11 +2,12 @@ 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.39 [20140415] [svn: r568]
+Changelog for sg3_utils-1.39 [20140422] [svn: r569]
- sg_ses: add --eiioe=auto|force option
- fix AES dpage element indexing problems
- sg_write_buffer: add --bpw=CS option to call
write buffer multiple times for big blobs
+ - sg_format: add --ip_def option to fully provision
- sginfo: strip trailing spaces from INQUIRY text
- sg_sat_set_features: add --readonly option
- examples/sgq_dd: re-add old utility as example
diff --git a/doc/sg_format.8 b/doc/sg_format.8
index b2e5090a..816424c9 100644
--- a/doc/sg_format.8
+++ b/doc/sg_format.8
@@ -1,14 +1,15 @@
-.TH SG_FORMAT "8" "March 2014" "sg3_utils\-1.38" SG3_UTILS
+.TH SG_FORMAT "8" "April 2014" "sg3_utils\-1.39" SG3_UTILS
.SH NAME
sg_format \- format or resize a SCSI disk (perhaps change its block size)
.SH SYNOPSIS
.B sg_format
[\fI\-\-cmplst=\fR{0|1}] [\fI\-\-count=COUNT\fR] [\fI\-\-dcrt\fR]
[\fI\-\-early\fR] [\fI\-\-fmtpinfo=FPI\fR] [\fI\-\-format\fR]
-[\fI\-\-help\fR] [\fI\-\-long\fR] [\fI\-\-pfu=PFU\fR] [\fI\-\-pie=PIE\fR]
-[\fI\-\-pinfo\fR] [\fI\-\-poll=PT\fR] [\fI\-\-resize\fR] [\fI\-\-rto_req\fR]
-[\fI\-\-security\fR] [\fI\-\-six\fR] [\fI\-\-size=SIZE\fR]
-[\fI\-\-verbose\fR] [\fI\-\-version\fR] [\fI\-\-wait\fR] \fIDEVICE\fR
+[\fI\-\-help\fR] [\fI\-\-ip_def\fR] [\fI\-\-long\fR] [\fI\-\-pfu=PFU\fR]
+[\fI\-\-pie=PIE\fR] [\fI\-\-pinfo\fR] [\fI\-\-poll=PT\fR] [\fI\-\-resize\fR]
+[\fI\-\-rto_req\fR] [\fI\-\-security\fR] [\fI\-\-six\fR]
+[\fI\-\-size=SIZE\fR] [\fI\-\-verbose\fR] [\fI\-\-version\fR]
+[\fI\-\-wait\fR] \fIDEVICE\fR
.SH DESCRIPTION
.\" Add any additional description here
.PP
@@ -139,6 +140,13 @@ EXAMPLES section for typical use.
\fB\-h\fR, \fB\-\-help\fR
print out the usage information then exit.
.TP
+\fB\-I\fR, \fB\-\-ip_def\fR
+sets the default Initialization Pattern. Some disks (SSDs) use this to flag
+that a format should fully provision (i.e. associate a physical block with
+every logical block). The same disks (SSDs) might thin provision if this
+option is not given. If this option is given then the \fI\-\-security\fR
+option cannot be given.
+.TP
\fB\-l\fR, \fB\-\-long\fR
the default action of this utility is to assume 32 bit logical block
addresses. With 512 byte block size this permits more than 2
@@ -161,7 +169,10 @@ below for more information.
\fB\-q\fR, \fB\-\-pie\fR=\fIPIE\fR
sets the "Protection Interval Exponent" field in the parameter block
associated with a FORMAT UNIT command to \fIPIE\fR. The default value is 0.
-This field first appeared in SBC\-3 revision 18.
+The value of 0 is typical for 512 byte blocks, often with 4096 byte blocks
+a value of 3 might be appropriate (i.e. 8 protection intervals interleaved
+with 4096 bytes of user data). This field first appeared in SBC\-3 revision
+18.
.TP
\fB\-p\fR, \fB\-\-pinfo\fR
this option is deprecated, use the \fI\-\-fmtpinfo=FPI\fR option instead.
@@ -195,7 +206,8 @@ sets the "Security Initialization" (SI) bit in the FORMAT UNIT command's
initialization pattern descriptor within the parameter list. According
to SBC\-3 the default initialization pattern "shall be written using a
security erasure write technique". See the NOTES section on the SCSI
-SANITIZE command.
+SANITIZE command. If this option is given then the \fI\-\-ip_def\fR option
+cannot be given.
.TP
\fB\-6\fR, \fB\-\-six\fR
Use 6 byte variants of MODE SENSE and MODE SELECT. The default action
@@ -379,6 +391,13 @@ related to the ATA sanitize disk feature set and can be used to remove all
existing data from a disk. Sanitize is more likely to be implemented on
modern disks (including SSDs) than FORMAT UNIT's security initialization
feature (see the \fI\-\-security\fR option) and in some cases much faster.
+.PP
+SSDs that support thin provisioning will typically unmap all logical blocks
+during a format. The reason is to improve the SSD's endurance. Also thin
+provisioned formats typically complete faster than fully provisioned ones
+on the same disk (see the \fI\-\-ip_def\fR option). In either case format
+operations on SSDs tend to be a lot faster than they are on hard disks with
+spinning media.
.SH EXAMPLES
These examples use Linux device names. For suitable device names in
other supported Operating Systems see the sg3_utils(8) man page.
diff --git a/doc/sg_persist.8 b/doc/sg_persist.8
index 0d348785..40c84600 100644
--- a/doc/sg_persist.8
+++ b/doc/sg_persist.8
@@ -1,4 +1,4 @@
-.TH SG_PERSIST "8" "March 2014" "sg3_utils\-1.38" SG3_UTILS
+.TH SG_PERSIST "8" "April 2014" "sg3_utils\-1.39" SG3_UTILS
.SH NAME
sg_persist \- use SCSI PERSISTENT RESERVE command to access registrations
and reservations
@@ -34,10 +34,10 @@ sub\-command of the PRIN command. Other PRIN sub\-commands are
READ RESERVATION, REPORT CAPABILITIES and READ FULL STATUS.
.PP
Before trying to change Persistent reservations and registrations users
-should be aware of what they are doing. The relevant sections of the
-SCSI Primary Commands document (i.e. SPC\-4 whose most recent draft is
-revision 20 dated 22 May 2009) are sections 5.7 (titled "Reservations"),
-6.13 (for the PRIN command) and 6.14 (for the PROUT command). To safeguard
+should be aware of what they are doing. The relevant sections of the SCSI
+Primary Commands document (i.e. SPC\-4 whose most recent draft is revision
+36s dated 21 March 2014) are sections 5.12 (titled "Reservations"),
+6.15 (for the PRIN command) and 6.16 (for the PROUT command). To safeguard
against accidental use, the \fI\-\-out\fR option must be given when a
PROUT sub\-command (e.g. \fI\-\-register\fR) is used.
.PP
@@ -148,7 +148,7 @@ exclusive access \- registrants only, 7\-> write exclusive \- all registrants,
8\-> exclusive access \- all registrants. Default value is 0 (which is
an invalid type). Each "persistent reservation type" is explained in more
detail in a subsection of that name in the read reservation section of
-the PRIN command (section 6.13.3.4 of SPC\-4 revision 9).
+the PRIN command (section 6.15.3.3 of SPC\-4 revision 36s).
.TP
\fB\-s\fR, \fB\-\-read\-full\-status\fR
Read Full Status is a sub\-command of the PRIN command. For each registration
@@ -257,7 +257,7 @@ output usage message. Ignore all other parameters.
TransportIDs are used in persistent reservations to identify initiators.
The format of a TransportID differs depending on the type of transport
being used. Their format is described in SPC\-4 (in draft revision
-20 see section 7.5.4).
+36s see section 7.6.4).
.PP
A TransportID is required for the PROUT 'register and move' sub\-command and
the PROUT 'register' sub\-command can have zero, one or more TransportIDs.
@@ -271,13 +271,14 @@ form is an iSCSI qualified name. Apart from "iqn" the other transport
specific leadin string may be given in upper case (e.g. "FCP,").
.PP
The "fcp," form should be followed by 16 ASCII hex digits that represent an
-initiator's N_PORT_NAME. The "spi," form should be followed
-by "<scsi_address>,<relative_target_port_identifier>" (both decimal numbers).
-The "sbp," form should be followed by 16 ASCII hex digits that represent an
-initiator's EUI\-64 name. The "srp," form should be followed by 32 ASCII hex
-digits that represent an initiator port identifier. The "sas," form should be
-followed by 16 ASCII hex digits that represent an initiator's port SAS
-address. The "sop," form takes a hex number that represents a routing id.
+initiator's N_PORT_NAME (e.g. "fcp,10000000C9F3A571"). The "spi," form shoul
+be followed by "<scsi_address>,<relative_target_port_identifier>" (both
+decimal numbers). The "sbp," form should be followed by 16 ASCII hex digits
+that represent an initiator's EUI\-64 name. The "srp," form should be
+followed by 32 ASCII hex digits that represent an initiator port identifier.
+The "sas," form should be followed by 16 ASCII hex digits that represent an
+initiator's port SAS address (e.g. "sas,5000c50005b32001"). The "sop," form
+takes a hex number that represents a routing id.
.PP
There are two iSCSI qualified name forms. The shorter form contains the
iSCSI name of the initiator
diff --git a/doc/sg_write_buffer.8 b/doc/sg_write_buffer.8
index f6bd68e2..66b9e23b 100644
--- a/doc/sg_write_buffer.8
+++ b/doc/sg_write_buffer.8
@@ -16,7 +16,8 @@ from the file given in the \fI\-\-in=FILE\fR option, or data is read from
stdin when either \fI\-\-raw\fR or \fI\-\-in=\-\fR is given.
.PP
Some WRITE BUFFER command variants do not have associated data to send to the
-device, for example "activate_mc" ("activate deferred microcode").
+device. For example "activate_mc" activates deferred microcode that was sent
+via prior WRITE BUFFER commands.
.SH OPTIONS
Arguments to long options are mandatory for short options as well.
.TP
@@ -59,13 +60,13 @@ deduced from \fI\-\-in=FILE\fR or \fI\-\-raw\fR is less (or no data is
provided), then bytes of 0xff are used as fill bytes.
.TP
\fB\-m\fR, \fB\-\-mode\fR=\fIMO\fR
-this option sets the mode field in the cdb. \fIMO\fR is a value between
+this option sets the MODE field in the cdb. \fIMO\fR is a value between
0 (default) and 31 inclusive. Alternatively an abbreviation can be given.
-To list the available mode abbreviations give an invalid
-one (e.g. '\-\-mode=xxx') or use the '\-hh' option.
+See the MODES section below. To list the available mode abbreviations at
+run time give an invalid one (e.g. '\-\-mode=xxx') or use the '\-hh' option.
.TP
\fB\-o\fR, \fB\-\-offset\fR=\fIOFF\fR
-this option sets the buffer offset field in the cdb. \fIOFF\fR is a value
+this option sets the BUFFER OFFSET field in the cdb. \fIOFF\fR is a value
between 0 (default) and 2**24\-1 . It is a byte offset.
.TP
\fB\-r\fR, \fB\-\-raw\fR
@@ -80,7 +81,7 @@ a regular file, rather than stdin. Data is read starting at byte offset
If not given the byte offset defaults to 0 (i.e. the start of the file).
.TP
\fB\-S\fR, \fB\-\-specific\fR=\fIMS\fR
-\fIMS\fR is the mode specific field in the cdb. This is a 3\-bit field
+\fIMS\fR is the MODE SPECIFIC field in the cdb. This is a 3\-bit field
so the values 0 to 7 are accepted. This field was introduced in SPC\-4
revision 32 and can be used to specify additional events that activate
deferred microcode (when \fIMO\fR is 0xD).
@@ -90,6 +91,60 @@ increase the level of verbosity, (i.e. debug output).
.TP
\fB\-V\fR, \fB\-\-version\fR
print the version string and then exit.
+.SH MODES
+Following is a list of WRITE BUFFER command settings for the MODE field.
+First is an acronym accepted by the \fIMO\fR argument of this utility.
+Following the acronym in square brackets are the corresponding decimal and
+hex values that may also be given for \fIMO\fR. The following are listed
+in numerical order.
+.TP
+hd [0, 0x0]
+Combined header and data (obsolete in SPC\-4).
+.TP
+vendor [1, 0x1]
+Vendor specific.
+.TP
+data [2, 0x2]
+Data (was called "Write Data" in SPC\-3).
+.TP
+dmc [4, 0x4]
+Download microcode and activate (was called "Download microcode" in SPC\-3).
+.TP
+dmc_save [5, 0x5]
+Download microcode, save, and activate (was called "Download microcode and
+save" in SPC\-3).
+.TP
+dmc_offs [6, 0x6]
+Download microcode with offsets and activate (was called "Download microcode
+with offsets" in SPC\-3).
+.TP
+dmc_offs_save [7, 0x7]
+Download microcode with offsets, save, and activate (was called "Download
+microcode with offsets and save" in SPC\-3).
+.TP
+echo [10, 0xa]
+Write data to echo buffer (was called "Echo buffer" in SPC\-3).
+.TP
+dmc_offs_ev_defer [13, 0xd]
+Download microcode with offsets, select activation events, save, and defer
+activate (introduced in SPC\-4).
+.TP
+dmc_offs_defer [14, 0xe]
+Download microcode with offsets, save, and defer activate (introduced in
+SPC\-4).
+.TP
+activate_mc [15, 0xf]
+Activate deferred microcode (introduced in SPC\-4).
+.TP
+en_ex [26, 0x1A]
+Enable expander communications protocol and Echo buffer (obsolete in SPC\-4).
+.TP
+dis_ex [27, 0x1B]
+Disable expander communications protocol (obsolete in SPC\-4).
+.TP
+deh [28, 0x1C]
+Download application client error history (was called "Download application
+log" in SPC\-3).
.SH NOTES
If no \fI\-\-length=LEN\fR is given this utility reads up to 8 MiB of data
from the given file \fIFILE\fR (or stdin). If a larger amount of data is
diff --git a/src/sg_format.c b/src/sg_format.c
index 0ef19b1e..8274b360 100644
--- a/src/sg_format.c
+++ b/src/sg_format.c
@@ -6,7 +6,7 @@
*
* Copyright (C) 2003 Grant Grundler grundler at parisc-linux dot org
* Copyright (C) 2003 James Bottomley jejb at parisc-linux dot org
- * Copyright (C) 2005-2013 Douglas Gilbert dgilbert at interlog dot com
+ * Copyright (C) 2005-2014 Douglas Gilbert dgilbert at interlog dot com
*
* 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
@@ -47,7 +47,7 @@
#include "sg_cmds_basic.h"
#include "sg_cmds_extra.h"
-static const char * version_str = "1.23 20130730";
+static const char * version_str = "1.24 20140419";
#define RW_ERROR_RECOVERY_PAGE 1 /* every disk should have one */
#define FORMAT_DEV_PAGE 3 /* Format Device Mode Page [now obsolete] */
@@ -86,6 +86,7 @@ static struct option long_options[] = {
{"fmtpinfo", required_argument, 0, 'f'},
{"format", no_argument, 0, 'F'},
{"help", no_argument, 0, 'h'},
+ {"ip_def", no_argument, 0, 'I'},
{"long", no_argument, 0, 'l'},
{"pinfo", no_argument, 0, 'p'},
{"pfu", required_argument, 0, 'P'},
@@ -109,12 +110,12 @@ usage()
printf("usage: sg_format [--cmplst=0|1] [--count=COUNT] [--dcrt] "
"[--early]\n"
" [--fmtpinfo=FPI] [--format] [--help] "
- "[--long] [--pfu=PFU]\n"
- " [--pie=PIE] [--pinfo] [--poll=PT] "
- "[--resize] [--rto_req]\n"
- " [--security] [--six] [--size=SIZE] "
- "[--verbose] [--version]\n"
- " [--wait] DEVICE\n"
+ "[--ip_def] [--long]\n"
+ " [--pfu=PFU] [--pie=PIE] [--pinfo] "
+ "[--poll=PT] [--resize]\n"
+ " [--rto_req] [--security] [--six] "
+ "[--size=SIZE] [--verbose]\n"
+ " [--version] [--wait] DEVICE\n"
" where:\n"
" --cmplst=0|1\n"
" -C 0|1 sets CMPLST bit in format cdb "
@@ -132,6 +133,7 @@ usage()
" --format|-F format unit (default: report current "
"count and size)\n"
" --help|-h prints out this usage message\n"
+ " --ip_def|-I initialization pattern: default\n"
" --long|-l allow for 64 bit lbas (default: assume "
"32 bit lbas)\n"
" --pfu=PFU|-P PFU Protection Field Usage value "
@@ -175,10 +177,11 @@ usage()
/* Return 0 on success, else see sg_ll_format_unit() */
static int
scsi_format(int fd, int fmtpinfo, int cmplst, int pf_usage, int immed,
- int dcrt, int pie, int si, int early, int pt, int verbose)
+ int dcrt, int pie, int ip_def, int sec_init, int early, int pt,
+ int verbose)
{
int res, need_hdr, progress, pr, rem, verb, fmt_pl_sz, longlist, off;
- int resp_len;
+ int resp_len, ip_desc;
const int SH_FORMAT_HEADER_SZ = 4;
const int LO_FORMAT_HEADER_SZ = 8;
const char INIT_PATTERN_DESC_SZ = 4;
@@ -187,26 +190,29 @@ scsi_format(int fd, int fmtpinfo, int cmplst, int pf_usage, int immed,
memset(fmt_pl, 0, sizeof(fmt_pl));
longlist = (pie > 0);
+ ip_desc = (ip_def || sec_init);
off = longlist ? LO_FORMAT_HEADER_SZ : SH_FORMAT_HEADER_SZ;
- fmt_pl[0] = pf_usage & 0x7; /* protection_field_usage (bits 2-0) */
- fmt_pl[1] = (immed ? 0x2 : 0); /* fov=0, [dpry,dcrt,stpf,ip=0] */
+ fmt_pl[0] = pf_usage & 0x7; /* PROTECTION_FIELD_USAGE (bits 2-0) */
+ fmt_pl[1] = (immed ? 0x2 : 0); /* FOV=0, [DPRY,DCRT,STPF,IP=0] */
if (dcrt)
- fmt_pl[1] |= 0xa0; /* fov=1, dcrt=1 */
- if (si) {
- fmt_pl[1] |= 0x88; /* fov=1, ip=1 */
- fmt_pl[off + 0] = 0x20; /* si=1 in init. pattern desc */
+ fmt_pl[1] |= 0xa0; /* FOV=1, DCRT=1 */
+ if (ip_desc) {
+ fmt_pl[1] |= 0x88; /* FOV=1, IP=1 */
+ if (sec_init)
+ fmt_pl[off + 0] = 0x20; /* SI=1 in IP desc */
}
if (longlist)
- fmt_pl[3] = (pie & 0xf); /* protection interval exponent */
+ fmt_pl[3] = (pie & 0xf); /* PROTECTION_INTERVAL_EXPONENT */
+ /* with the long parameter list header, P_I_INFORMATION is always 0 */
- need_hdr = (immed || cmplst || dcrt || si || (pf_usage > 0) ||
+ need_hdr = (immed || cmplst || dcrt || ip_desc || (pf_usage > 0) ||
(pie > 0));
fmt_pl_sz = 0;
if (need_hdr)
- fmt_pl_sz = off + (si ? INIT_PATTERN_DESC_SZ : 0);
+ fmt_pl_sz = off + (ip_desc ? INIT_PATTERN_DESC_SZ : 0);
- res = sg_ll_format_unit(fd, fmtpinfo, longlist, need_hdr /*fmtdata*/,
- cmplst, 0 /* dlist_format */,
+ res = sg_ll_format_unit(fd, fmtpinfo, longlist, need_hdr /* FMTDATA*/,
+ cmplst, 0 /* DEFECT_LIST_FORMAT */,
(immed ? SHORT_TIMEOUT : FORMAT_TIMEOUT),
fmt_pl, fmt_pl_sz, 1, verbose);
switch (res) {
@@ -437,6 +443,7 @@ main(int argc, char **argv)
int64_t blk_count = 0; /* -c value */
int blk_size = 0; /* -s value */
int format = 0; /* -F */
+ int ip_def = 0; /* -I */
int resize = 0; /* -r */
int verbose = 0; /* -v */
int fwait = 0; /* -w */
@@ -462,7 +469,7 @@ main(int argc, char **argv)
int option_index = 0;
int c;
- c = getopt_long(argc, argv, "c:C:Def:FhlpP:q:rRs:SvVwx:6",
+ c = getopt_long(argc, argv, "c:C:Def:FhIlpP:q:rRs:SvVwx:6",
long_options, &option_index);
if (c == -1)
break;
@@ -509,6 +516,9 @@ main(int argc, char **argv)
case 'h':
usage();
return 0;
+ case 'I':
+ ip_def = 1;
+ break;
case 'l':
long_lba = 1;
do_rcap16 = 1;
@@ -588,6 +598,11 @@ main(int argc, char **argv)
usage();
return SG_LIB_SYNTAX_ERROR;
}
+ if (ip_def && do_si) {
+ fprintf(stderr, "'--ip_def' and '--security' contradict, "
+ "choose one\n");
+ return SG_LIB_SYNTAX_ERROR;
+ }
if (resize) {
if (format) {
fprintf(stderr, "both '--format' and '--resize'"
@@ -898,7 +913,7 @@ again_with_long_lba:
printf(" Press control-C to abort\n");
sleep_for(5);
res = scsi_format(fd, fmtpinfo, cmplst, pfu, ! fwait, dcrt,
- pie, do_si, early, pt, verbose);
+ pie, ip_def, do_si, early, pt, verbose);
ret = res;
if (res) {
fprintf(stderr, "FORMAT failed\n");
diff --git a/src/sg_persist.c b/src/sg_persist.c
index 644117fa..c2138384 100644
--- a/src/sg_persist.c
+++ b/src/sg_persist.c
@@ -27,7 +27,7 @@
#include "sg_cmds_basic.h"
#include "sg_cmds_extra.h"
-static const char * version_str = "0.44 20140202";
+static const char * version_str = "0.45 20140421";
#define PRIN_RKEY_SA 0x0
@@ -362,8 +362,8 @@ prin_work(int sg_fd, const struct opts_t * optsp)
if (SG_LIB_CAT_INVALID_OP == res)
pr2serr("PR in (%s): command not supported\n", b);
else if (SG_LIB_CAT_ILLEGAL_REQ == res)
- pr2serr("PR in (%s): bad field in cdb including unsupported "
- "service action\n", b);
+ pr2serr("PR in (%s): bad field in cdb or parameter list (perhaps "
+ "unsupported service action)\n", b);
else if (SG_LIB_CAT_UNIT_ATTENTION == res)
pr2serr("PR in (%s): unit attention\n", b);
else if (SG_LIB_CAT_ABORTED_COMMAND == res)
@@ -584,8 +584,8 @@ prout_work(int sg_fd, struct opts_t * optsp)
if (SG_LIB_CAT_INVALID_OP == res)
pr2serr("PR out:, command not supported\n");
else if (SG_LIB_CAT_ILLEGAL_REQ == res)
- pr2serr("PR out: bad field in cdb including unsupported "
- "service action\n");
+ pr2serr("PR out: bad field in cdb or parameter list (perhaps "
+ "unsupported service action)\n");
else if (SG_LIB_CAT_UNIT_ATTENTION == res)
pr2serr("PR out: unit attention\n");
else if (SG_LIB_CAT_ABORTED_COMMAND == res)
@@ -649,8 +649,8 @@ prout_reg_move_work(int sg_fd, struct opts_t * optsp)
if (SG_LIB_CAT_INVALID_OP == res)
pr2serr("PR out: command not supported\n");
else if (SG_LIB_CAT_ILLEGAL_REQ == res)
- pr2serr("PR out: bad field in cdb including unsupported "
- "service action\n");
+ pr2serr("PR out: bad field in cdb or parameter list (perhaps "
+ "unsupported service action)\n");
else if (SG_LIB_CAT_UNIT_ATTENTION == res)
pr2serr("PR out: unit attention\n");
else if (SG_LIB_CAT_ABORTED_COMMAND == res)