diff --git a/lib/connect.c b/lib/connect.c index 15ec1be..62591fe 100644 --- a/lib/connect.c +++ b/lib/connect.c @@ -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->private_data); free(ct);