testing/sgh_dd: rename of sgs_dd to avoid ... testing/sgs_dd: from archive, for testing SIGPOLL
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@801 6180dd3e-e324-4e3e-922d-17de1ae2f315
diff --git a/ChangeLog b/ChangeLog
index 49ca734..258b295 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,7 +2,7 @@
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.45 [20181220] [svn: r800]
+Changelog for sg3_utils-1.45 [20181222] [svn: r801]
- sg_ses: bug: --page= being overridden when --control
and --data= also given; fix
- sg_opcodes: expand MLU (18-102r0)
@@ -15,6 +15,8 @@
- testing/sg_tst_async: fix free_list issue
- testing/sg_tst_ioctl: for sg 3.9 driver
- testing/sgs_dd: for share in sg 3.9.02 driver
+ - testing/sgh_dd: rename of sgs_dd to avoid ...
+ - testing/sgs_dd: from archive, for testing SIGPOLL
- sg_io_linux (sg_lib): add sg_linux_sense_print()
- sg_pt_linux: uses sg v4 interface if sg driver
>= 4.0.0 . Force sg v3 always by building with
diff --git a/testing/Makefile b/testing/Makefile
index c4dfbc3..9326ef3 100644
--- a/testing/Makefile
+++ b/testing/Makefile
@@ -5,7 +5,7 @@
MANDIR=$(DESTDIR)/$(PREFIX)/man
EXECS = sg_iovec_tst sg_sense_test sg_queue_tst bsg_queue_tst sg_chk_asc \
- sg_tst_nvme sg_tst_ioctl tst_sg_lib sgs_dd
+ sg_tst_nvme sg_tst_ioctl tst_sg_lib sgh_dd sgs_dd
EXTRAS =
@@ -80,9 +80,12 @@
tst_sg_lib: tst_sg_lib.o ../lib/sg_lib.o ../lib/sg_lib_data.o
$(LD) -o $@ $(LDFLAGS) $^
-sgs_dd: sgs_dd.o $(LIBFILESNEW)
+sgh_dd: sgh_dd.o $(LIBFILESNEW)
$(LD) -o $@ $(LDFLAGS) -pthread $^
+sgs_dd: sgs_dd.o $(LIBFILESOLD)
+ $(LD) -o $@ $(LDFLAGS) $^
+
install: $(EXECS)
install -d $(INSTDIR)
for name in $^; \
diff --git a/testing/sgs_dd.c b/testing/sgh_dd.c
similarity index 98%
rename from testing/sgs_dd.c
rename to testing/sgh_dd.c
index 15c4a4b..33994a4 100644
--- a/testing/sgs_dd.c
+++ b/testing/sgh_dd.c
@@ -28,8 +28,11 @@
* sgp_dd and sg_dd only perform special tasks when one or both of the given
* devices belong to the Linux sg driver.
*
- * sgs_dd further extends sgp_dd to use the experimental kernel buffer
+ * sgh_dd further extends sgp_dd to use the experimental kernel buffer
* sharing feature added in 3.9.02 .
+ * N.B. This utility was previously called sgs_dd but there was already an
+ * archived version of a dd variant called sgs_dd so this utility name was
+ * renamed [20181221]
*/
#define _XOPEN_SOURCE 600
@@ -88,7 +91,7 @@
#include "sg_pr2serr.h"
-static const char * version_str = "1.08 20181220";
+static const char * version_str = "1.08 20181221";
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wclobbered"
@@ -250,7 +253,7 @@
static int num_threads = DEF_NUM_THREADS;
static int exit_status = 0;
-static const char * my_name = "sgs_dd: ";
+static const char * my_name = "sgh_dd: ";
#ifdef __GNUC__
@@ -475,7 +478,7 @@
else if (pg_num > 1)
goto page2;
- pr2serr("Usage: sgs_dd [bs=BS] [count=COUNT] [ibs=BS] [if=IFILE]"
+ pr2serr("Usage: sgh_dd [bs=BS] [count=COUNT] [ibs=BS] [if=IFILE]"
" [iflag=FLAGS]\n"
" [obs=BS] [of=OFILE] [oflag=FLAGS] "
"[seek=SEEK] [skip=SKIP]\n"
@@ -514,7 +517,7 @@
);
return;
page2:
- pr2serr("Syntax: sgs_dd [operands] [options]\n\n"
+ pr2serr("Syntax: sgh_dd [operands] [options]\n\n"
" where: operands have the form name=value and are pecular to "
"'dd'\n style commands, and options start with one or two "
"hyphens\n\n"
@@ -548,7 +551,7 @@
);
return;
page3:
- pr2serr("Syntax: sgs_dd [operands] [options]\n\n"
+ pr2serr("Syntax: sgh_dd [operands] [options]\n\n"
" where: iflag=' and 'oflag=' arguments are listed below:\n"
" 2fds only 2 file descriptors (1 each for IFILE and "
"OFILE) are\n"
@@ -1528,7 +1531,7 @@
seip->valid_rd_mask |= SG_SEIM_SGAT_ELEM_SZ;
res = ioctl(fd, SG_SET_GET_EXTENDED, seip);
if (res < 0)
- pr2serr_lk("sgs_dd: %s: SG_SET_GET_EXTENDED(SGAT_ELEM_SZ) rd "
+ pr2serr_lk("sgh_dd: %s: SG_SET_GET_EXTENDED(SGAT_ELEM_SZ) rd "
"error: %s\n", __func__, strerror(errno));
if (elem_sz != (int)seip->sgat_elem_sz) {
memset(seip, 0, sizeof(*seip));
@@ -1536,7 +1539,7 @@
seip->sgat_elem_sz = elem_sz;
res = ioctl(fd, SG_SET_GET_EXTENDED, seip);
if (res < 0)
- pr2serr_lk("sgs_dd: %s: SG_SET_GET_EXTENDED(SGAT_ELEM_SZ) "
+ pr2serr_lk("sgh_dd: %s: SG_SET_GET_EXTENDED(SGAT_ELEM_SZ) "
"wr error: %s\n", __func__, strerror(errno));
}
}
@@ -1544,7 +1547,7 @@
num = bs * bpt;
res = ioctl(fd, SG_SET_RESERVED_SIZE, &num);
if (res < 0)
- perror("sgs_dd: SG_SET_RESERVED_SIZE error");
+ perror("sgh_dd: SG_SET_RESERVED_SIZE error");
else if (mmpp) {
mmp = (uint8_t *)mmap(NULL, num, PROT_READ | PROT_WRITE,
MAP_SHARED, fd, 0);
@@ -1558,7 +1561,7 @@
t = 1;
res = ioctl(fd, SG_SET_FORCE_PACK_ID, &t);
if (res < 0)
- perror("sgs_dd: SG_SET_FORCE_PACK_ID error");
+ perror("sgh_dd: SG_SET_FORCE_PACK_ID error");
return (res < 0) ? 0 : num;
}