LD_ISCSI: Fail open with O_NONBLOCK

Non-Blocking I/O is supported nowhere in the code. We should fail
until we have support for it.
This commit is contained in:
Peter Lieven
2012-10-21 08:24:24 +02:00
parent bca635c75d
commit 8a3e312f06

View File

@@ -67,6 +67,12 @@ int open(const char *path, int flags, mode_t mode)
struct scsi_task *task;
struct scsi_readcapacity10 *rc10;
if (mode & O_NONBLOCK) {
LD_ISCSI_DPRINTF(0,"Non-blocking I/O is currently not supported");
errno = EINVAL;
return -1;
}
iscsi = iscsi_create_context(initiator);
if (iscsi == NULL) {
LD_ISCSI_DPRINTF(0,"Failed to create context");