diff options
author | Douglas Gilbert <dgilbert@interlog.com> | 2012-02-24 19:00:45 +0000 |
---|---|---|
committer | Douglas Gilbert <dgilbert@interlog.com> | 2012-02-24 19:00:45 +0000 |
commit | dfcdb2bc3c00d328233373dfcfa3803ca0726716 (patch) | |
tree | 703875b95af995e5b9bda36b6f0354f4fff9e8bc /src/sg_persist.c | |
parent | c410806c13d2baab90641ef6816866cd6e6bfeff (diff) | |
download | sg3_utils-dfcdb2bc3c00d328233373dfcfa3803ca0726716.tar.gz |
more sync with spc4r34 and sbc3r30
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@442 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'src/sg_persist.c')
-rw-r--r-- | src/sg_persist.c | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/src/sg_persist.c b/src/sg_persist.c index 8bc188e3..6f34f036 100644 --- a/src/sg_persist.c +++ b/src/sg_persist.c @@ -1,3 +1,13 @@ +/* A utility program originally written for the Linux OS SCSI subsystem. + * Copyright (C) 2004-2012 D. Gilbert + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program issues the SCSI PERSISTENT IN and OUT commands. + */ + #include <unistd.h> #include <fcntl.h> #include <stdio.h> @@ -16,18 +26,7 @@ #include "sg_cmds_basic.h" #include "sg_cmds_extra.h" -/* A utility program originally written for the Linux OS SCSI subsystem. -* Copyright (C) 2004-2012 D. Gilbert -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2, or (at your option) -* any later version. - - This program issues the SCSI PERSISTENT IN and OUT commands. - -*/ - -static char * version_str = "0.38 20120222"; +static char * version_str = "0.38 20120224"; #define PRIN_RKEY_SA 0x0 @@ -198,6 +197,10 @@ usage() "Performs a SCSI PERSISTENT RESERVE (IN or OUT) command\n"); } +/* If num_tids==0 then only one TransportID is assumed with len bytes in + * it. If num_tids>0 then that many TransportIDs is assumed, each in an + * element that is MX_TID_LEN bytes long (and the 'len' argument is + * ignored). */ static void decode_transport_id(const char * leadin, unsigned char * ucp, int len, int num_tids) @@ -302,6 +305,9 @@ decode_transport_id(const char * leadin, unsigned char * ucp, int len, } break; case TPROTO_NONE: + fprintf(stderr, "%s No specified protocol\n", leadin); + /* dStrHex((const char *)ucp, ((len > 24) ? 24 : len), -1); */ + break; default: fprintf(stderr, "%s unknown protocol id=0x%x " "format_code=%d\n", leadin, proto_id, format_code); |