Login: dont fail the login just because there is no media in a device
in that case we will never reach test unit ready being successful since it will fail with NOT_READY/MEDIUM_NOT_PRESENT. Treat this sense code as a successful login as far as the login process is concerned
This commit is contained in:
@@ -63,6 +63,13 @@ iscsi_testunitready_cb(struct iscsi_context *iscsi, int status,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Dont fail the login just because there is no medium in the device */
|
||||||
|
if (status != 0
|
||||||
|
&& task->sense.key == SCSI_SENSE_NOT_READY
|
||||||
|
&& task->sense.ascq == SCSI_SENSE_ASCQ_MEDIUM_NOT_PRESENT) {
|
||||||
|
status = 0;
|
||||||
|
}
|
||||||
|
|
||||||
ct->cb(iscsi, status?SCSI_STATUS_ERROR:SCSI_STATUS_GOOD, NULL,
|
ct->cb(iscsi, status?SCSI_STATUS_ERROR:SCSI_STATUS_GOOD, NULL,
|
||||||
ct->private_data);
|
ct->private_data);
|
||||||
free(ct);
|
free(ct);
|
||||||
|
|||||||
Reference in New Issue
Block a user