aboutsummaryrefslogtreecommitdiff
path: root/src/sg_reset_wp.c
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2014-06-06 16:55:26 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2014-06-06 16:55:26 +0000
commit737cdcd23f0a13963f97840cd0acd4672e9eb3ee (patch)
tree17269cb10efa49d496744420fcb9be019220f0ad /src/sg_reset_wp.c
parent240dd15692debe127e57ff0fb4bc320f70614d5f (diff)
downloadsg3_utils-737cdcd23f0a13963f97840cd0acd4672e9eb3ee.tar.gz
sg_luns: add decoding for conglomerate LUNS; change struct sg_simple_inquiry_resp::rmb to byte_1
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@586 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_reset_wp.c')
-rw-r--r--src/sg_reset_wp.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/sg_reset_wp.c b/src/sg_reset_wp.c
index cdc1f5d4..6ca532ce 100644
--- a/src/sg_reset_wp.c
+++ b/src/sg_reset_wp.c
@@ -30,7 +30,7 @@
* device.
*/
-static const char * version_str = "1.00 20140527";
+static const char * version_str = "1.01 20140604";
#define SERVICE_ACTION_OUT_16_CMD 0x9f
#define SERVICE_ACTION_OUT_16_CMDLEN 16
@@ -103,11 +103,8 @@ sg_ll_reset_write_pointer(int sg_fd, uint64_t zid, int reset_all, int noisy,
unsigned char sense_b[SENSE_BUFF_LEN];
struct sg_pt_base * ptvp;
- if ((zid >> 56) & 0xff) {
- pr2serr("%s: zone id (LBA) too large\n", __func__);
- return SG_LIB_CAT_MALFORMED;
- }
- /* a 7 byte field as zbc-r01a claims ?? */
+ /* assume zbc-r01a is wrong and that ZS LBA is an 8 byte field */
+ rwpCmdBlk[2] = (zid >> 56) & 0xff;
rwpCmdBlk[3] = (zid >> 48) & 0xff;
rwpCmdBlk[4] = (zid >> 40) & 0xff;
rwpCmdBlk[5] = (zid >> 32) & 0xff;