aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2017-11-04 21:01:08 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2017-11-04 21:01:08 +0000
commitb77f4de57f4048774e8a78fac9934b58d33b6a68 (patch)
tree917e55edd4852e89c071f01f4c375efcf6f82116
parent3d464ff0b558af456cd4baa79b609a0940489487 (diff)
downloadsg3_utils-b77f4de57f4048774e8a78fac9934b58d33b6a68.tar.gz
move some testing utilities out of the 'examples' and 'utils' directory into the new 'testing' directory; sg_vpd: add enclosure services device characteristics vpage
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@729 6180dd3e-e324-4e3e-922d-17de1ae2f315
-rw-r--r--ChangeLog8
-rw-r--r--README26
-rw-r--r--doc/sg_modes.89
-rw-r--r--examples/Makefile22
-rw-r--r--examples/README8
-rw-r--r--src/sg_inq.c10
-rw-r--r--src/sg_logs.c2
-rw-r--r--src/sg_vpd.c22
-rw-r--r--testing/Makefile95
-rw-r--r--testing/Makefile.cplus (renamed from examples/Makefile.cplus)0
-rw-r--r--testing/README28
-rw-r--r--testing/bsg_queue_tst.c (renamed from examples/bsg_queue_tst.c)0
-rw-r--r--testing/sg_chk_asc.c (renamed from utils/sg_chk_asc.c)0
-rw-r--r--testing/sg_iovec_tst.c (renamed from examples/sg_iovec_tst.c)0
-rwxr-xr-xtesting/sg_persist_tst.sh (renamed from examples/sg_persist_tst.sh)0
-rw-r--r--testing/sg_queue_tst.c (renamed from examples/sg_queue_tst.c)0
-rw-r--r--testing/sg_sense_test.c (renamed from examples/sg_sense_test.c)0
-rw-r--r--testing/sg_tst_async.cpp (renamed from examples/sg_tst_async.cpp)0
-rw-r--r--testing/sg_tst_context.cpp (renamed from examples/sg_tst_context.cpp)0
-rw-r--r--testing/sg_tst_excl.cpp (renamed from examples/sg_tst_excl.cpp)0
-rw-r--r--testing/sg_tst_excl2.cpp (renamed from examples/sg_tst_excl2.cpp)0
-rw-r--r--testing/sg_tst_excl3.cpp (renamed from examples/sg_tst_excl3.cpp)0
-rw-r--r--testing/tst_sg_lib.c (renamed from utils/tst_sg_lib.c)0
-rw-r--r--utils/Makefile9
-rw-r--r--utils/Makefile.freebsd4
-rw-r--r--utils/Makefile.solaris4
-rw-r--r--utils/README15
27 files changed, 199 insertions, 63 deletions
diff --git a/ChangeLog b/ChangeLog
index ddf7c9fb..70ab79d4 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 [20171103] [svn: r728]
+Changelog for sg3_utils-1.43 [20171104] [svn: r729]
- 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)
@@ -45,6 +45,8 @@ Changelog for sg3_utils-1.43 [20171103] [svn: r728]
page (spc5r09)
- block limits and block limit extension VPD pages:
add extra info about corner cases
+ - add enclosure services device characteristics
+ VPD page (T10/170-142r1 --> ses4r02 ??)
- add --force option to bypass checking supported
vpd pages page and fetch requested page directly
- add maximum inquiry|mode_page change logs fields
@@ -104,6 +106,10 @@ Changelog for sg3_utils-1.43 [20171103] [svn: r728]
- 55-scsi-sg3_id.rules: fixes from Suse
- https://github.com/hreinecke/sg3_utils
branch sles15 synced 20170914
+ - move some testing utilities out of the
+ 'examples' and 'utils' directory into the new
+ 'testing' directory
+ directory into the 'testing' directory
- gcc 7.2 cleanups (sysmacros.h etc)
- clang --analyze static checker clean ups
- shellcheck cleanup on scripts
diff --git a/README b/README
index f1c90b1d..0925e374 100644
--- a/README
+++ b/README
@@ -262,11 +262,10 @@ refer to the COVERAGE file.
Here is a list in alphabetical order of utilities found in the 'examples'
subdirectory:
- - bsg_queue_tst, sg_excl, scsi_inquiry, sg_iovec_tst, sg_queue_tst,
- sg_sat_chk_power, sg__sat_identify, sg__sat_phy_event,
- sg__sat_set_features, sg_sat_smart_rd_data, sg_simple1, sg_simple2,
- sg_simple3, sg_simple4, sg_simple5, sg_simple16, sg_tst_excl,
- sg_tst_excl2, sg_tst_excl3, sg_tst_context and sg_tst_async
+ - sg_excl, scsi_inquiry, sg_sat_chk_power, sg__sat_identify,
+ sg__sat_phy_event, sg__sat_set_features, sg_sat_smart_rd_data,
+ sg_simple1, sg_simple2, sg_simple3, sg_simple4, sg_simple5,
+ sg_simple16
Also in that subdirectory is a script to test sg_persist, an example data
file for sg_persist (called "transport_ids.txt") and an example data file for
@@ -274,6 +273,21 @@ sg_reassign (called "reassign_addr.txt"). There are several scripts
for 'sg_senddiag -pf -raw=-' that will put some SAS disk phys into
a "compliant jitter tolerance pattern" (CJTPAT).
+The 'testing' subdirectory contains source and a Makefiles to test
+kernel pass-through and associated drivers, mainly for Linux. There is
+both C code (with the extension ".c") and C++ code (with the extension
+".cpp"). There is a "Makefile" to build the C code and a "Makefile.cplus"
+to build the C++ code. Both depend on some object files from the "lib"
+subdirectory. So a sequence like this may be required prior to invoking
+one of the Mkaefiles in the directory: "cd <top_of_package> ;
+./configure ; cd lib ; make ; cd ../testing".
+
+Here is a list in alphabetical order of utilities found in the 'testing'
+subdirectory:
+ - bsg_queue_tst, sg_iovec_tst, sg_queue_tst, sg_sense_tst,
+ sg_tst_async (C++), sg_tst_context (C++), sg_tst_excl (C++),
+ sg_tst_excl2 (C++), sg_tst_excl3 (C++)
+
The 'utils' subdirectory contains source and a Makefile to build "hxascdmp"
which accepts binary data from stdin (or a file on the command line) and
outputs an ASCII-HEX and ASCII representation of it. It is similar to the
@@ -462,4 +476,4 @@ See http://sg.danny.cz/sg/tools.html
Douglas Gilbert
-21st September 2017
+4th November 2017
diff --git a/doc/sg_modes.8 b/doc/sg_modes.8
index 257b6e49..e1ef2011 100644
--- a/doc/sg_modes.8
+++ b/doc/sg_modes.8
@@ -1,4 +1,4 @@
-.TH SG_MODES "8" "October 2017" "sg3_utils\-1.43" SG3_UTILS
+.TH SG_MODES "8" "November 2017" "sg3_utils\-1.43" SG3_UTILS
.SH NAME
sg_modes \- reads mode pages with SCSI MODE SENSE command
.SH SYNOPSIS
@@ -18,8 +18,11 @@ sg_modes \- reads mode pages with SCSI MODE SENSE command
.\" Add any additional description here
.PP
This utility sends a MODE SENSE SCSI command to the \fIDEVICE\fR and
-outputs the response. There is a 6 byte and 10 byte (cdb) variant of
-the MODE SENSE command, this utility defaults to the 10 byte variant.
+outputs the response. There is a 6 byte and 10 byte (cdb) variant of the
+MODE SENSE command, this utility defaults to the 10 byte variant. The SPC\-4
+standard (and SPC\-5 drafts) include a note stating that implementers should
+migrate away from the SCSI MODE SELECT(6) and MODE SENSE(6) commands in
+favour of the 10 byte variants (e.g. MODE SEMSE(10)).
.PP
This utility decodes mode page headers and block descriptors but outputs
the contents of each mode page in hex. It also has no facility to change
diff --git a/examples/Makefile b/examples/Makefile
index 2f02328f..cd8920d8 100644
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -8,13 +8,13 @@ CC = gcc
LD = gcc
EXECS = sg_simple1 sg_simple2 sg_simple3 sg_simple4 sg_simple16 \
- sg_iovec_tst scsi_inquiry sg_excl sg_sense_test sg_simple5 \
- sg__sat_identify sg__sat_phy_event sg__sat_set_features \
- sg_sat_chk_power sg_sat_smart_rd_data
+ scsi_inquiry sg_excl sg_simple5 sg__sat_identify \
+ sg__sat_phy_event sg__sat_set_features sg_sat_chk_power \
+ sg_sat_smart_rd_data
-EXTRAS = sg_queue_tst sgq_dd
+EXTRAS = sgq_dd
-BSG_EXTRAS = bsg_queue_tst
+BSG_EXTRAS =
MAN_PGS =
@@ -60,18 +60,12 @@ sg_simple4: sg_simple4.o $(LIBFILESOLD)
sg_simple16: sg_simple16.o $(LIBFILESOLD)
$(LD) -o $@ $(LDFLAGS) $^
-sg_iovec_tst: sg_iovec_tst.o $(LIBFILESOLD)
- $(LD) -o $@ $(LDFLAGS) $^
-
scsi_inquiry: scsi_inquiry.o
$(LD) -o $@ $(LDFLAGS) $^
sg_excl: sg_excl.o $(LIBFILESOLD)
$(LD) -o $@ $(LDFLAGS) $^
-sg_sense_test: sg_sense_test.o $(LIBFILESOLD)
- $(LD) -o $@ $(LDFLAGS) $^
-
sg_simple5: sg_simple5.o $(LIBFILESNEW)
$(LD) -o $@ $(LDFLAGS) $^
@@ -90,12 +84,6 @@ sg_sat_chk_power: sg_sat_chk_power.o $(LIBFILESOLD)
sg_sat_smart_rd_data: sg_sat_smart_rd_data.o $(LIBFILESOLD)
$(LD) -o $@ $(LDFLAGS) $^
-sg_queue_tst: sg_queue_tst.o $(LIBFILESOLD)
- $(LD) -o $@ $(LDFLAGS) $^
-
-bsg_queue_tst: bsg_queue_tst.o $(LIBFILESOLD)
- $(LD) -o $@ $(LDFLAGS) $^
-
sgq_dd: sgq_dd.o $(LIBFILESOLD)
$(LD) -o $@ $(LDFLAGS) $^
diff --git a/examples/README b/examples/README
index 0a17fb64..0b86426c 100644
--- a/examples/README
+++ b/examples/README
@@ -10,10 +10,8 @@ There is an brief explanation of each example in the README file in
the main (i.e. this directory's parent) directory. There are also
some notes at the top of each source file.
-
-Those files with the extension "cpp" are C++ examples that use facilities
-in C++11. They can be built by calling 'make -f Makefile.cplus'. A
-gcc/g++ compiler of 4.7.3 vintage or later will be required.
+Some files that were previously in this directory have been moved to
+the 'testing' directory.
Douglas Gilbert
-10th July 2014
+4th November 2017
diff --git a/src/sg_inq.c b/src/sg_inq.c
index f2a0719c..25dce472 100644
--- a/src/sg_inq.c
+++ b/src/sg_inq.c
@@ -43,7 +43,7 @@
#include "sg_unaligned.h"
#include "sg_pr2serr.h"
-static const char * version_str = "1.70 20171021"; /* SPC-5 rev 17 */
+static const char * version_str = "1.71 20171104"; /* SPC-5 rev 17 */
/* INQUIRY notes:
* It is recommended that the initial allocation length given to a
@@ -94,6 +94,7 @@ static const char * version_str = "1.70 20171021"; /* SPC-5 rev 17 */
#define VPD_BLOCK_LIMITS 0xb0
#define VPD_BLOCK_DEV_CHARS 0xb1
#define VPD_MAN_ASS_SN 0xb1
+#define VPD_ES_DEV_CHARS 0xb1
#define VPD_LB_PROVISIONING 0xb2
#define VPD_REFERRALS 0xb3
#define VPD_SUP_BLOCK_LENS 0xb4 /* sbc4r01 */
@@ -169,6 +170,8 @@ static struct svpd_values_name_t vpd_pg[] = {
"identification, target device only"},
#endif
{VPD_EXT_INQ, 0, -1, 0, "ei", "Extended inquiry data"},
+ {VPD_ES_DEV_CHARS, 0, PDT_SES, 0, "esdc",
+ "Enclosure services device characteristics (SES-4)"},
{VPD_LB_PROVISIONING, 0, 0, 0, "lbpv", "Logical block provisioning "
"(SBC)"},
{VPD_MAN_NET_ADDR, 0, -1, 0, "mna", "Management network addresses"},
@@ -1108,6 +1111,8 @@ static struct vpd_name vpd_name_arr[] = {
{VPD_REFERRALS, 0, "Referrals (sbc3)"},
{0xb0, PDT_TAPE, "Sequential access device capabilities (ssc3)"},
{0xb2, PDT_TAPE, "TapeAlert supported flags (ssc3)"},
+ {VPD_ES_DEV_CHARS, PDT_SES,
+ "Enclosure services device characteristics (ses4)"},
{0xb0, PDT_OSD, "OSD information (osd)"},
{0xb1, PDT_OSD, "Security token (osd)"},
/* 0xc0 to 0xff are vendor specific */
@@ -2410,6 +2415,7 @@ decode_b0_vpd(unsigned char * buff, int len, int do_hex)
/* VPD_BLOCK_DEV_CHARS sbc */
/* VPD_MAN_ASS_SN ssc */
+/* VPD_ES_DEV_CHARS ses-4 */
static void
decode_b1_vpd(unsigned char * buff, int len, int do_hex)
{
@@ -2475,6 +2481,8 @@ decode_b1_vpd(unsigned char * buff, int len, int do_hex)
printf(" Manufacturer-assigned serial number: %.*s\n",
len - 4, buff + 4);
break;
+ case PDT_SES: /* VPD_ES_DEV_CHARS implemented in sg_vpd, not here */
+ /* fall through */
default:
printf(" Unable to decode pdt=0x%x, in hex:\n", pdt);
dStrHex((const char *)buff, len, 0);
diff --git a/src/sg_logs.c b/src/sg_logs.c
index 728e423c..eadfe2e3 100644
--- a/src/sg_logs.c
+++ b/src/sg_logs.c
@@ -32,7 +32,7 @@
#include "sg_unaligned.h"
#include "sg_pr2serr.h"
-static const char * version_str = "1.54 20171022"; /* spc5r17 + sbc4r11 */
+static const char * version_str = "1.55 20171103"; /* spc5r17 + sbc4r11 */
#define MX_ALLOC_LEN (0xfffc)
#define SHORT_RESP_LEN 128
diff --git a/src/sg_vpd.c b/src/sg_vpd.c
index d4408033..728c7f9b 100644
--- a/src/sg_vpd.c
+++ b/src/sg_vpd.c
@@ -38,7 +38,7 @@
*/
-static const char * version_str = "1.30 20171012"; /* spc5r16 + sbc4r14 */
+static const char * version_str = "1.31 20171104"; /* spc5r17 + sbc4r14 */
/* standard VPD pages, in ascending page number order */
#define VPD_SUPPORTED_VPDS 0x0
@@ -66,6 +66,7 @@ static const char * version_str = "1.30 20171012"; /* spc5r16 + sbc4r14 */
#define VPD_BLOCK_DEV_CHARS 0xb1 /* SBC-3 */
#define VPD_MAN_ASS_SN 0xb1 /* SSC-3, ADC-2 */
#define VPD_SECURITY_TOKEN 0xb1 /* OSD */
+#define VPD_ES_DEV_CHARS 0xb1 /* SES-4 */
#define VPD_TA_SUPPORTED 0xb2 /* SSC-3 */
#define VPD_LB_PROVISIONING 0xb2 /* SBC-3 */
#define VPD_REFERRALS 0xb3 /* SBC-3 */
@@ -197,6 +198,8 @@ static struct svpd_values_name_t standard_vpd_pg[] = {
{VPD_DTDE_ADDRESS, 0, 1, "dtde",
"Data transfer device element address (SSC)"},
{VPD_EXT_INQ, 0, -1, "ei", "Extended inquiry data"},
+ {VPD_ES_DEV_CHARS, 0, PDT_SES, "esdc",
+ "Enclosure services device characteristics"},
{VPD_IMP_OP_DEF, 0, -1, "iod",
"Implemented operating definition (obsolete)"},
{VPD_LB_PROTECTION, 0, 0, "lbpro", "Logical block protection (SSC)"},
@@ -2185,6 +2188,7 @@ static const char * product_type_arr[] =
/* VPD_BLOCK_DEV_CHARS sbc */
/* VPD_MAN_ASS_SN ssc */
/* VPD_SECURITY_TOKEN osd */
+/* VPD_ES_DEV_CHARS ses-4 */
static void
decode_b1_vpd(unsigned char * buff, int len, int do_hex, int pdt)
{
@@ -2257,6 +2261,22 @@ decode_b1_vpd(unsigned char * buff, int len, int do_hex, int pdt)
printf(" Manufacturer-assigned serial number: %.*s\n",
len - 4, buff + 4);
break;
+ case PDT_SES: /* T10/17-142r1 -> ses4r02 ?? */
+ if (len < 8) {
+ pr2serr("Enclosure service device characteristics VPD page "
+ "length too short=%d\n", len);
+ return;
+ }
+ printf(" SESDNLD=%d\n", !! (0x2 & buff[4]));
+ printf(" SPCDNLD=%d\n", !! (0x1 & buff[4]));
+ printf(" DMAS=%d\n", !! (0x80 & buff[6]));
+ printf(" DMSAS=%d\n", !! (0x40 & buff[6]));
+ printf(" DMOAS=%d\n", !! (0x20 & buff[6]));
+ printf(" DMOSAS=%d\n", !! (0x10 & buff[6]));
+ printf(" DMOSASDS=%d\n", !! (0x8 & buff[6]));
+ printf(" DMOSDS=%d\n", !! (0x4 & buff[6]));
+ printf(" ADMS=%d\n", !! (0x1 & buff[6]));
+ break;
default:
pr2serr(" Unable to decode pdt=0x%x, in hex:\n", pdt);
dStrHexErr((const char *)buff, len, 0);
diff --git a/testing/Makefile b/testing/Makefile
new file mode 100644
index 00000000..2e4ef68a
--- /dev/null
+++ b/testing/Makefile
@@ -0,0 +1,95 @@
+SHELL = /bin/sh
+
+PREFIX=/usr/local
+INSTDIR=$(DESTDIR)/$(PREFIX)/bin
+MANDIR=$(DESTDIR)/$(PREFIX)/man
+
+CC = gcc
+LD = gcc
+
+EXECS = sg_iovec_tst sg_sense_test sg_queue_tst bsg_queue_tst sg_chk_asc \
+ tst_sg_lib
+
+EXTRAS =
+
+BSG_EXTRAS =
+
+
+MAN_PGS =
+MAN_PREF = man8
+
+LARGE_FILE_FLAGS = -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+
+# For C++/clang testing
+# ## CC = gcc
+# ## CC = g++
+# ## CC = clang
+# ## CC = clang++
+
+CFLAGS = -g -O2 -W -Wall -iquote ../include -D_REENTRANT $(LARGE_FILE_FLAGS)
+# CFLAGS = -g -O2 -Wall -iquote ../include -D_REENTRANT -DSG_KERNEL_INCLUDES $(LARGE_FILE_FLAGS)
+# CFLAGS = -g -O2 -Wall -pedantic -iquote ../include -D_REENTRANT $(LARGE_FILE_FLAGS)
+# CFLAGS = -Wall -W -iquote ../include -D_REENTRANT $(LARGE_FILE_FLAGS) -pedantic -std=c11 --analyze
+# CFLAGS = -Wall -W -iquote ../include -D_REENTRANT $(LARGE_FILE_FLAGS) -pedantic -std=c++14
+
+LDFLAGS =
+
+LIBFILESOLD = ../lib/sg_lib.o ../lib/sg_lib_data.o ../lib/sg_io_linux.o
+LIBFILESNEW = ../lib/sg_lib.o ../lib/sg_lib_data.o ../lib/sg_pt_linux.o
+
+all: $(EXECS)
+
+extras: $(EXTRAS)
+
+bsg: $(BSG_EXTRAS)
+
+
+depend dep:
+ for i in *.c; do $(CC) $(INCLUDES) $(CFLAGS) -M $$i; \
+ done > .depend
+
+clean:
+ /bin/rm -f *.o $(EXECS) $(EXTRAS) $(BSG_EXTRAS) core .depend
+
+sg_iovec_tst: sg_iovec_tst.o $(LIBFILESOLD)
+ $(LD) -o $@ $(LDFLAGS) $^
+
+sg_sense_test: sg_sense_test.o $(LIBFILESOLD)
+ $(LD) -o $@ $(LDFLAGS) $^
+
+sg_queue_tst: sg_queue_tst.o $(LIBFILESOLD)
+ $(LD) -o $@ $(LDFLAGS) $^
+
+bsg_queue_tst: bsg_queue_tst.o $(LIBFILESOLD)
+ $(LD) -o $@ $(LDFLAGS) $^
+
+# building sg_chk_asc depends on a prior successful make in ../lib
+sg_chk_asc: sg_chk_asc.o ../lib/sg_lib.o ../lib/sg_lib_data.o
+ $(LD) -o $@ $(LDFLAGS) $^
+
+tst_sg_lib: tst_sg_lib.o ../lib/sg_lib.o ../lib/sg_lib_data.o
+ $(LD) -o $@ $(LDFLAGS) $^
+
+install: $(EXECS)
+ install -d $(INSTDIR)
+ for name in $^; \
+ do install -s -o root -g root -m 755 $$name $(INSTDIR); \
+ done
+ install -d $(MANDIR)/$(MAN_PREF)
+ for mp in $(MAN_PGS); \
+ do install -o root -g root -m 644 $$mp $(MANDIR)/$(MAN_PREF); \
+ gzip -9f $(MANDIR)/$(MAN_PREF)/$$mp; \
+ done
+
+uninstall:
+ dists="$(EXECS)"; \
+ for name in $$dists; do \
+ rm -f $(INSTDIR)/$$name; \
+ done
+ for mp in $(MAN_PGS); do \
+ rm -f $(MANDIR)/$(MAN_PREF)/$$mp.gz; \
+ done
+
+ifeq (.depend,$(wildcard .depend))
+include .depend
+endif
diff --git a/examples/Makefile.cplus b/testing/Makefile.cplus
index b884b291..b884b291 100644
--- a/examples/Makefile.cplus
+++ b/testing/Makefile.cplus
diff --git a/testing/README b/testing/README
new file mode 100644
index 00000000..5b6a9790
--- /dev/null
+++ b/testing/README
@@ -0,0 +1,28 @@
+Building files in this directory depends on several files being already
+built in the ../lib directory. So to build files here, the ./configure
+needs to be executed in the parent directory followed by changing
+directory to the lib directory and calling 'make' there.
+Another way is to do a top level 'make' after the ./configure which
+will make the libraries followed by all the utilities in the src/
+directory.
+
+There is an brief explanation of each example in the README file in
+the main (i.e. this directory's parent) directory. There are also
+some notes at the top of each source file.
+
+The sg_chk_asc utility decodes the SCSI additional sense code table
+found at http://www.t10.org/lists/asc-num.txt and checks it against
+the table found in sg_lib_data.c in the lib/ subdirectory. It is
+designed to keep the table in sg_lib_data.c in "sync" with the
+table at the t10.org web site.
+
+The tst_sg_lib utility exercises several functions found in sg_lib.c
+and related files in the 'lib' sibling directory. Use 'tst_sg_lib -h'
+to get more information.
+
+Those files with the extension "cpp" are C++ examples that use facilities
+in C++11. They can be built by calling 'make -f Makefile.cplus'. A
+gcc/g++ compiler of 4.7.3 vintage or later will be required.
+
+Douglas Gilbert
+4th November 2017
diff --git a/examples/bsg_queue_tst.c b/testing/bsg_queue_tst.c
index af9ccff0..af9ccff0 100644
--- a/examples/bsg_queue_tst.c
+++ b/testing/bsg_queue_tst.c
diff --git a/utils/sg_chk_asc.c b/testing/sg_chk_asc.c
index cb30075d..cb30075d 100644
--- a/utils/sg_chk_asc.c
+++ b/testing/sg_chk_asc.c
diff --git a/examples/sg_iovec_tst.c b/testing/sg_iovec_tst.c
index 6a0848da..6a0848da 100644
--- a/examples/sg_iovec_tst.c
+++ b/testing/sg_iovec_tst.c
diff --git a/examples/sg_persist_tst.sh b/testing/sg_persist_tst.sh
index b6b926bb..b6b926bb 100755
--- a/examples/sg_persist_tst.sh
+++ b/testing/sg_persist_tst.sh
diff --git a/examples/sg_queue_tst.c b/testing/sg_queue_tst.c
index 9690b0ba..9690b0ba 100644
--- a/examples/sg_queue_tst.c
+++ b/testing/sg_queue_tst.c
diff --git a/examples/sg_sense_test.c b/testing/sg_sense_test.c
index 4ada185b..4ada185b 100644
--- a/examples/sg_sense_test.c
+++ b/testing/sg_sense_test.c
diff --git a/examples/sg_tst_async.cpp b/testing/sg_tst_async.cpp
index 67f247cc..67f247cc 100644
--- a/examples/sg_tst_async.cpp
+++ b/testing/sg_tst_async.cpp
diff --git a/examples/sg_tst_context.cpp b/testing/sg_tst_context.cpp
index 6ac99354..6ac99354 100644
--- a/examples/sg_tst_context.cpp
+++ b/testing/sg_tst_context.cpp
diff --git a/examples/sg_tst_excl.cpp b/testing/sg_tst_excl.cpp
index 5b4e6956..5b4e6956 100644
--- a/examples/sg_tst_excl.cpp
+++ b/testing/sg_tst_excl.cpp
diff --git a/examples/sg_tst_excl2.cpp b/testing/sg_tst_excl2.cpp
index 24d3677b..24d3677b 100644
--- a/examples/sg_tst_excl2.cpp
+++ b/testing/sg_tst_excl2.cpp
diff --git a/examples/sg_tst_excl3.cpp b/testing/sg_tst_excl3.cpp
index 6b6b880b..6b6b880b 100644
--- a/examples/sg_tst_excl3.cpp
+++ b/testing/sg_tst_excl3.cpp
diff --git a/utils/tst_sg_lib.c b/testing/tst_sg_lib.c
index 13be7ff8..13be7ff8 100644
--- a/utils/tst_sg_lib.c
+++ b/testing/tst_sg_lib.c
diff --git a/utils/Makefile b/utils/Makefile
index aa11a7d1..985c2c63 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -8,7 +8,7 @@ CC = gcc
LD = gcc
EXECS = hxascdmp
-EXTRA_EXECS = hxascdmp sg_chk_asc tst_sg_lib
+EXTRA_EXECS = hxascdmp
MAN_PGS = hxascdmp.1
MAN_PREF = man1
@@ -30,13 +30,6 @@ clean:
hxascdmp: hxascdmp.o
$(LD) -o $@ $(LDFLAGS) $^
-# building sg_chk_asc depends on a prior successful make in ../lib
-sg_chk_asc: sg_chk_asc.o ../lib/sg_lib.o ../lib/sg_lib_data.o
- $(LD) -o $@ $(LDFLAGS) $^
-
-tst_sg_lib: tst_sg_lib.o ../lib/sg_lib.o ../lib/sg_lib_data.o
- $(LD) -o $@ $(LDFLAGS) $^
-
install: $(EXECS)
install -d $(INSTDIR)
diff --git a/utils/Makefile.freebsd b/utils/Makefile.freebsd
index 6b9b1348..62e6cb17 100644
--- a/utils/Makefile.freebsd
+++ b/utils/Makefile.freebsd
@@ -8,7 +8,6 @@ CC = gcc
LD = gcc
EXECS = hxascdmp
-# EXECS = hxascdmp sg_chk_asc
MAN_PGS =
MAN_PREF = man8
@@ -30,9 +29,6 @@ clean:
hxascdmp: hxascdmp.o
$(LD) -o $@ $(LDFLAGS) $@.o
-sg_chk_asc: sg_chk_asc.o ../sg_lib.o ../sg_lib_data.o
- $(LD) -o $@ $(LDFLAGS) $@.o ../sg_lib.o
-
install: $(EXECS)
install -d $(INSTDIR)
diff --git a/utils/Makefile.solaris b/utils/Makefile.solaris
index b49115a0..075d0046 100644
--- a/utils/Makefile.solaris
+++ b/utils/Makefile.solaris
@@ -8,7 +8,6 @@ CC = gcc
LD = gcc
EXECS = hxascdmp
-# EXECS = hxascdmp sg_chk_asc
MAN_PGS =
MAN_PREF = man8
@@ -30,9 +29,6 @@ clean:
hxascdmp: hxascdmp.o
$(LD) -o $@ $(LDFLAGS) $@.o
-sg_chk_asc: sg_chk_asc.o ../sg_lib.o
- $(LD) -o $@ $(LDFLAGS) $@.o ../sg_lib.o
-
install: $(EXECS)
install -d $(INSTDIR)
diff --git a/utils/README b/utils/README
index ce2d6982..c4d1dc3d 100644
--- a/utils/README
+++ b/utils/README
@@ -5,11 +5,8 @@ This directory contains these utilities:
the Unix "od" command. By default, it decodes 16 bytes per line with
an ASCII interpretation to the right of each line. See its
hxascdmp(1) man page.
- - sg_chk_asc: utility decodes the SCSI additional sense code table
- found at http://www.t10.org/lists/asc-num.txt and checks it
- against the table found in sg_lib_data.c in the lib/ subdirectory.
- It is designed to keep the table in sg_lib_data.c in "sync" with the
- table at the t10.org web site.
+ - sg_chk_asc and tst_sg_lib: are no longer here, they have been moved
+ to the 'testing' directory (a sibling of this directory).
By default, the Makefile only builds the hxascdmp utility. The 'Makefile'
@@ -19,11 +16,5 @@ builds for FreeBSD (e.g. 'make -f Makefile.freebsd'); the
in the Windows MinGW environment (e.g. msys shell); and 'Makefile.cygwin'
builds in the Windows Cygwin environment.
-To build sg_chk_asc the sg_lib.o and sg_lib_data.o files must be present
-(i.e. compiled) in the lib/ subdirectory. One way to meet that requirement
-is to execute './configure' in the main directory then 'cd lib ; make '.
-Then return to this directory and do 'make sg_chk_asc'.
-
-
Douglas Gilbert
-30th March 2010
+4th November 2017