Re: Why is tid 0 illegal?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 07/15/2013 04:40 PM, Dan Mick wrote:
tgtadm rejects tid 0.  Why?  There is a -1 sentinel value, and 0 is
certainly a legal SCSI target number.

I get that lun0 is reserved, but is rejecting target 0 a bug?


The following let me go all the way to a working target 0:

--- a/usr/tgtadm.c
+++ b/usr/tgtadm.c
@@ -654,7 +654,7 @@ int main(int argc, char **argv)
        }

        if (mode == MODE_TARGET) {
-               if ((tid <= 0 && (op != OP_SHOW))) {
+               if ((tid < 0 && (op != OP_SHOW))) {
                        eprintf("'tid' option is necessary\n");
                        exit(EINVAL);
                }
@@ -792,7 +792,7 @@ int main(int argc, char **argv)
        }

        if (mode == MODE_DEVICE) {
-               if (tid <= 0) {
+               if (tid < 0) {
                        eprintf("'tid' option is necessary\n");
                        exit(EINVAL);
                }
--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux