lib: drop generic sense data descriptor VALID check
According to SPC-5 (r17), the sense data descriptor format follows: byte field ---- ----- 0: DESCRIPTOR TYPE 1: ADDITIONAL LENGTH 2-n: Sense data descriptor specific The VALID bit is a sense data descriptor specific flag, and is not present in the only sense data descriptor supported by libiscsi - Sense key specific sense data descriptors. Drop the generic VALID bit check, in preparation for handling it on a sense data descriptor specific basis. Suggested-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: David Disseldorp <ddiss@suse.de>
This commit is contained in:
@@ -328,8 +328,6 @@ static void parse_sense_descriptors(struct scsi_sense *sense, const uint8_t *sb,
|
||||
for (p = sb; p < end; p += p[1]) {
|
||||
if (p[1] < 4) /* length */
|
||||
break;
|
||||
if (!(p[2] & 0x80)) /* VALID bit */
|
||||
break;
|
||||
switch (p[0]) {
|
||||
case 2:
|
||||
/* Sense key specific sense data descriptor */
|
||||
|
||||
Reference in New Issue
Block a user