aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2021-12-04 00:11:48 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2021-12-04 00:11:48 +0000
commitcee35c89cc98e880c7aa52e7b900363ae74e9653 (patch)
treedaa47b944fc197ea8339167196c8017da48a413b
parent20315aa4fae1340e5d4b1faae15b90ee34b9ea50 (diff)
downloadsg3_utils-cee35c89cc98e880c7aa52e7b900363ae74e9653.tar.gz
sg_z_act_query: fix usage call
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@924 6180dd3e-e324-4e3e-922d-17de1ae2f315
-rw-r--r--ChangeLog2
-rw-r--r--debian/changelog2
-rw-r--r--doc/sg3_utils.844
-rw-r--r--doc/sg_z_act_query.88
-rw-r--r--sg3_utils.spec2
-rw-r--r--src/sg_z_act_query.c4
6 files changed, 52 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 292794a4..b62f9265 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 pre-release sg3_utils-1.48 [20211120] [svn: r923]
+Changelog for pre-release sg3_utils-1.48 [20211203] [svn: r924]
- sg_z_act_query: new utility for sending either a
Zone activate or Zone query command
- sg_rep_zones: add Report zone starting LBA granularity
diff --git a/debian/changelog b/debian/changelog
index 8fcefd2b..a28dfbcc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,7 +2,7 @@ sg3-utils (1.48-0.1) unstable; urgency=low
* New upstream version
- -- Douglas Gilbert <dgilbert@interlog.com> Sat, 20 Nov 2021 11:00:00 -0500
+ -- Douglas Gilbert <dgilbert@interlog.com> Fri, 03 Dec 2021 19:00:00 -0500
sg3-utils (1.47-0.1) unstable; urgency=low
diff --git a/doc/sg3_utils.8 b/doc/sg3_utils.8
index abe07d82..25a0d0b6 100644
--- a/doc/sg3_utils.8
+++ b/doc/sg3_utils.8
@@ -1,4 +1,4 @@
-.TH SG3_UTILS "8" "November 2021" "sg3_utils\-1.48" SG3_UTILS
+.TH SG3_UTILS "8" "December 2021" "sg3_utils\-1.48" SG3_UTILS
.SH NAME
sg3_utils \- a package of utilities for sending SCSI commands
.SH SYNOPSIS
@@ -779,6 +779,48 @@ Windows may open a file in text rather than binary mode).
.PP
Some utilities that the author has found useful have been placed in
the 'utils' subdirectory.
+.SH DEBUGGING
+Each utility and most scripts have a \fI\-\-verbose\fR option (short
+form: \fI\-v\fR) that can be used multiple times to increase the verbosity
+of the output to aid debugging. Normal output (if any) is sent to stdout
+while verbose output (and error output) is sent to stderr. This may be
+important when the (normal output) of a utility is being piped to another
+command (e.g. the grep command to find a particular field in the output).
+.PP
+The Linux SCSI subsystem has a pseudo file for getting and changing the SCSI
+logging level: /proc/sys/dev/scsi/logging_level . The scsi_logging_level
+script in this package can be used to manipulate the logging level in a
+command line friendly way. See its manpage.
+.PP
+The logging level runs from 0 (no logging and the default) to 7 (lots of
+logging) and applies to all storage devices that use the SCSI subsystem.
+The logging output goes to "the log" which is often the /var/log/syslog
+file.
+.PP
+The Linux SCSI generic (sg) driver is often used under the utilities in
+this package. It uses a seldom (otherwise) used logging type of
+SCSI_LOG_TIMEOUT. An example of its use to turn on full debugging is:
+.PP
+ scsi_logging_level \-s \-T 7
+.PP
+To reduce the amount of output to only error paths, the following is
+suggested:
+.PP
+ scsi_logging_level \-s \-T 3
+.PP
+And to turn off logging in the sg driver:
+.PP
+ scsi_logging_level \-s \-T 0
+.PP
+For analyzing machine crashes associated with a SCSI command, nothing beats
+a real serial port. By "real" means that it is _not_ a USB serial port.
+The reason is that like SCSI, USB needs a functioning software stack within
+the OS kernel, the very thing that may be crippled during a machine crash.
+.PP
+Modern laptops do not have real serial ports and many server machines
+don't either (or it is an optional extra). In Linux the netconsole module
+does a pretty good job by sending log entries to another machine (on the
+same sub\-net)) using the UDP ("fire and forget") network protocol .
.SH WEB SITE
There is a web page discussing this package at
https://sg.danny.cz/sg/sg3_utils.html . The device naming used by this
diff --git a/doc/sg_z_act_query.8 b/doc/sg_z_act_query.8
index a43ad073..6b816835 100644
--- a/doc/sg_z_act_query.8
+++ b/doc/sg_z_act_query.8
@@ -1,4 +1,4 @@
-.TH SG_Z_ACT_QUERY "8" "November 2021" "sg3_utils\-1.48" SG3_UTILS
+.TH SG_Z_ACT_QUERY "8" "December 2021" "sg3_utils\-1.48" SG3_UTILS
.SH NAME
sg_z_act_query \- send a SCSI ZONE ACTIVATE or ZONE QUERY command
.SH SYNOPSIS
@@ -13,7 +13,7 @@ sg_z_act_query \- send a SCSI ZONE ACTIVATE or ZONE QUERY command
.PP
Sends a SCSI ZONE ACTIVATE or ZONE QUERY command to the \fIDEVICE\fR. If the
\fI\-\-activate\fR option is not given, then a ZONE QUERY command is sent.
-These commands where added in the ZBC\-2 draft revision 4 (zbc2r04.pdf).
+These commands were added in the ZBC\-2 draft revision 4 (zbc2r04.pdf).
.PP
Both of these commands have similar cdb_s and responses hence they are both
placed in this utility. The difference is that only the ZONE ACTIVATE command
@@ -45,8 +45,8 @@ response is output in ASCII hexadecimal with a leading address (starting at
response is output separately in hexadecimal. When used thrice the whole
response is output in hexadecimal with no leading address (on each line).
.br
-The output format when this option is given thrice is suitable contents
-for a later invocation with the \fI\-\-inhex=FN\fR option.
+The output format when this option is given thrice is suitable for a later
+invocation with the \fI\-\-inhex=FN\fR option.
.TP
\fB\-i\fR, \fB\-\-inhex\fR=\fIFN\fR
where \fIFN\fR is a file name whose contents are assumed to be ASCII
diff --git a/sg3_utils.spec b/sg3_utils.spec
index 11c46bc7..dc2bdde2 100644
--- a/sg3_utils.spec
+++ b/sg3_utils.spec
@@ -84,7 +84,7 @@ fi
%{_libdir}/*.la
%changelog
-* Sat Nov 20 2021 - dgilbert at interlog dot com
+* Fri Dec 03 2021 - dgilbert at interlog dot com
- track t10 changes
* sg3_utils-1.48
diff --git a/src/sg_z_act_query.c b/src/sg_z_act_query.c
index 5958f94a..a345b2e8 100644
--- a/src/sg_z_act_query.c
+++ b/src/sg_z_act_query.c
@@ -38,7 +38,7 @@
* command to the given SCSI device. Based on zbc2r12.pdf .
*/
-static const char * version_str = "1.01 20211117";
+static const char * version_str = "1.02 20211203";
#define SG_ZBC_IN_CMDLEN 16
#define Z_ACTIVATE_SA 0x8
@@ -526,7 +526,7 @@ main(int argc, char * argv[])
goto start_response;
} else {
pr2serr("missing device name!\n\n");
- usage(1);
+ usage();
ret = SG_LIB_FILE_ERROR;
no_final_msg = true;
goto the_end;