aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2018-08-13 05:24:09 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2018-08-13 05:24:09 +0000
commita059c857494382bb900dc23474b31c654017e461 (patch)
treec8738fed0dc06aa9a0e0f1c6cf472166ff7255b9
parent9236f11e7389ec4658b06b3835ad4a6cceca9d50 (diff)
downloadsg3_utils-a059c857494382bb900dc23474b31c654017e461.tar.gz
apply most patches from sg3_utils-1.42-6.fc29.src*; sg_get_lba_status fixes; doco
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@786 6180dd3e-e324-4e3e-922d-17de1ae2f315
-rw-r--r--ChangeLog3
-rw-r--r--debian/changelog2
-rw-r--r--doc/sg_compare_and_write.86
-rw-r--r--doc/sg_dd.818
-rw-r--r--doc/sg_decode_sense.822
-rw-r--r--doc/sg_format.8108
-rw-r--r--doc/sg_get_lba_status.819
-rw-r--r--doc/sg_ses.87
-rw-r--r--doc/sg_xcopy.820
-rw-r--r--lib/sg_lib.c2
-rw-r--r--lib/sg_lib_data.c2
-rw-r--r--lib/sg_pt_solaris.c23
-rw-r--r--sg3_utils.spec8
-rw-r--r--src/sg_dd.c10
-rw-r--r--src/sg_format.c6
-rw-r--r--src/sg_get_lba_status.c12
-rw-r--r--src/sg_inq.c12
-rw-r--r--src/sg_read.c6
-rw-r--r--src/sg_ses.c10
-rw-r--r--src/sg_xcopy.c3
-rw-r--r--src/sginfo.c5
-rw-r--r--src/sgm_dd.c10
-rw-r--r--src/sgp_dd.c10
23 files changed, 187 insertions, 137 deletions
diff --git a/ChangeLog b/ChangeLog
index 225b6368..1f87c526 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.43 [20180724] [svn: r785]
+Changelog for sg3_utils-1.43 [20180812] [svn: r786]
- sg_write_x: where x can be normal, atomic, or(write),
same, scattered, or stream writes with 16 or 32 byte
cdbs (sbc4r04 for atomic, sbc4r11 for scattered)
@@ -131,6 +131,7 @@ Changelog for sg3_utils-1.43 [20180724] [svn: r785]
- sg_wr_mode: add --rtd option for RTD bit
- sg_timestamp: add '--no-timestamp' option
- add --elapsed and --hex options
+ - sginfo: don't open /dev/snapshot
- introduce SG3_UTILS_DSENSE environment variable
- manpages and usage messages: corrections from
Gris Ge via github
diff --git a/debian/changelog b/debian/changelog
index 89661231..9e2d6063 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,7 @@ sg3-utils (1.43-0.1) unstable; urgency=low
* New upstream version
- -- Douglas Gilbert <dgilbert@interlog.com> Mon, 16 Jul 2018 17:00:00 -0400
+ -- Douglas Gilbert <dgilbert@interlog.com> Wed, 08 Aug 2018 17:00:00 -0400
sg3-utils (1.42-0.1) unstable; urgency=low
diff --git a/doc/sg_compare_and_write.8 b/doc/sg_compare_and_write.8
index 46c4c7cd..54a6f091 100644
--- a/doc/sg_compare_and_write.8
+++ b/doc/sg_compare_and_write.8
@@ -1,10 +1,10 @@
-.TH "COMPARE AND WRITE" "8" "January 2018" "sg3_utils\-1.43" SG3_UTILS
+.TH "COMPARE AND WRITE" "8" "August 2018" "sg3_utils\-1.43" SG3_UTILS
.SH NAME
sg_compare_and_write \- send the SCSI COMPARE AND WRITE command
.SH SYNOPSIS
.B sg_compare_and_write
-[\fI\-\-dpo\fR] [\fI\-\-fua\fR] [\fI\-\-fua_nv\fR] [\fI\-\-help\fR]
-[\fI\-\-grpnum=GN\fR] \fI\-\-in=IF\fR [\fI\-\-inw=WF\fR] \fI\-\-lba=LBA\fR
+[\fI\-\-dpo\fR] [\fI\-\-fua\fR] [\fI\-\-fua_nv\fR] [\fI\-\-grpnum=GN\fR]
+[\fI\-\-help\fR] \fI\-\-in=IF\fR [\fI\-\-inw=WF\fR] \fI\-\-lba=LBA\fR
[\fI\-\-num=NUM\fR] [\fI\-\-quiet\fR] [\fI\-\-timeout=TO\fR]
[\fI\-\-verbose\fR] [\fI\-\-version\fR] [\fI\-\-wrprotect=WP\fR]
[\fI\-\-xferlen=LEN\fR] \fIDEVICE\fR
diff --git a/doc/sg_dd.8 b/doc/sg_dd.8
index 2773ee67..881d11ed 100644
--- a/doc/sg_dd.8
+++ b/doc/sg_dd.8
@@ -1,4 +1,4 @@
-.TH SG_DD "8" "June 2018" "sg3_utils\-1.43" SG3_UTILS
+.TH SG_DD "8" "August 2018" "sg3_utils\-1.43" SG3_UTILS
.SH NAME
sg_dd \- copy data to and from files and devices, especially SCSI
devices
@@ -6,13 +6,13 @@ devices
.B sg_dd
[\fIbs=BS\fR] [\fIconv=CONV\fR] [\fIcount=COUNT\fR] [\fIibs=BS\fR]
[\fIif=IFILE\fR] [\fIiflag=FLAGS\fR] [\fIobs=BS\fR] [\fIof=OFILE\fR]
-[\fIoflag=FLAGS\fR] [\fIseek=SEEK\fR] [\fIskip=SKIP\fR] [\fI\-\-dry\-run\fR]
-[\fI\-\-help\fR] [\fI\-\-verbose\fR] [\fI\-\-version\fR]
+[\fIoflag=FLAGS\fR] [\fIseek=SEEK\fR] [\fIskip=SKIP\fR] [\fI\-\-help\fR]
+[\fI\-\-verbose\fR] [\fI\-\-version\fR]
.PP
[\fIblk_sgio=\fR{0|1}] [\fIbpt=BPT\fR] [\fIcdbsz=\fR{6|10|12|16}]
[\fIcoe=\fR{0|1|2|3}] [\fIcoe_limit=CL\fR] [\fIdio=\fR{0|1}]
[\fIodir=\fR{0|1}] [\fIof2=OFILE2\fR] [\fIretries=RETR\fR] [\fIsync=\fR{0|1}]
-[\fItime=\fR{0|1}] [\fIverbose=VERB\fR] [\fI\-V\fR]
+[\fItime=\fR{0|1}] [\fIverbose=VERB\fR] [\fI\-\-dry\-run\fR] [\fI\-V\fR]
.SH DESCRIPTION
.\" Add any additional description here
.PP
@@ -52,20 +52,20 @@ is directly to the underlying device). Default is 0. See the 'sgio' flag.
.TP
\fBbpt\fR=\fIBPT\fR
each IO transaction will be made using \fIBPT\fR blocks (or less if near
-the end of the copy). Default is 128 for block sizes less that 2048
+the end of the copy). Default is 128 for logical block sizes less that 2048
bytes, otherwise the default is 32. So for bs=512 the reads and writes
will each convey 64 KiB of data by default (less if near the end of the
transfer or memory restrictions). When cd/dvd drives are accessed, the
-block size is typically 2048 bytes and bpt defaults to 32 which again
-implies 64 KiB transfers. The block layer when the blk_sgio=1 option
+logical block size is typically 2048 bytes and bpt defaults to 32 which
+again implies 64 KiB transfers. The block layer when the blk_sgio=1 option
is used has relatively low upper limits for transfer sizes (compared
to sg device nodes, see /sys/block/<dev_name>/queue/max_sectors_kb ).
.TP
\fBbs\fR=\fIBS\fR
where \fIBS\fR
.B must
-be the block size of the physical device (if either the input or output
-files are accessed via SCSI commands). Note that this differs from
+be the logical block size of the physical device (if either the input or
+output files are accessed via SCSI commands). Note that this differs from
.B dd(1)
which permits \fIBS\fR to be an integral multiple. Default is 512 which
is usually correct for disks but incorrect for cdroms (which normally
diff --git a/doc/sg_decode_sense.8 b/doc/sg_decode_sense.8
index 18e6e9fb..2396ae31 100644
--- a/doc/sg_decode_sense.8
+++ b/doc/sg_decode_sense.8
@@ -1,6 +1,6 @@
-.TH SG_DECODE_SENSE "8" "June 2018" "sg3_utils\-1.43" SG3_UTILS
+.TH SG_DECODE_SENSE "8" "August 2018" "sg3_utils\-1.43" SG3_UTILS
.SH NAME
-sg_decode_sense \- decode SCSI sense data
+sg_decode_sense \- decode SCSI sense and related data
.SH SYNOPSIS
.B sg_decode_sense
[\fI\-\-binary=FN\fR] [\fI\-\-cdb\fR] [\fI\-\-err=ES\fR] [\fI\-\-file=FN\fR]
@@ -12,12 +12,12 @@ sg_decode_sense \- decode SCSI sense data
This utility takes SCSI sense data in binary or as a sequence of
ASCII hexadecimal bytes and decodes it. The primary reference for the
decoding is SPC\-4 ANSI INCITS 513\-2015 and the most recent draft
-SPC\-5 revision 8 which can be found at http://www.t10.org and other
+SPC\-5 revision 19 which can be found at http://www.t10.org and other
locations on the internet.
.PP
SCSI sense data is often found in kernel log files as a result of
-something going wrong but may just be informative. It is often shown as
-a sequence of hexadecimal bytes, starting with 70, 71, 72, 73, f0 or f1.
+something going wrong or may be an informative warning. It is often shown
+as a sequence of hexadecimal bytes, starting with 70, 71, 72, 73, f0 or f1.
Sense data could be up to 252 bytes long but typically is much shorter
than that, 18 bytes long is often seen and is usually associated with
the older "fixed" format sense data.
@@ -34,11 +34,12 @@ If the \fI\-\-cdb\fR option is given then rather than viewing the given hex
arguments as sense data, it is viewed as a SCSI command descriptor
block (CDB). In this case the command name is printed out. That name is
based on the first hex byte given (know as the opcode) and optionally on
-another field called the "service action".
+another field called the "service action".
.PP
Another alternate action is when the \fI\-\-err=ES\fR is given. \fIES\fR
-is assumed to be an "exit status" value between 0 and 255. A descriptive
-string is printed. Other options are ignored apart from \fI\-\-verbose\fR.
+is assumed to be an "exit status" value between 0 and 255 from one of the
+utilities in this package. A descriptive string is printed. Other options
+are ignored apart from \fI\-\-verbose\fR.
.SH OPTIONS
Arguments to long options are mandatory for short options as well.
.TP
@@ -111,8 +112,9 @@ SCSI device (logical unit). This utility accesses a library associated
with this package. Amongst other things the library decodes SCSI sense
data.
.PP
-T10 defined SCSI command names given a CDB can be decoded using the sg_raw
-utility with the '\-vvv' option.
+The sg_raw utility takes a ASCII hexadecimal sequence representing a SCSI
+CDB. When sg_raw is given the '\-vvv' option, it will attempt to decode the
+CDB name.
.SH EXAMPLES
Sense data is often printed out in kernel logs and sometimes on the
command line when verbose or debug flags are given. It will be at least
diff --git a/doc/sg_format.8 b/doc/sg_format.8
index 5a54998f..11f38a0f 100644
--- a/doc/sg_format.8
+++ b/doc/sg_format.8
@@ -1,4 +1,4 @@
-.TH SG_FORMAT "8" "July 2018" "sg3_utils\-1.43" SG3_UTILS
+.TH SG_FORMAT "8" "August 2018" "sg3_utils\-1.43" SG3_UTILS
.SH NAME
sg_format \- format, resize a SCSI disk or format a tape
.SH SYNOPSIS
@@ -9,7 +9,7 @@ sg_format \- format, resize a SCSI disk or format a tape
[\fI\-\-ip\-def\fR] [\fI\-\-long\fR] [\fI\-\-mode=MP\fR] [\fI\-\-pfu=PFU\fR]
[\fI\-\-pie=PIE\fR] [\fI\-\-pinfo\fR] [\fI\-\-poll=PT\fR] [\fI\-\-quick\fR]
[\fI\-\-resize\fR] [\fI\-\-rto_req\fR] [\fI\-\-security\fR] [\fI\-\-six\fR]
-[\fI\-\-size=SIZE\fR] [\fI\-\-tape=FM\fR] [\fI\-\-timeout=SECS\fR]
+[\fI\-\-size=LB_SZ\fR] [\fI\-\-tape=FM\fR] [\fI\-\-timeout=SECS\fR]
[\fI\-\-verbose\fR] [\fI\-\-verify\fR] [\fI\-\-version\fR] [\fI\-\-wait\fR]
\fIDEVICE\fR
.SH DESCRIPTION
@@ -32,7 +32,8 @@ stroking" (see NOTES section). Resizing the block count while not changing
the block size may not require a format operation. The SBC\-2 standard (see
www.t10.org) has obsoleted the "format device" mode page. Many of the low
level details found in that mode page are now left up to the discretion of
-the manufacturer.
+the manufacturer. There is a Format Status log page which reports on the
+previous successful format operation(s).
.PP
When this utility is used without options (i.e. it is only given a
\fIDEVICE\fR argument) it prints out the existing block size and block count
@@ -44,19 +45,21 @@ the NOTES section). This usage will not modify the disk.
When this utility is used with the "\-\-format" (or "\-F") option it will
attempt to format the given DEVICE. In the absence of the \fI\-\-quick\fR
option there is a 15 second pause during which time the user is invited
-thrice (5 seconds apart) to abort sg_format. This occurs just prior the
-SCSI FORMAT UNIT command being issued. See the NOTES section for more
-information.
+thrice (5 seconds apart) to abort sg_format. This occurs just prior the SCSI
+FORMAT UNIT command being issued. See the NOTES section for more information.
.PP
-Protection information is optional and is made up of one or more protection
-intervals, each made up of 8 bytes associated with each logical block. Four
-protection types are defined with protection type 0 being no protection
-intervals. See the PROTECTION INFORMATION section below for more information.
+Protection information (PI) is optional and is made up of one or more
+protection intervals, each made up of 8 bytes associated with a logical
+block. When PI is active each logical block will have 1, 2, 4, 8, etc
+protection intervals (i.e. a power of two), interleaved with (and following)
+the user data to which they refer. Four protection types are defined with
+protection type 0 being no protection intervals. See the PROTECTION
+INFORMATION section below for more information.
.PP
When the \fI\-\-tape=FM\fR option is given then the SCSI FORMAT MEDIUM
-command is sent to the \fIDEVICE\fR. FORMAT MEDIUM is defined in SSC
-document and prepares a volume for use which may include partitioning the
-medium. See the section below on TAPE for more information.
+command is sent to the \fIDEVICE\fR. FORMAT MEDIUM is defined in the SSC
+documents at T10 and prepares a volume for use. That may include
+partitioning the medium. See the section below on TAPE for more information.
.SH OPTIONS
Arguments to long options are mandatory for short options as well.
The options are arranged in alphabetical order based on the long
@@ -135,9 +138,10 @@ are mutually exclusive.
\fB\-t\fR, \fB\-\-ffmt\fR=\fIFFMT\fR
\fIFFMT\fR (fast format) is placed in a field of the same name in the FORMAT
UNIT cdb. The field was introduced in SBC\-4 revision 10. The default value
-is 0 which implies the former action which is typically to overwrite to all
+is 0 which implies the former action which is typically to overwrite all
blocks on the \fIDEVICE\fR. That can take a long time (e.g. with hard disks
-over 10 TB in size).
+over 10 TB in size that can be days). With \fIFFMT\fR set that time may be
+reduced to minutes. So it is worth trying if it is available.
.br
\fIFFMT\fR has values 1 and 2 for fast format with 3 being reserved
currently. These two values include this description: "The device server
@@ -148,14 +152,14 @@ data has been written to, after the fast format. When \fIFFMT\fR is 1 the
read operation should return "unspecified logical block data" and complete
without error. When \fIFFMT\fR is 2 the read operation may yield check
condition status with a sense key set to hardware error, medium error or
-command aborted. See SBC\-4 revision 10 section 4.35 for more details.
+command aborted. See SBC\-4 revision 15 section 4.35 for more details.
.TP
\fB\-f\fR, \fB\-\-fmtpinfo\fR=\fIFPI\fR
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
+bit field (bits 7 and 6 of byte 1 in the cdb). Prior to that revision 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 their place. See the PROTECTION INFORMATION section
below for more information.
@@ -208,7 +212,7 @@ Preferably the chosen (or default) mode page should be saveable (i.e.
accept the SP bit set in the MODE SELECT command used when the logical
block size is being changed). Recent version of this utility will retry a
MODE SELECT if the SP=1 variant fails with a sense key of ILLEGAL REQUEST.
-The retry that same MODE SELECT command with SP=0 .
+That retry will use the same MODE SELECT command but with SP=0 .
.TP
\fB\-P\fR, \fB\-\-pfu\fR=\fIPFU\fR
sets the "Protection Field Usage" field in the parameter block associated
@@ -251,7 +255,7 @@ This option should be used with the \fI\-\-count=COUNT\fR option.
The contents of all logical blocks on the media remain unchanged when
this option is used. This means that any resize operation can be
reversed. This option cannot be used together with either \fI\-\-format\fR
-or a \fI\-\-size=SIZE\fR whose argument is different to the existing block
+or a \fI\-\-size=LB_SZ\fR whose argument is different to the existing block
size.
.TP
\fB\-R\fR, \fB\-\-rto_req\fR
@@ -271,17 +275,21 @@ Use 6 byte variants of MODE SENSE and MODE SELECT. The default action
is to use the 10 byte variants. Some MO drives need this option set
when doing a format.
.TP
-\fB\-s\fR, \fB\-\-size\fR=\fISIZE\fR
-where \fISIZE\fR is the block size (i.e. number of bytes in each block) to
-format the device to. The default value is whatever is currently reported
-by the block descriptor in a MODE SENSE command. If the block size given by
-this option is different from the current value then a MODE SELECT command
-is used to change it prior to the FORMAT UNIT command being started (as
-recommended in the draft standard). Many SCSI disks have 512 byte sectors
-by default and allow up to 16 bytes extra in a sector (i.e. 528 byte
-sectors). If the given size in unacceptable with the disk, most likely
-an "Invalid field in parameter list" message will appear in sense
-data (requires the use of '\-v' to decode sense data).
+\fB\-s\fR, \fB\-\-size\fR=\fILB_SZ\fR
+where \fILB_SZ\fR is the logical block size (i.e. number of user bytes in each
+block) to format the device to. The default value is whatever is currently
+reported by the block descriptor in a MODE SENSE command. If the block size
+given by this option is different from the current value then a MODE SELECT
+command is used to change it prior to the FORMAT UNIT command being
+started (as recommended in the SBC standards). Some SCSI disks have 512 byte
+logical blocks by default and allow an alternate logical block size of 4096
+bytes. If the given size in unacceptable to the disk, most likely an "Invalid
+field in parameter list" message will appear in sense data (requires the
+use of '\-v' to decode sense data).
+.br
+Note that formatting a disk to add or remove protection information is not
+regarded as a change to its logical block size so this option should not
+be used.
.TP
\fB\-T\fR, \fB\-\-tape\fR=\fIFM\fR
will send a FORMAT MEDIUM command to the \fIDEVICE\fR with its FORMAT field
@@ -322,8 +330,8 @@ FORMAT UNIT or FORMAT MEDIUM command waits until the format operation
completes before returning its response. This can be many hours on large
disks. See the \fI\-\-timeout=SECS\fR option.
.SH LISTS
-The SBC\-3 draft (revision 36) defines PLIST, CLIST, DLIST and GLIST in
-section 4.13 on "Medium defects". Briefly, the PLIST is the "primary"
+The SBC\-3 draft (revision 20) defines PLIST, CLIST, DLIST and GLIST in
+section 4.10 on "Medium defects". Briefly, the PLIST is the "primary"
list of manufacturer detected defects, the CLIST ("certification" list)
contains those detected during the format operation, the DLIST is a list of
defects that can be given to the format operation. The GLIST is the grown
@@ -332,6 +340,10 @@ due to automatic reallocation (see the ARRE and AWRE bits in the
Read\-Write Error Recovery mode page (see sdparm(8))) and use of the
SCSI REASSIGN BLOCKS command (see sg_reassign(8)).
.PP
+By the SBC\-3 standard (following draft revision 36) the CLIST and DLIST
+had been removed, leaving PLIST and GLIST. Only PLIST and GLIST are found
+in the SBC\-4 drafts.
+.PP
The CMPLST bit (controlled by the \fI\-\-cmplst=\fR0|1 option) determines
whether the existing GLIST, when the format operation is invoked,
is taken into account. The sg_format utility sets the FOV bit to zero
@@ -344,7 +356,8 @@ list (i.e. DLIST).
Protection Information (PI) is additional information held with logical
blocks so that an application and/or host bus adapter can check the
correctness of those logical blocks. PI is placed in one or more
-protection intervals beside each logical block. A protection interval
+protection intervals interleaved in each logical block. Each protection
+interval follows the user data to which it refers. A protection interval
contains 8 bytes made up of a 2 byte "logical block guard" (CRC), a 2
byte "logical block application guard", and a 4 byte "logical block
reference tag". Devices with 512 byte logical block size typically have
@@ -354,13 +367,13 @@ intervals spread across its logical block data for a total size of 4160
bytes. Note that for all other purposes the logical block size is considered
to be 512 and 4096 bytes respectively.
.PP
-SBC\-3 drafts have added several "protection types" to the PI introduced in
-the SBC\-2 standard. SBC\-3 defines 4 protection types (types 0 to 3) with
-protection type 0 meaning no PI is maintained. While a device may support
-one or more protection types, it can only be formatted with 1 of the 4. To
-change a device's protection type, it must be re\-formatted. For more
-information see the Protection Information in section 4.22 of draft SBC\-3
-revision 36.
+The SBC\-3 standard have added several "protection types" to the PI
+introduced in the SBC\-2 standard. SBC\-3 defines 4 protection types (types
+0 to 3) with protection type 0 meaning no PI is maintained. While a device
+may support one or more protection types, it can only be formatted with 1
+of the 4. To change a device's protection type, it must be re\-formatted.
+For more information see the Protection Information in section 4.22 of
+draft SBC\-4 revision 15.
.PP
A device that supports PI information (i.e. supports one or more protection
types 1, 2 and 3) sets the "PROTECT" bit in its standard INQUIRY response. It
@@ -432,10 +445,10 @@ a device while it is being formatted.
When the block size (i.e. the number of bytes in each block) is changed
on a disk two SCSI commands must be sent: a MODE SELECT to change the block
size followed by a FORMAT command. If the MODE SELECT command succeeds and
-the FORMAT fails then the disk may be in a state that the draft standard
+the FORMAT fails then the disk may be in a state that the standard
calls "format corrupt". A block descriptor in a subsequent MODE SENSE
will report the requested new block size while a READ CAPACITY command
-will report the existing (i.e. different) block size. Alternatively
+will report the existing (i.e. previous) block size. Alternatively
the READ CAPACITY command may fail, reporting the device is not ready,
potentially requiring a format. The solution to this situation is to
do a format again (and this time the new block size does not have to
@@ -451,8 +464,11 @@ the manufacturer's maximum recommended value. To see exactly which SCSI
commands are being executed and parameters passed add the "\-vvv" option to
the sg_format command line.
.PP
-Short stroking is a technique to trade off capacity for performance. Rotating
-disk performance is usually highest on the outer tracks (i.e. lower logical
+Short stroking is a technique to trade off capacity for performance on
+hard disks. "Hard" disk is often used to mean a storage device with
+spinning platters which contain the user data. Solid State Disk (SSD) is
+the newer form of storage device that contains no moving parts. Hard disk
+performance is usually highest on the outer tracks (usually the lower logical
block addresses) so by resizing or reformatting a disk to a smaller capacity,
average performance will usually be increased.
.PP
diff --git a/doc/sg_get_lba_status.8 b/doc/sg_get_lba_status.8
index 13889b37..bc35208f 100644
--- a/doc/sg_get_lba_status.8
+++ b/doc/sg_get_lba_status.8
@@ -1,4 +1,4 @@
-.TH SG_GET_LBA_STATUS "8" "September 2017" "sg3_utils\-1.43" SG3_UTILS
+.TH SG_GET_LBA_STATUS "8" "August 2018" "sg3_utils\-1.43" SG3_UTILS
.SH NAME
sg_get_lba_status \- send SCSI GET LBA STATUS(16 or 32) command
.SH SYNOPSIS
@@ -11,7 +11,7 @@ sg_get_lba_status \- send SCSI GET LBA STATUS(16 or 32) command
.\" Add any additional description here
.PP
Send the SCSI GET LBA STATUS(16) or GET LBA STATUS(32) command to the
-\fIDEVICE\fR and outputs the response. The 16 byte command variant was
+\fIDEVICE\fR and output the response. The 16 byte command variant was
introduced in (draft) SBC\-3 revision 20 and devices that support logical
block provisioning should support this command. The GET LBA STATUS(32)
command was added in (draft) SBC\-4 revision 14.
@@ -55,6 +55,9 @@ where \fIEI\fR is the element identifier of the physical element for which
the LBAs shall be reported based on the value in the report type field (i.e.
\fIRT\fR). This option is only active with the SCSI GET LBA STATUS(32)
command (i.e. it is ignored if the GET LBA STATUS(16) command is sent).
+.br
+Valid element identifiers are non\-zero. The default value of \fIEI\fR is 0
+which means in the context that no element identifier is specified.
.TP
\fB\-h\fR, \fB\-\-help\fR
output the usage message then exit.
@@ -83,9 +86,13 @@ The default is to open it read\-write.
\fB\-t\fR, \fB\-\-report\-type\fR=\fIRT\fR
where \fIRT\fR is 0 for report all LBAs; 1 for report LBAs using non\-zero
provisioning status; 2 for report LBAs that are mapped; 3 for report LBAs
-that are de\-allocated; 4 for report LBAs that are anchored; 5 for report
+that are de\-allocated; 4 for report LBAs that are anchored; 16 for report
LBAs that may return an unrecovered error. The REPORT TYPE field was added
to the GET LBA STATUS cdb in sbc4r12.
+.br
+Since the REPORT TYPE field is newer than the command, the response contains
+the RTP bit to indicate whether or not the \fIDEVICE\fR acts on the REPORT
+TYE field (set when it does act on it, clear otherwise).
.TP
\fB\-s\fR, \fB\-\-scan\-len\fR=\fISL\fR
where \fISL\fR is the scan length which is the maximum number of contiguous
@@ -93,6 +100,10 @@ logical blocks to be scanned for logical blocks that meet the given report
type (i.e. \fIRT\fR). This option is only active with the SCSI GET LBA
STATUS(32) command (i.e. it is ignored if the GET LBA STATUS(16) command is
sent).
+.br
+The default value of \fISL\fR is 0 which should be interpreted by the
+\fIDEVICE\fR as there is no limits to the number of LBAs that shall be
+scanned.
.TP
\fB\-v\fR, \fB\-\-verbose\fR
increase the level of verbosity, (i.e. debug output). Additional output
@@ -115,7 +126,7 @@ Written by Douglas Gilbert.
.SH "REPORTING BUGS"
Report bugs to <dgilbert at interlog dot com>.
.SH COPYRIGHT
-Copyright \(co 2009\-2017 Douglas Gilbert
+Copyright \(co 2009\-2018 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.
diff --git a/doc/sg_ses.8 b/doc/sg_ses.8
index d8a5a8d4..573c92b0 100644
--- a/doc/sg_ses.8
+++ b/doc/sg_ses.8
@@ -1,4 +1,4 @@
-.TH SG_SES "8" "July 2018" "sg3_utils\-1.43" SG3_UTILS
+.TH SG_SES "8" "August 2018" "sg3_utils\-1.43" SG3_UTILS
.SH NAME
sg_ses \- access a SCSI Enclosure Services (SES) device
.SH SYNOPSIS
@@ -212,8 +212,9 @@ which is fine for a single dpage response. When all dpages are dumped (e.g.
with \fI\-\-page=all\fR) then the quad H form adds the name of each dpage
following a hash mark ('#'). The \fI\-\-data=\fR option parser ignores
everything from and including a hash mark to the end of the line. Hence the
-output of the quad H form is still parsable plus it is easier to users to
-view and possibly edit.
+output of the quad H form is still parsable plus it is easier for users to
+view and possibly edit. \fI\-HHHHH\fR (that is 5) adds the page code in
+hex after the page's name in the comment.
.TP
\fB\-I\fR, \fB\-\-index\fR=\fIIIA\fR
where \fIIIA\fR is either an individual index (II) or an Element type
diff --git a/doc/sg_xcopy.8 b/doc/sg_xcopy.8
index 978b0056..437bad08 100644
--- a/doc/sg_xcopy.8
+++ b/doc/sg_xcopy.8
@@ -1,4 +1,4 @@
-.TH SG_XCOPY "8" "October 2017" "sg3_utils\-1.43" SG3_UTILS
+.TH SG_XCOPY "8" "August 2018" "sg3_utils\-1.43" SG3_UTILS
.SH NAME
sg_xcopy \- copy data to and from files and devices using SCSI EXTENDED
COPY (XCOPY)
@@ -50,21 +50,21 @@ ODX is a market name and stands for Offloaded Data Xfer (i.e. transfer).
.TP
\fBbpt\fR=\fIBPT\fR
each IO transaction will be made using \fIBPT\fR blocks (or less if near
-the end of the copy). Default is 128 for block sizes less that 2048
+the end of the copy). Default is 128 for logical block sizes less that 2048
bytes, otherwise the default is 32. So for bs=512 the reads and writes
will each convey 64 KiB of data by default (less if near the end of the
transfer or memory restrictions). When cd/dvd drives are accessed, the
-block size is typically 2048 bytes and bpt defaults to 32 which again
+logical block size is typically 2048 bytes and bpt defaults to 32 which again
implies 64 KiB transfers.
.TP
\fBbs\fR=\fIBS\fR
where \fIBS\fR
.B must
-be the block size of the physical device (if either the input or output
-files are accessed via SCSI commands). Note that this differs from
+be the logical block size of the physical device (if either the input or
+output files are accessed via SCSI commands). Note that this differs from
.B dd(1)
which permits \fIBS\fR to be an integral multiple. Defaults to the
-device block size.
+device logical block size.
.TP
\fBcat\fR={0|1}
sets the SCSI EXTENDED COPY command segment descriptor CAT bit to 0 or
@@ -223,9 +223,9 @@ has no affect; for compatibility with ddpt.
.SH HANDLING OF RESIDUAL DATA
The \fIpad\fR and \fIcat\fR bits control the handling of residual
data. As the data can be specified either in terms of source or target
-block size and both might have different block sizes residual data is
-likely to happen in these cases.
-If both block sizes are identical these bits have no effect as
+logical block size and both might have different block sizes residual data
+is likely to happen in these cases.
+If both logical block sizes are identical these bits have no effect as
residual data will not occur.
.PP
If none of these bits are set, the EXTENDED COPY command will be
@@ -343,7 +343,7 @@ Written by Hannes Reinecke and Douglas Gilbert.
.SH "REPORTING BUGS"
Report bugs to <dgilbert at interlog dot com>.
.SH COPYRIGHT
-Copyright \(co 2000\-2017 Hannes Reinecke and Douglas Gilbert
+Copyright \(co 2000\-2018 Hannes Reinecke and Douglas Gilbert
.br
This software is distributed under the GPL version 2. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/lib/sg_lib.c b/lib/sg_lib.c
index e027f539..e23dfc6d 100644
--- a/lib/sg_lib.c
+++ b/lib/sg_lib.c
@@ -37,6 +37,7 @@
#include <ctype.h>
#include <inttypes.h>
#include <errno.h>
+#include <unistd.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -3525,7 +3526,6 @@ sg_lib_version()
Set text mode on fd. Does nothing in Unix. Returns negative number on
failure. */
-#include <unistd.h>
#include <fcntl.h>
int
diff --git a/lib/sg_lib_data.c b/lib/sg_lib_data.c
index 6ea5fa88..3f5f21d9 100644
--- a/lib/sg_lib_data.c
+++ b/lib/sg_lib_data.c
@@ -17,7 +17,7 @@
#include "sg_lib_data.h"
-const char * sg_lib_version_str = "2.53 20180712";/* spc5r19, sbc4r15 */
+const char * sg_lib_version_str = "2.54 20180808";/* spc5r19, sbc4r15 */
/* indexed by pdt; those that map to own index do not decay */
diff --git a/lib/sg_pt_solaris.c b/lib/sg_pt_solaris.c
index ff217cc1..dffb084a 100644
--- a/lib/sg_pt_solaris.c
+++ b/lib/sg_pt_solaris.c
@@ -5,7 +5,7 @@
* license that can be found in the BSD_LICENSE file.
*/
-/* sg_pt_solaris version 1.09 20180202 */
+/* sg_pt_solaris version 1.10 20180808 */
#include <stdio.h>
#include <stdlib.h>
@@ -98,7 +98,7 @@ construct_scsi_pt_obj_with_fd(int dev_fd, int verbose)
ptp = (struct sg_pt_solaris_scsi *)
calloc(1, sizeof(struct sg_pt_solaris_scsi));
if (ptp) {
- ptp->dev_fd = (dev_fd < 0) ? -1 : devfd;
+ ptp->dev_fd = (dev_fd < 0) ? -1 : dev_fd;
ptp->is_nvme = false;
ptp->uscsi.uscsi_timeout = DEF_TIMEOUT;
ptp->uscsi.uscsi_flags = USCSI_READ | USCSI_ISOLATE | USCSI_RQENABLE;
@@ -112,16 +112,7 @@ construct_scsi_pt_obj_with_fd(int dev_fd, int verbose)
struct sg_pt_base *
construct_scsi_pt_obj()
{
- struct sg_pt_solaris_scsi * ptp;
-
- ptp = (struct sg_pt_solaris_scsi *)
- calloc(1, sizeof(struct sg_pt_solaris_scsi));
- if (ptp) {
- ptp->uscsi.uscsi_timeout = DEF_TIMEOUT;
- ptp->uscsi.uscsi_flags = USCSI_READ | USCSI_ISOLATE | USCSI_RQENABLE;
- ptp->uscsi.uscsi_timeout = DEF_TIMEOUT;
- }
- return (struct sg_pt_base *)ptp;
+ return construct_scsi_pt_obj_with_fd(-1, 0);
}
void
@@ -322,6 +313,14 @@ get_scsi_pt_result_category(const struct sg_pt_base * vp)
return SCSI_PT_RESULT_GOOD;
}
+uint32_t
+get_pt_result(const struct sg_pt_base * vp)
+{
+ const struct sg_pt_solaris_scsi * ptp = &vp->impl;
+
+ return (uint32_t)ptp->uscsi.uscsi_status;
+}
+
int
get_scsi_pt_resid(const struct sg_pt_base * vp)
{
diff --git a/sg3_utils.spec b/sg3_utils.spec
index 491a6e83..22167bf1 100644
--- a/sg3_utils.spec
+++ b/sg3_utils.spec
@@ -8,7 +8,7 @@ Group: Utilities/System
Source: ftp://sg.danny.cz/sg/p/sg3_utils-%{version}.tgz
Url: http://sg.danny.cz/sg/sg3_utils.html
Provides: sg_utils
-BuildRequires: libtool
+# BuildRequires: libtool
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Packager: Douglas Gilbert <dgilbert@interlog.com>
@@ -49,6 +49,10 @@ developing applications.
%build
%configure
+# Don't use rpath!
+sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
+sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
+
%install
if [ "$RPM_BUILD_ROOT" != "/" ]; then
rm -rf $RPM_BUILD_ROOT
@@ -80,7 +84,7 @@ fi
%{_libdir}/*.la
%changelog
-* Mon Jul 16 2018 - dgilbert at interlog dot com
+* Wed Aug 08 2018 - dgilbert at interlog dot com
- track t10 changes
* sg3_utils-1.43
diff --git a/src/sg_dd.c b/src/sg_dd.c
index 9dd5f2c1..edd8f9c3 100644
--- a/src/sg_dd.c
+++ b/src/sg_dd.c
@@ -48,9 +48,11 @@
#include <sys/time.h>
#include <sys/file.h>
#include <sys/sysmacros.h>
-#include <sys/types.h> /* needed for lseek64() */
-#include <linux/fs.h> /* <sys/mount.h> */
-#include <linux/major.h>
+#ifndef major
+#include <sys/types.h>
+#endif
+#include <linux/major.h> /* for MEM_MAJOR, SCSI_GENERIC_MAJOR, etc */
+#include <linux/fs.h> /* for BLKSSZGET and friends */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -62,7 +64,7 @@
#include "sg_unaligned.h"
#include "sg_pr2serr.h"
-static const char * version_str = "6.03 20180723";
+static const char * version_str = "6.04 20180811";
#define ME "sg_dd: "
diff --git a/src/sg_format.c b/src/sg_format.c
index 7c34b43f..ab19a8a8 100644
--- a/src/sg_format.c
+++ b/src/sg_format.c
@@ -38,7 +38,7 @@
#include "sg_pr2serr.h"
#include "sg_pt.h"
-static const char * version_str = "1.52 20180723";
+static const char * version_str = "1.53 20180809";
#define RW_ERROR_RECOVERY_PAGE 1 /* can give alternate with --mode=MP */
@@ -156,7 +156,7 @@ usage()
"[--pinfo]\n"
" [--poll=PT] [--quick] [--resize] [--rto_req] "
"[--security]\n"
- " [--six] [--size=SIZE] [--tape=FM] "
+ " [--six] [--size=LB_SZ] [--tape=FM] "
"[--timeout=SECS] [--verbose]\n"
" [--verify] [--version] [--wait] DEVICE\n"
" where:\n"
@@ -209,7 +209,7 @@ usage()
" --six|-6 use 6 byte MODE SENSE/SELECT to probe "
"disk\n"
" (def: use 10 byte MODE SENSE/SELECT)\n"
- " --size=SIZE|-s SIZE bytes per logical block, "
+ " --size=LB_SZ|-s LB_SZ bytes per logical block, "
"defaults to DEVICE's\n"
" current logical block size. Only "
"needed to\n"
diff --git a/src/sg_get_lba_status.c b/src/sg_get_lba_status.c
index 6791164c..91c7a96d 100644
--- a/src/sg_get_lba_status.c
+++ b/src/sg_get_lba_status.c
@@ -33,7 +33,7 @@
* device.
*/
-static const char * version_str = "1.17 20180626";
+static const char * version_str = "1.18 20180812"; /* sbc4r15 */
#ifndef UINT32_MAX
#define UINT32_MAX ((uint32_t)-1)
@@ -85,7 +85,8 @@ usage()
"add_status>\n"
" use twice ('-bb') for given LBA "
"provisioning status\n"
- " --element-id=EI|-e EI EI is the element identifier\n"
+ " --element-id=EI|-e EI EI is the element identifier "
+ "(def: 0)\n"
" --help|-h print out usage message\n"
" --hex|-H output in hexadecimal\n"
" --lba=LBA|-l LBA starting LBA (logical block address) "
@@ -102,10 +103,11 @@ usage()
" 2-> LBAs that are mapped\n"
" 3-> LBAs that are deallocated\n"
" 4-> LBAs that are anchored\n"
- " 5-> LBAs that may return "
+ " 16-> LBAs that may return "
"unrecovered error\n"
- " --scan-len=SL|-s SL SL in maximum scan length "
- "(unit: logical blocks)\n"
+ " --scan-len=SL|-s SL SL in maximum scan length (unit: "
+ "logical blocks)\n"
+ " (def: 0 which implies no limit)\n"
" --verbose|-v increase verbosity\n"
" --version|-V print version string and exit\n\n"
"Performs a SCSI GET LBA STATUS(16) or GET LBA STATUS(32) "
diff --git a/src/sg_inq.c b/src/sg_inq.c
index 9721486e..f2b3aa6a 100644
--- a/src/sg_inq.c
+++ b/src/sg_inq.c
@@ -49,7 +49,7 @@
#include "sg_pt_nvme.h"
#endif
-static const char * version_str = "1.96 20180626"; /* SPC-5 rev 19 */
+static const char * version_str = "1.97 20180801"; /* SPC-5 rev 19 */
/* INQUIRY notes:
* It is recommended that the initial allocation length given to a
@@ -1525,9 +1525,9 @@ decode_dev_ids(const char * leadin, uint8_t * buff, int len, int do_hex,
* Reference the 3rd byte of the first Identification descriptor
* of a page 83 reply to determine whether the reply is compliant
* with SCSI-2 or SPC-2/3 specifications. A zero value in the
- * 3rd byte indicates an SPC-2/3 conformant reply ( the field is
+ * 3rd byte indicates an SPC-2/3 conforming reply ( the field is
* reserved ). This byte will be non-zero for a SCSI-2
- * conformant page 83 reply from these EMC Symmetrix models since
+ * conforming page 83 reply from these EMC Symmetrix models since
* the 7th byte of the reply corresponds to the 4th and 5th
* nibbles of the 6-byte OUI for EMC, that is, 0x006048.
*/
@@ -1911,7 +1911,7 @@ export_dev_ids(uint8_t * buff, int len, int verbose)
break;
if ((2 == c_set) || (3 == c_set)) { /* ASCII or UTF-8 */
k = encode_whitespaces(ip, i_len);
- /* udev-conformant character encoding */
+ /* udev-conforming character encoding */
if (k > 0) {
printf("SCSI_IDENT_%s_VENDOR=", assoc_str);
for (m = 0; m < k; ++m) {
@@ -1936,7 +1936,7 @@ export_dev_ids(uint8_t * buff, int len, int verbose)
printf("SCSI_IDENT_%s_T10=", assoc_str);
if ((2 == c_set) || (3 == c_set)) {
k = encode_whitespaces(ip, i_len);
- /* udev-conformant character encoding */
+ /* udev-conforming character encoding */
for (m = 0; m < k; ++m) {
if ((ip[m] >= '0' && ip[m] <= '9') ||
(ip[m] >= 'A' && ip[m] <= 'Z') ||
@@ -3584,7 +3584,7 @@ vpd_decode(int sg_fd, const struct opts_t * op, int inhex_len)
k = encode_whitespaces((uint8_t *)obuff, len);
if (k > 0) {
printf("SCSI_IDENT_SERIAL=");
- /* udev-conformant character encoding */
+ /* udev-conforming character encoding */
for (m = 0; m < k; ++m) {
if ((obuff[m] >= '0' && obuff[m] <= '9') ||
(obuff[m] >= 'A' && obuff[m] <= 'Z') ||
diff --git a/src/sg_read.c b/src/sg_read.c
index 13058431..fb959c96 100644
--- a/src/sg_read.c
+++ b/src/sg_read.c
@@ -38,7 +38,9 @@
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/sysmacros.h>
-#include <sys/types.h> /* needed for lseek64() */
+#ifndef major
+#include <sys/types.h>
+#endif
#include <sys/mman.h>
#include <sys/time.h>
#include <linux/major.h>
@@ -53,7 +55,7 @@
#include "sg_pr2serr.h"
-static const char * version_str = "1.33 20180724";
+static const char * version_str = "1.34 20180811";
#define DEF_BLOCK_SIZE 512
#define DEF_BLOCKS_PER_TRANSFER 128
diff --git a/src/sg_ses.c b/src/sg_ses.c
index b977a6e6..2b05f4aa 100644
--- a/src/sg_ses.c
+++ b/src/sg_ses.c
@@ -36,7 +36,7 @@
* commands tailored for SES (enclosure) devices.
*/
-static const char * version_str = "2.42 20180724"; /* ses4r02 */
+static const char * version_str = "2.43 20180810"; /* ses4r02 */
#define MX_ALLOC_LEN ((64 * 1024) - 4) /* max allowable for big enclosures */
#define MX_ELEM_HDR 1024
@@ -4106,8 +4106,12 @@ process_status_dpage(struct sg_pt_base * ptvp, int page_code, uint8_t * resp,
goto fini;
} else if (op->do_hex) {
if (op->do_hex > 2) {
- if (4 == op->do_hex)
- printf("\n# %s:\n", cp);
+ if (op->do_hex > 3) {
+ if (4 == op->do_hex)
+ printf("\n# %s:\n", cp);
+ else
+ printf("\n# %s [0x%x]:\n", cp, page_code);
+ }
hex2stdout(resp, resp_len, -1);
} else {
printf("# Response in hex for %s:\n", cp);
diff --git a/src/sg_xcopy.c b/src/sg_xcopy.c
index aa212eaa..98a7ca15 100644
--- a/src/sg_xcopy.c
+++ b/src/sg_xcopy.c
@@ -55,7 +55,6 @@
#include <sys/types.h>
#endif
#include <linux/major.h>
-#include <linux/fs.h> /* <sys/mount.h> */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -68,7 +67,7 @@
#include "sg_unaligned.h"
#include "sg_pr2serr.h"
-static const char * version_str = "0.67 20180705";
+static const char * version_str = "0.68 20180811";
#define ME "sg_xcopy: "
diff --git a/src/sginfo.c b/src/sginfo.c
index f3b87deb..bddc9641 100644
--- a/src/sginfo.c
+++ b/src/sginfo.c
@@ -122,7 +122,7 @@
#define _GNU_SOURCE 1
#endif
-static const char * version_str = "2.41 [20180724]";
+static const char * version_str = "2.42 [20180811]";
#include <stdio.h>
#include <string.h>
@@ -3435,6 +3435,9 @@ show_devices(int raw)
if ( isdigit(entry->d_name[strlen(entry->d_name)-1]) ) {
continue;
}
+ if ( strncmp("snapshot",entry->d_name,8) == 0 ) {
+ continue;
+ }
snprintf(dev_name, sizeof(dev_name),"/dev/%s",entry->d_name);
diff --git a/src/sgm_dd.c b/src/sgm_dd.c
index 912d7593..5d97589f 100644
--- a/src/sgm_dd.c
+++ b/src/sgm_dd.c
@@ -52,9 +52,11 @@
#include <sys/time.h>
#include <sys/mman.h>
#include <sys/sysmacros.h>
-#include <sys/types.h> /* needed for lseek64() */
-#include <linux/major.h>
-#include <linux/fs.h> /* <sys/mount.h> */
+#ifndef major
+#include <sys/types.h>
+#endif
+#include <linux/major.h> /* for MEM_MAJOR, SCSI_GENERIC_MAJOR, etc */
+#include <linux/fs.h> /* for BLKSSZGET and friends */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -66,7 +68,7 @@
#include "sg_pr2serr.h"
-static const char * version_str = "1.59 20180724";
+static const char * version_str = "1.60 20180811";
#define DEF_BLOCK_SIZE 512
#define DEF_BLOCKS_PER_TRANSFER 128
diff --git a/src/sgp_dd.c b/src/sgp_dd.c
index fdbe61d9..7b760923 100644
--- a/src/sgp_dd.c
+++ b/src/sgp_dd.c
@@ -45,10 +45,12 @@
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/sysmacros.h>
-#include <sys/types.h> /* needed for lseek64() */
+#ifndef major
+#include <sys/types.h>
+#endif
#include <sys/time.h>
-#include <linux/major.h>
-#include <linux/fs.h> /* <sys/mount.h> */
+#include <linux/major.h> /* for MEM_MAJOR, SCSI_GENERIC_MAJOR, etc */
+#include <linux/fs.h> /* for BLKSSZGET and friends */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -60,7 +62,7 @@
#include "sg_pr2serr.h"
-static const char * version_str = "5.68 20180724";
+static const char * version_str = "5.69 20180811";
#define DEF_BLOCK_SIZE 512
#define DEF_BLOCKS_PER_TRANSFER 128