aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2013-01-18 00:51:54 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2013-01-18 00:51:54 +0000
commitc0a7268d98453fcd8479314e582a5ed7faf29b55 (patch)
tree4cfc9b69bdb76ed5cd2ce8aeb06d4f52ec4ce47b
parentff0d7dd14ab7cd482a836d04d7e63c127370354f (diff)
downloadsg3_utils-c0a7268d98453fcd8479314e582a5ed7faf29b55.tar.gz
cleanup for FreeBSD and Win32 prior to 1.35
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@476 6180dd3e-e324-4e3e-922d-17de1ae2f315
-rw-r--r--COVERAGE3
-rw-r--r--ChangeLog2
-rw-r--r--README49
-rw-r--r--README.freebsd3
-rw-r--r--README.solaris3
-rw-r--r--README.tru643
-rw-r--r--README.win323
-rw-r--r--debian/changelog2
-rw-r--r--doc/sg_compare_and_write.84
-rw-r--r--sg3_utils.spec4
-rw-r--r--src/sg_compare_and_write.c18
-rw-r--r--src/sg_vpd.c4
-rw-r--r--src/sg_vpd_vendor.c5
13 files changed, 54 insertions, 49 deletions
diff --git a/COVERAGE b/COVERAGE
index c5e75bdd..4004bc41 100644
--- a/COVERAGE
+++ b/COVERAGE
@@ -12,6 +12,7 @@ ATA COMMAND PASS-THROUGH(16) sg_sat_identify, sg_sat_set_features,
sg__sat_set_features, sg_sat_smart_rd_data
(previous four in the examples directory)]
ATA COMMAND PASS-THROUGH(12) sg_sat_identify, ++
+COMPARE AND WRITE sg_compare_and_write
EXTENDED COPY sg_xcopy, ++
GET CONFIGURATION sg_get_config, ++
GET LBA STATUS sg_get_lba_status, ++
@@ -99,4 +100,4 @@ SMART READ DATA examples/sg_sat_smart_rd_data
Douglas Gilbert
-23rd March 2012
+14th January 2013
diff --git a/ChangeLog b/ChangeLog
index 9d66acc2..337fac31 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.35 [20130110] [svn: r475]
+Changelog for sg3_utils-1.35 [20130117] [svn: r476]
- sg_compare_and_write: new utility
- sg_inq+sg_vpd: block device characteristics VPD page:
add product_type, WABEREQ, WACEREQ and VBULS fields
diff --git a/README b/README
index de3c051a..ff5cd5a8 100644
--- a/README
+++ b/README
@@ -122,7 +122,7 @@ The sg driver in Linux can be seen as having 3 distinct versions:
v3 lk >= 2.4 additional sg_io_hdr interface structure [2001/1/4]
v3 lk >= 2.6 same interface as found in lk 2.4 [2.6.0: 2003/12/18]
-and the bsg driver supports the sg v4 interface and was added around
+and the bsg driver supports the sg v4 interface and was added around
lk 2.6.28 . This package is targeted at "v3" and "v4". Another package called
"sg_utils" is targeted at "v2" and to a lesser extent "v1". The "sg_utils"
package has a subset of the utilities found in this package.
@@ -180,7 +180,8 @@ In Linux there are package build files for "rpm" based and for "deb" based
systems. The 'sg3_utils.spec' file in the main directory can be used like
this: 'rpmbuild -ba sg3_utils.spec' in a rpmbuild tree SPECS directory.
To cross build or make a more widely distributable package then the --target
-option may be useful: 'rpmbuild --target=i386 -ba sg3_utils.spec' .
+option may be useful: 'rpmbuild --target=i386 -ba sg3_utils.spec' or
+'rpmbuild --target=x86_64 -ba sg3_utils.spec' .
The 'build_debian.sh' script should build several "deb" packages and place
them in the parent directory. In debian based systems doing
@@ -220,16 +221,16 @@ Utilities
=========
Here is list in alphabetical order of utilities found in the 'src'
subdirectory of the sg3_utils package:
- sginfo, sg_copy_results, sgm_dd, sgp_dd, sg_dd, sg_decode_sense,
- sg_emc_trespass, sg_format, sg_get_config, sg_get_lba_status, sg_ident,
- sg_inq, sg_logs, sg_luns, sg_map, sg_map26, sg_modes, sg_opcodes,
- sg_persist, sg_prevent, sg_raw, sg_rbuf, sg_rdac, sg_read, sg_readcap,
- sg_read_block_limits, sg_read_buffer, sg_read_long, sg_reassign,
- sg_referrals, sg_request, sg_reset, sg_rmsn, sg_rtpg, sg_safte,
- sg_sanitize, sg_sat_identify, sg_sat_phy_event, sg_sat_set_features,
- sg_scan, sg_senddiag, sg_ses, sg_start, sg_stpg, sg_sync, sg_test_rwbuff,
- sg_turs, sg_unmap, sg_verify, sg_vpd, sg_write_buffer, sg_write_long,
- sg_write_same, sg_wr_mode, sg_xcopy
+ sginfo, sg_compare_and_write, sg_copy_results, sgm_dd, sgp_dd, sg_dd,
+ sg_decode_sense, sg_emc_trespass, sg_format, sg_get_config,
+ sg_get_lba_status, sg_ident, sg_inq, sg_logs, sg_luns, sg_map, sg_map26,
+ sg_modes, sg_opcodes, sg_persist, sg_prevent, sg_raw, sg_rbuf, sg_rdac,
+ sg_read, sg_readcap, sg_read_block_limits, sg_read_buffer, sg_read_long,
+ sg_reassign, sg_referrals, sg_request, sg_reset, sg_rmsn, sg_rtpg,
+ sg_safte, sg_sanitize, sg_sat_identify, sg_sat_phy_event,
+ sg_sat_set_features, sg_scan, sg_senddiag, sg_ses, sg_start, sg_stpg,
+ sg_sync, sg_test_rwbuff, sg_turs, sg_unmap, sg_verify, sg_vpd,
+ sg_write_buffer, sg_write_long, sg_write_same, sg_wr_mode, sg_xcopy
Each of the above utilities depends on header files found in the 'include'
subdirectory and library code found in the 'lib' subdirectory. Associated
@@ -260,7 +261,7 @@ 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
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).
+a "compliant jitter tolerance pattern" (CJTPAT).
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
@@ -276,15 +277,15 @@ The 'scripts' subdirectory contains some Bourne (bash) shell scripts that
rely on utilities in the main directory. One script uses the sdparm utility.
These scripts are described in the scripts/README file and have usage
messages.
-
+
Notes for utilities without man pages
=====================================
These utils are found in the 'examples' subdirectory.
The "scsi_inquiry" program shows the use of the SCSI_IOCTL_SEND_COMMAND
-ioctl to send a SCSI INQUIRY command. That ioctl() is supported by the
-SCSI sub system mid level and so is common to all sd, sr, st and sg devices.
+ioctl to send a SCSI INQUIRY command. That ioctl() is supported by the
+SCSI sub system mid level and so is common to all sd, sr, st and sg devices.
That ioctl is deprecated in the lk 2.6 series. This program has been placed
in the "examples" subdirectory.
@@ -345,13 +346,13 @@ interface by defining the SG3_UTILS_OLD_OPTS environment variable
or using '-O' as the first command line option.
The more recent utilities that use "getopt_long" only are:
- - sg_decode_sense, sg_format sg_get_config sg_get_lba_status sg_ident
- sg_luns sg_map26 sg_persist sg_prevent sg_raw sg_read_block_limits
- sg_read_buffer sg_read_long sg_reassign sg_referrals sg_requests sg_rmsn
- sg_rtpg sg_safte sg_sanitize sg_sat_identify sg_sat_phy_event
- sg_sat_set_features sg_scan(w) sg_ses sg_stpg sg_sync sg_test_rwbuf
- sg_unmap sg_verify sg_vpd sg_write_buffer sg_write_long sg_write_same
- sg_wr_mode
+ - sg_compare_and_write, sg_decode_sense, sg_format, sg_get_config,
+ sg_get_lba_status, sg_ident, sg_luns, sg_map26, sg_persist, sg_prevent,
+ sg_raw, sg_read_block_limits, sg_read_buffer, sg_read_long, sg_reassign,
+ sg_referrals, sg_requests, sg_rmsn, sg_rtpg, sg_safte, sg_sanitize,
+ sg_sat_identify, sg_sat_phy_event, sg_sat_set_features, sg_scan(w),
+ sg_ses, sg_stpg, sg_sync, sg_test_rwbuf, sg_unmap, sg_verify, sg_vpd,
+ sg_write_buffer, sg_write_long, sg_write_same, sg_wr_mode
Dangerous code
@@ -373,4 +374,4 @@ See http://sg.danny.cz/sg/tools.html
Douglas Gilbert
-9th January 2013
+17th January 2013
diff --git a/README.freebsd b/README.freebsd
index 2818ce44..ab1a7ed0 100644
--- a/README.freebsd
+++ b/README.freebsd
@@ -13,6 +13,7 @@ for FreeBSD.
Supported Utilities
===================
Here is a list of utilities that have been ported:
+ sg_compare_and_write
sg_decode_sense
sg_format
sg_get_config
@@ -134,4 +135,4 @@ utilities.
Douglas Gilbert
-17th January 2012
+14th January 2013
diff --git a/README.solaris b/README.solaris
index 45fce3d7..8548f18c 100644
--- a/README.solaris
+++ b/README.solaris
@@ -30,6 +30,7 @@ for Solaris.
Supported Utilities
===================
Here is a list of utilities that have been ported:
+ sg_compare_and_write
sg_decode_sense
sg_format
sg_get_config
@@ -155,4 +156,4 @@ disks to accept SCSI commands including the SCSI ATA PASS THROUGH commands.
Douglas Gilbert
-21st June 2011
+14th January 2013
diff --git a/README.tru64 b/README.tru64
index 52d125f4..6ebd0262 100644
--- a/README.tru64
+++ b/README.tru64
@@ -8,6 +8,7 @@ beyond the SCSI command pass through mechanism.
Supported Utilities
===================
Here is a list of utilities that have been ported:
+ sg_compare_and_write
sg_decode_sense
sg_format
sg_get_config
@@ -93,4 +94,4 @@ subdirectory. Currently only the Tru64 port uses it.
Douglas Gilbert
-21st June 2011
+14th January 2013
diff --git a/README.win32 b/README.win32
index 571d6219..c15f193b 100644
--- a/README.win32
+++ b/README.win32
@@ -28,6 +28,7 @@ compiled out when sg3_utils is built for MinGW.
Supported Utilities
===================
Here is a list of utilities that have been ported:
+ sg_compare_and_write
sg_decode_sense
sg_format
sg_get_config
@@ -215,4 +216,4 @@ mode" with the setmode() Windows command.
Douglas Gilbert
-4th February 2012
+14th January 2013
diff --git a/debian/changelog b/debian/changelog
index 01c09189..389ae55b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,7 @@ sg3-utils (1.35-0.1) unstable; urgency=low
* New upstream version
- -- Douglas Gilbert <dgilbert@interlog.com> Wed, 09 Jan 2013 09:00:00 -0500
+ -- Douglas Gilbert <dgilbert@interlog.com> Thu, 17 Jan 2013 19:00:00 -0500
sg3-utils (1.34-0.1) unstable; urgency=low
diff --git a/doc/sg_compare_and_write.8 b/doc/sg_compare_and_write.8
index 0a259346..f9e42185 100644
--- a/doc/sg_compare_and_write.8
+++ b/doc/sg_compare_and_write.8
@@ -1,4 +1,4 @@
-.TH "COMPARE AND WRITE" "8" "December 2012" "sg3_utils\-1.35" SG3_UTILS
+.TH "COMPARE AND WRITE" "8" "January 2013" "sg3_utils\-1.35" SG3_UTILS
.SH NAME
sg_compare_and_write \- send the SCSI COMPARE AND WRITE command
.SH SYNOPSIS
@@ -87,7 +87,7 @@ Written by Shahar Salzman.
.SH "REPORTING BUGS"
Report bugs to shahar.salzman@kaminario.com
.SH COPYRIGHT
-Copyright \(co 2012 Kaminario Technologies LTD
+Copyright \(co 2012\-2013 Kaminario Technologies LTD
.br
Redistribution and use in source and binary forms, with or without
diff --git a/sg3_utils.spec b/sg3_utils.spec
index 1ca538da..1cc52f19 100644
--- a/sg3_utils.spec
+++ b/sg3_utils.spec
@@ -79,8 +79,8 @@ fi
%{_libdir}/*.la
%changelog
-* Wed Jan 09 2012 - dgilbert at interlog dot com
-- track t10 changes, fix for cygwin 1.7.17
+* Thu Jan 17 2013 - dgilbert at interlog dot com
+- add sg_compare_and_write, track t10 changes
* sg3_utils-1.35
* Sat Oct 13 2012 - dgilbert at interlog dot com
diff --git a/src/sg_compare_and_write.c b/src/sg_compare_and_write.c
index c6773bf5..c9734bb7 100644
--- a/src/sg_compare_and_write.c
+++ b/src/sg_compare_and_write.c
@@ -9,7 +9,6 @@
#include <string.h>
#define __STDC_FORMAT_MACROS 1
#include <inttypes.h>
-#include <sys/ioctl.h>
#include <getopt.h>
#ifdef HAVE_CONFIG_H
@@ -21,7 +20,7 @@
/* A utility program for the Linux OS SCSI generic ("sg") device driver.
*
-* Copyright (c) 2012, Kaminario Technologies LTD
+* Copyright (c) 2012-2013, Kaminario Technologies LTD
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -42,14 +41,14 @@
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This command performs a SCSI COMPARE AND WRITE on the given lba.
*
*/
-static const char * version_str = "1.01 20121209";
+static const char * version_str = "1.02 20130117";
#define DEF_BLOCK_SIZE 512
#define DEF_NUM_BLOCKS (1)
@@ -435,11 +434,10 @@ main(int argc, char * argv[])
if (opts.verbose)
fprintf(stderr, "Running COMPARE AND WRITE command with the "
- "following options:\n in=%s device=%s lba=0x%" PRIx64
- " num_blocks=%d xfer_len=%d timeout=%d\n",
- opts.ifilename, opts.device_name,
- (unsigned long)opts.lba, opts.numblocks,
- opts.xfer_len, opts.timeout);
+ "following options:\n in=%s device=%s lba=0x%"
+ PRIx64 " num_blocks=%d xfer_len=%d timeout=%d\n",
+ opts.ifilename, opts.device_name, opts.lba,
+ opts.numblocks, opts.xfer_len, opts.timeout);
infd = open_if(opts.ifilename);
if (infd <=0) {
diff --git a/src/sg_vpd.c b/src/sg_vpd.c
index b2f9a306..c64fcbd1 100644
--- a/src/sg_vpd.c
+++ b/src/sg_vpd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2012 Douglas Gilbert.
+ * Copyright (c) 2006-2013 Douglas Gilbert.
* All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the BSD_LICENSE file.
@@ -30,7 +30,7 @@
*/
-static char * version_str = "0.64 20121211"; /* spc4r36 + sbc3r34 */
+static char * version_str = "0.65 20130117"; /* spc4r36 + sbc3r34 */
extern void svpd_enumerate_vendor(void);
extern int svpd_decode_vendor(int sg_fd, int num_vpd, int subvalue,
diff --git a/src/sg_vpd_vendor.c b/src/sg_vpd_vendor.c
index b4f6c613..7ac7609f 100644
--- a/src/sg_vpd_vendor.c
+++ b/src/sg_vpd_vendor.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006-2012 Douglas Gilbert.
+ * Copyright (c) 2006-2013 Douglas Gilbert.
* All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the BSD_LICENSE file.
@@ -97,7 +97,8 @@ static struct svpd_values_name_t vendor_vpd_pg[] = {
{VPD_V_JUMP_SEA, 0, -1, 1, "jump", "Jump setting (Seagate)"},
{VPD_V_RVSI_RDAC, 0, -1, 1, "rvsi", "Replicated volume source "
"identifier (RDAC)"},
- {VPD_V_SAID_RDAC, 0, -1, 1, "said", "Storage array world wide name (RDAC)"},
+ {VPD_V_SAID_RDAC, 0, -1, 1, "said", "Storage array world wide name "
+ "(RDAC)"},
{VPD_V_SUBS_RDAC, 0, -1, 1, "sub", "Subsystem identifier (RDAC)"},
{VPD_V_SVER_RDAC, 1, -1, 1, "sver", "Software version (RDAC)"},
{VPD_V_UPR_EMC, 1, -1, 1, "upr", "Unit path report (EMC)"},