[stgt] Why is tid 0 illegal?
Dan Mick
dan.mick at inktank.com
Tue Jul 16 02:43:58 CEST 2013
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 at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
More information about the stgt
mailing list