aboutsummaryrefslogtreecommitdiff
path: root/inhex
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2021-11-20 17:13:42 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2021-11-20 17:13:42 +0000
commit20315aa4fae1340e5d4b1faae15b90ee34b9ea50 (patch)
treeeb935ed0b6aed4abf787556adcfe9e3cb99c297d /inhex
parent26be8550ae1aad5db9bcf9b0cfe1fdecccd210df (diff)
downloadsg3_utils-20315aa4fae1340e5d4b1faae15b90ee34b9ea50.tar.gz
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 field in REPORT ZONES response [zbc2r12]; sg_decode_sense: add --nodecode option; initialize all sense buffers to 0; rework main README file
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@923 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'inhex')
-rw-r--r--inhex/README34
-rw-r--r--inhex/vpd_zbdc.rawbin0 -> 64 bytes
-rw-r--r--inhex/z_act_query.hex28
3 files changed, 61 insertions, 1 deletions
diff --git a/inhex/README b/inhex/README
index cdc2e1ae..42337e02 100644
--- a/inhex/README
+++ b/inhex/README
@@ -41,10 +41,42 @@ Device Identification VPD page:
SCSI name string:
naa.5000C5003011CB28
+Binary <--> Hexadecimal
+-----------------------
+The vpd_zbdc.raw file is binary and was created by:
+ sg_decode_sense --inhex=vpd_zbdc.hex --nodecode --write=vpd_zbdc.raw
+as an example of converting a file in ASCII hexadecimal byte oriented
+format to binary.
+Turning binary output into hexadecimal can be done several ways. For
+viewing in byte oriented ASCII hex these Unix commands can be used:
+ od -t x1 vpd_zbdc.raw
+ hexdump -C vpd_zbdc.raw
+
+Each line starting with a "input offset" which is a running count of
+bytes, starting at zero. The hexdump examples shows an ASCII rendering
+of those 16 bytes to the right of each line. The sg_decode_sense utility
+may also be used:
+ sg_decode_sense --binary=vpd_zbdc.raw -H
+ sg_decode_sense --binary=vpd_zbdc.raw -HH
+
+The second form of sg_decode_sense appends an ASCII rendering of the 16
+bytes to the right of each line.
+
+When ASCII hexadecimal is being used as input to a utility in this
+package, the "input offset" at the start of each line must (and the
+optional ASCII rendering to the right of each line, must not be given.
+That can be done with hexdump:
+ hexdump -An -C -v vpd_zbdc.raw
+
+And the sg_decode_sense utility can do it with:
+ sg_decode_sense --binary=vpd_zbdc.raw -HHH
+
+Conclusion
+----------
Users are encouraged to send the author any ASCII hex files for utilities
that support --inhex and don't have hex data already. Special cases are
also welcome. They help the author test this code.
Douglas Gilbert
-25th September 2021
+20th November 2021
diff --git a/inhex/vpd_zbdc.raw b/inhex/vpd_zbdc.raw
new file mode 100644
index 00000000..249dbd50
--- /dev/null
+++ b/inhex/vpd_zbdc.raw
Binary files differ
diff --git a/inhex/z_act_query.hex b/inhex/z_act_query.hex
new file mode 100644
index 00000000..16d094e0
--- /dev/null
+++ b/inhex/z_act_query.hex
@@ -0,0 +1,28 @@
+# This is the output (in hex) of a simulated SCSI ZONE QUERY command.
+#
+# The hex bytes in this file may be generated by:
+# sg_z_act_query /dev/sg1 -HHH > /tmp/z_act_query.hex
+# where /dev/sg1 was a SCSI device implementing ZBC-2.
+
+# An example invocation:
+# sg_z_act_query --inhex=z_act_query.hex
+
+
+# parameter data header (64 bytes)
+00 00 00 80 00 00 00 80 80 00 03 00 00 00 00 00
+00 00 00 04 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
+
+# first zone activation descriptor, zone type: conventional
+01 00 01 00 00 00 00 00 00 00 00 00 00 00 00 04
+00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00
+# second zone activation descriptor, zone type: sequential write required
+02 10 02 00 00 00 00 00 00 00 00 00 00 00 00 05
+00 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00
+# third zone descriptor, zone type: sequential write required
+02 10 03 00 00 00 00 00 00 00 00 00 00 00 00 06
+00 00 00 60 00 00 00 00 00 00 00 00 00 00 00 00
+# fourth and last zone activation descriptor, zone type: sequential write required
+02 10 04 00 00 00 00 00 00 00 00 00 00 00 00 07
+00 00 00 80 00 00 00 00 00 00 00 00 00 00 00 00