From b221fe690e6ce4e2eacbba762465e542c0aca124 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Fri, 27 Apr 2007 14:46:22 +0000 Subject: [PATCH] LOG_SELECT/SENSE stub added. Looks like it is more correct way to refuse those commands git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@112 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index b52d19782..925a7507a 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -163,6 +163,7 @@ static void vdisk_exec_read_capacity16(struct scst_cmd *cmd); static void vdisk_exec_inquiry(struct scst_cmd *cmd); static void vdisk_exec_mode_sense(struct scst_cmd *cmd); static void vdisk_exec_mode_select(struct scst_cmd *cmd); +static void vdisk_exec_log(struct scst_cmd *cmd); static void vdisk_exec_read_toc(struct scst_cmd *cmd); static void vdisk_exec_prevent_allow_medium_removal(struct scst_cmd *cmd); static int vdisk_fsync(struct scst_vdisk_thr *thr, @@ -776,6 +777,10 @@ static int vdisk_do_job(struct scst_cmd *cmd) case MODE_SELECT_10: vdisk_exec_mode_select(cmd); break; + case LOG_SELECT: + case LOG_SENSE: + vdisk_exec_log(cmd); + break; case ALLOW_MEDIUM_REMOVAL: vdisk_exec_prevent_allow_medium_removal(cmd); break; @@ -1430,6 +1435,18 @@ out: return; } +static void vdisk_exec_log(struct scst_cmd *cmd) +{ + TRACE_ENTRY(); + + /* No log pages are supported */ + scst_set_cmd_error(cmd, + SCST_LOAD_SENSE(scst_sense_invalid_field_in_cdb)); + + TRACE_EXIT(); + return; +} + static void vdisk_exec_read_capacity(struct scst_cmd *cmd) { int32_t length;