aboutsummaryrefslogtreecommitdiff
path: root/include
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 /include
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 'include')
-rw-r--r--include/sg_lib.h9
-rw-r--r--include/sg_lib_data.h4
2 files changed, 11 insertions, 2 deletions
diff --git a/include/sg_lib.h b/include/sg_lib.h
index 35b44d69..94c98faf 100644
--- a/include/sg_lib.h
+++ b/include/sg_lib.h
@@ -567,7 +567,8 @@ char * safe_strerror(int errnum);
/* Print (to stdout) 'str' of bytes in hex, 16 bytes per line optionally
* followed at the right hand side of the line with an ASCII interpretation.
* Each line is prefixed with an address, starting at 0 for str[0]..str[15].
- * All output numbers are in hex. 'no_ascii' allows for 3 output types:
+ * All output numbers are in hex.
+ * 'no_ascii' selects on of 3 output format types:
* > 0 each line has address then up to 16 ASCII-hex bytes
* = 0 in addition, the bytes are listed in ASCII to the right
* < 0 only the ASCII-hex bytes are listed (i.e. without address)
@@ -579,6 +580,12 @@ void dStrHex(const char * str, int len, int no_ascii);
* logic as dStrHex() with different output stream (i.e. stderr). */
void dStrHexErr(const char * str, int len, int no_ascii);
+/* Read binary starting at 'str' for 'len' bytes and output as ASCII
+ * hexadecinal into file pointer (fp). 16 bytes per line are output with an
+ * additional space between 8th and 9th byte on each line (for readability).
+ * 'no_ascii' selects one of 3 output format types as shown in dStrHex() . */
+void dStrHexFp(const char* str, int len, int no_ascii, FILE * fp);
+
/* Read 'len' bytes from 'str' and output as ASCII-Hex bytes (space
* separated) to 'b' not to exceed 'b_len' characters. Each line
* starts with 'leadin' (NULL for no leadin) and there are 16 bytes
diff --git a/include/sg_lib_data.h b/include/sg_lib_data.h
index 01c132ea..1e427043 100644
--- a/include/sg_lib_data.h
+++ b/include/sg_lib_data.h
@@ -2,7 +2,7 @@
#define SG_LIB_DATA_H
/*
- * Copyright (c) 2007-2019 Douglas Gilbert.
+ * Copyright (c) 2007-2021 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.
@@ -46,7 +46,9 @@ extern "C" {
#define SG_VARIABLE_LENGTH_CMD 0x7f
#define SG_WRITE_BUFFER 0x3b
#define SG_ZONING_OUT 0x94
+#define SG_ZBC_OUT SG_ZONING_OUT /* as SPC calls them */
#define SG_ZONING_IN 0x95
+#define SG_ZBC_IN SG_ZONING_IN /* as SPC calls them */