aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--doc/sg3_utils.85
-rw-r--r--src/sg_dd.c6
-rw-r--r--src/sg_read.c6
-rw-r--r--src/sg_write_atomic.c11
-rw-r--r--src/sgm_dd.c6
-rw-r--r--src/sgp_dd.c6
7 files changed, 20 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index e91bc326..d64a2874 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 [20171022] [svn: r722]
+Changelog for sg3_utils-1.43 [20171022] [svn: r723]
- sg_bg_ctl: new Background control command (sbc4r08)
- sg_write_atomic: new 16 and 32 byte cdbs (sbc4r04)
- also can issue plain WRITE(16 or 32)
diff --git a/doc/sg3_utils.8 b/doc/sg3_utils.8
index 4052cbba..772011d2 100644
--- a/doc/sg3_utils.8
+++ b/doc/sg3_utils.8
@@ -314,6 +314,11 @@ problems with protection information (PI or DIF). For example this error
may occur when reading a block on a drive that has never been written (or
is unmapped) if that drive was formatted with type 1, 2 or 3 protection.
.TP
+.B 49
+low level driver reports a residual count (i.e. number of bytes actually
+received by HBA is 'requested_bytes - residual_count') that is high enough
+to indicate that no useful processing can be done on that response.
+.TP
.B 97
a SCSI command response failed sanity checks.
.TP
diff --git a/src/sg_dd.c b/src/sg_dd.c
index 7bb5eedf..736d1e05 100644
--- a/src/sg_dd.c
+++ b/src/sg_dd.c
@@ -48,9 +48,7 @@
#include <sys/time.h>
#include <sys/file.h>
#include <sys/sysmacros.h>
-#ifndef major
-#include <sys/types.h>
-#endif
+#include <sys/types.h> /* needed for lseek64() */
#include <linux/fs.h> /* <sys/mount.h> */
#include <linux/major.h>
@@ -64,7 +62,7 @@
#include "sg_unaligned.h"
#include "sg_pr2serr.h"
-static const char * version_str = "5.91 20171010";
+static const char * version_str = "5.92 20171023";
#define ME "sg_dd: "
diff --git a/src/sg_read.c b/src/sg_read.c
index 1eb04110..dfe5728d 100644
--- a/src/sg_read.c
+++ b/src/sg_read.c
@@ -38,9 +38,7 @@
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/sysmacros.h>
-#ifndef major
-#include <sys/types.h>
-#endif
+#include <sys/types.h> /* needed for lseek64() */
#include <sys/mman.h>
#include <sys/time.h>
#include <linux/major.h>
@@ -54,7 +52,7 @@
#include "sg_pr2serr.h"
-static const char * version_str = "1.27 20171008";
+static const char * version_str = "1.28 20171023";
#define DEF_BLOCK_SIZE 512
#define DEF_BLOCKS_PER_TRANSFER 128
diff --git a/src/sg_write_atomic.c b/src/sg_write_atomic.c
index 1858a621..d81d5bff 100644
--- a/src/sg_write_atomic.c
+++ b/src/sg_write_atomic.c
@@ -14,7 +14,8 @@
#include <string.h>
#include <errno.h>
#include <limits.h>
-#include <sys/types.h>
+#include <sys/sysmacros.h>
+#include <sys/types.h> /* needed for lseek() */
#include <sys/stat.h>
#include <getopt.h>
#define __STDC_FORMAT_MACROS 1
@@ -30,7 +31,7 @@
#include "sg_unaligned.h"
#include "sg_pr2serr.h"
-static const char * version_str = "1.01 20171008";
+static const char * version_str = "1.02 20171024";
#define ME "sg_write_atomic: "
@@ -623,10 +624,10 @@ main(int argc, char * argv[])
perror("sg_set_binary_mode");
}
if (op->offset > 0) {
- off64_t off = op->offset;
+ off_t off = op->offset;
-/* lseek64() won't work with stdin or pipes, for example */
- if (lseek64(infd, off, SEEK_SET) < 0) {
+ /* lseek() won't work with stdin or pipes, for example */
+ if (lseek(infd, off, SEEK_SET) < 0) {
snprintf(ebuff, EBUFF_SZ,
"couldn't offset to required position on %s",
op->ifilename);
diff --git a/src/sgm_dd.c b/src/sgm_dd.c
index edf48619..afae2235 100644
--- a/src/sgm_dd.c
+++ b/src/sgm_dd.c
@@ -52,9 +52,7 @@
#include <sys/time.h>
#include <sys/mman.h>
#include <sys/sysmacros.h>
-#ifndef major
-#include <sys/types.h>
-#endif
+#include <sys/types.h> /* needed for lseek64() */
#include <linux/major.h>
#include <linux/fs.h> /* <sys/mount.h> */
@@ -68,7 +66,7 @@
#include "sg_pr2serr.h"
-static const char * version_str = "1.49 20171011";
+static const char * version_str = "1.50 20171023";
#define DEF_BLOCK_SIZE 512
#define DEF_BLOCKS_PER_TRANSFER 128
diff --git a/src/sgp_dd.c b/src/sgp_dd.c
index be9547bd..e1545552 100644
--- a/src/sgp_dd.c
+++ b/src/sgp_dd.c
@@ -45,9 +45,7 @@
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/sysmacros.h>
-#ifndef major
-#include <sys/types.h>
-#endif
+#include <sys/types.h> /* needed for lseek64() */
#include <sys/time.h>
#include <linux/major.h>
#include <linux/fs.h> /* <sys/mount.h> */
@@ -62,7 +60,7 @@
#include "sg_pr2serr.h"
-static const char * version_str = "5.56 20171011";
+static const char * version_str = "5.57 20171023";
#define DEF_BLOCK_SIZE 512
#define DEF_BLOCKS_PER_TRANSFER 128