Add MODESELECT6 support

Add support for MODESELECT6 and add marshalling functions for the
mode pages we support so far.
This commit is contained in:
Ronnie Sahlberg
2013-07-06 16:11:17 -07:00
parent b6e5af558d
commit 7895fb700c
7 changed files with 336 additions and 0 deletions

View File

@@ -1156,6 +1156,26 @@ iscsi_scsi_command_sync(struct iscsi_context *iscsi, int lun,
}
struct scsi_task *
iscsi_modeselect6_sync(struct iscsi_context *iscsi, int lun,
int pf, int sp, struct scsi_mode_page *mp)
{
struct iscsi_sync_state state;
memset(&state, 0, sizeof(state));
if (iscsi_modeselect6_task(iscsi, lun, pf, sp, mp,
scsi_sync_cb, &state) == NULL) {
iscsi_set_error(iscsi,
"Failed to send MODE_SELECT6 command");
return NULL;
}
event_loop(iscsi, &state);
return state.task;
}
struct scsi_task *
iscsi_modesense6_sync(struct iscsi_context *iscsi, int lun, int dbd,
int pc, int page_code, int sub_page_code,