Add PREVENTALLOWMEDIUMREMOVAL support
This commit is contained in:
20
lib/sync.c
20
lib/sync.c
@@ -419,6 +419,26 @@ iscsi_startstopunit_sync(struct iscsi_context *iscsi, int lun,
|
||||
return state.task;
|
||||
}
|
||||
|
||||
struct scsi_task *
|
||||
iscsi_preventallow_sync(struct iscsi_context *iscsi, int lun,
|
||||
int prevent)
|
||||
{
|
||||
struct iscsi_sync_state state;
|
||||
|
||||
memset(&state, 0, sizeof(state));
|
||||
|
||||
if (iscsi_preventallow_task(iscsi, lun, prevent,
|
||||
scsi_sync_cb, &state) == NULL) {
|
||||
iscsi_set_error(iscsi,
|
||||
"Failed to send PreventAllowMediumRemoval command");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
event_loop(iscsi, &state);
|
||||
|
||||
return state.task;
|
||||
}
|
||||
|
||||
struct scsi_task *
|
||||
iscsi_synchronizecache16_sync(struct iscsi_context *iscsi, int lun, uint64_t lba,
|
||||
uint32_t num_blocks, int syncnv, int immed)
|
||||
|
||||
Reference in New Issue
Block a user