mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 11:11:27 +00:00
scst: Fix write-protected response
From SBC-4: "If present, any write protection shall cause otherwise valid logical block access commands that request alteration of the medium to be terminated by the device server with CHECK CONDITION status with the sense key set to DATA PROTECT and the appropriate additional sense code for the condition." Hence set the additional sense code in responses to SCSI commands sent to read-only LUNs. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6743 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -341,7 +341,7 @@ static inline int scst_sense_response_code(const uint8_t *sense)
|
||||
#define scst_sense_reported_luns_data_changed UNIT_ATTENTION, 0x3F, 0xE
|
||||
|
||||
/* DATA_PROTECT is 7 */
|
||||
#define scst_sense_data_protect DATA_PROTECT, 0x00, 0
|
||||
#define scst_sense_data_protect DATA_PROTECT, 0x27, 0
|
||||
|
||||
/* ABORTED_COMMAND is 0xb */
|
||||
#define scst_sense_aborted_command ABORTED_COMMAND, 0x00, 0
|
||||
|
||||
Reference in New Issue
Block a user