aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2022-07-06 04:42:32 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2022-07-06 04:42:32 +0000
commit5e6f4a6ba05f122b39407f2bdb8d8bea194b8990 (patch)
treedef2dad0393b47310771ff034b74a6a189e862e4 /doc
parent1861523da54dbb1dac823f754156e7e67f2768cb (diff)
downloadsg3_utils-5e6f4a6ba05f122b39407f2bdb8d8bea194b8990.tar.gz
sg_vpd: more JSON work
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@958 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'doc')
-rw-r--r--doc/sg3_utils_json.843
-rw-r--r--doc/sg_modes.810
-rw-r--r--doc/sg_persist.811
3 files changed, 43 insertions, 21 deletions
diff --git a/doc/sg3_utils_json.8 b/doc/sg3_utils_json.8
index 8ada8146..454dfa7a 100644
--- a/doc/sg3_utils_json.8
+++ b/doc/sg3_utils_json.8
@@ -15,14 +15,17 @@ output, rather than simple, human-readable output. The default remains
human-readable output.
.PP
JSON is an open standard file format that can be used for data exchange
-between systems. See https://en.wikipedia.org/wiki/JSON . JSON comes in
-many flavours and this one uses the json-builder C implementation found
-at https://github.com/json-parser/json-builder which implements four simple
-JSON data types: string, integer, boolean and null. Its other data types
-are JSON object and JSON array. This project uses the "snake" convention
-for JSON object names: all in lower case with separate words joined with
-a single underscore (e.g. "starting_lba"). The json-builder library uses
-the SPDX-License-Identifier: BSD-2-Clause which is the same license as the
+between systems. See https://en.wikipedia.org/wiki/JSON . JSON comes in many
+flavours and this one uses the json-builder C implementation found at
+https://github.com/json-parser/json-builder which implements four simple JSON
+data types: string, integer, boolean and null. Its other data types are JSON
+object and JSON array.
+.PP
+This project uses the "snake_case" convention for JSON object names: all in
+lower case letters or numerals with individual words joined with a single
+underscore (e.g. "starting_lba"). There should be no leading or trailing
+underscore characters. The json-builder library uses the
+SPDX\-License\-Identifier: BSD\-2\-Clause which is the same license as the
bulk of the utilities in the sg3_utils package.
.PP
The json-builder library is relatively lightweight (700 lines of C code) and
@@ -45,7 +48,7 @@ This manpage discusses the \fI\-\-json\fR option which may or may not itself
have an optional argument. In its shorter form it may either be \fI\-j\fR or
\fI\-J\fR (lower case preferred if not already in use). The shorter form may
also take an argument but there must not be a space (or whitespace) between
-\fI\-j\fR and that argument.
+\fI\-j\fR and that argument.
.SH ENVIRONMENT VARIABLES
The SG3_UTILS_JSON_OPTS environment variable allows the user to override the
default values of the \fIJO\fR settings. Those settings can again be overridden
@@ -105,6 +108,10 @@ name with a sub\-object containing at least a "i" field with the integer
value and a "abbreviated_name_expansion" field with a string value that
should make the T10 name clearer (e.g. "Sense Key Specific Valid").
.br
+The "abbreviated name expansion" control character is also used to flag
+fields that are obsolete, usually noting the standard or revision of a
+draft standard when they became obsolete.
+.br
This boolean control character is default off (false).
.TP
\fBe\fR
@@ -126,7 +133,20 @@ control character is active most (non\-trivial) fields that have an integer
value instead receive a a sub\-object containing at least a "i" field with
the integer value and a "hex" field with the corresponding hex value in a
JSON string. That hex string has no hex decorations (i.e. no leading '0x'
-nor traing 'h').
+nor trailing 'h').
+.br
+This boolean control character is default off (false).
+.TP
+\fBk\fR
+this is a boolean control character for finer control of non\-pretty printed
+JSON output. If the 'p' control character is set on (true) then this option
+has no effect.
+.br
+If the 'p' control character is set off (false) and this control character is
+set off (false) then the single line JSON output contains some spaces for
+readability. If the 'p' control character is set off (false) and this control
+character is set on (true) then the JSON single line JSON output is "packed"
+removing all unnecessary spaces.
.br
This boolean control character is default off (false).
.TP
@@ -163,6 +183,9 @@ have their name on a separate line. These lines are indented with the
current tab setting to indicate the level of nesting. Basically the pretty
printed form is for human consumption.
.br
+There are two forms of non\-pretty printed output, see the "packed" control
+character ['k'].
+.br
This boolean control character is default on (true).
.TP
\fBs\fR
diff --git a/doc/sg_modes.8 b/doc/sg_modes.8
index 162f5f93..4fef24ad 100644
--- a/doc/sg_modes.8
+++ b/doc/sg_modes.8
@@ -1,4 +1,4 @@
-.TH SG_MODES "8" "September 2020" "sg3_utils\-1.45" SG3_UTILS
+.TH SG_MODES "8" "July 2022" "sg3_utils\-1.45" SG3_UTILS
.SH NAME
sg_modes \- reads mode pages with SCSI MODE SENSE command
.SH SYNOPSIS
@@ -20,9 +20,9 @@ sg_modes \- reads mode pages with SCSI MODE SENSE command
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. 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 SENSE(10)).
+standard (and the SPC\-5 standard) 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 SENSE(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
@@ -301,7 +301,7 @@ Written by Douglas Gilbert
.SH "REPORTING BUGS"
Report bugs to <dgilbert at interlog dot com>.
.SH COPYRIGHT
-Copyright \(co 2000\-2020 Douglas Gilbert
+Copyright \(co 2000\-2022 Douglas Gilbert
.br
This software is distributed under the GPL version 2. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
diff --git a/doc/sg_persist.8 b/doc/sg_persist.8
index 36d784b9..23a0c97a 100644
--- a/doc/sg_persist.8
+++ b/doc/sg_persist.8
@@ -35,11 +35,10 @@ READ RESERVATION, REPORT CAPABILITIES and READ FULL STATUS.
.PP
Before trying to change Persistent reservations and registrations users
should be aware of what they are doing. The relevant sections of the SCSI
-Primary Commands document (i.e. SPC\-5 whose most recent draft is revision
-18 dated 4 January 2018) are sections 5.14 (titled "Reservations"),
-6.16 (for the PRIN command) and 6.17 (for the PROUT command). To safeguard
-against accidental use, the \fI\-\-out\fR option must be given when a
-PROUT sub\-command (e.g. \fI\-\-register\fR) is used.
+Primary Commands document (i.e. SPC\-5 ANSI INCITS 502\-2020) are sections
+8.14 (titled "Reservations"), 9.16 (for the PRIN command) and 9.17 (for the
+PROUT command). To safeguard against accidental use, the \fI\-\-out\fR option
+must be given when a PROUT sub\-command (e.g. \fI\-\-register\fR) is used.
.PP
The older SCSI RESERVE and RELEASE commands (both 6 and 10 byte variants)
are not supported by this utility. In SPC\-3, RESERVE and RELEASE are
@@ -245,7 +244,7 @@ and \fI\-\-param\-rk=RK\fR options must also be specified.
\fB\-X\fR, \fB\-\-transport\-id\fR=\fITIDS\fR
The \fITIDS\fR argument can take one of several forms. It can be a
comma (or single space) separated list of ASCII hex bytes representing
-a single TransportID as defined in SPC\-4. They are usually 24 bytes
+a single TransportID as defined in SPC\-5. They are usually 24 bytes
long apart from in iSCSI. The \fITIDS\fR argument may be a transport
specific form (e.g. "sas,5000c50005b32001" is clearer than an equivalent
to the hex byte form: "6,0,0,0,5,0,c5,0,5,b3,20,1"). The \fITIDS\fR argument