Skip to content

Commit

Permalink
ssc: return correct status code in ssc_space()
Browse files Browse the repository at this point in the history
The status code can be modified in resp_space(). Return the correct status code
instead of SAM_STAT_GOOD.

Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: Mark Harvey <markh794@gmail.com>
  • Loading branch information
Sebastian Herbszt authored and markh794 committed May 23, 2011
1 parent 8244b57 commit 48a851e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion usr/ssc.c
Original file line number Diff line number Diff line change
Expand Up @@ -999,6 +999,8 @@ uint8_t ssc_space(struct scsi_cmd *cmd)

sam_stat = &cmd->dbuf_p->sam_stat;

*sam_stat = SAM_STAT_GOOD;

count = get_unaligned_be24(&cmd->scb[2]);
code = cmd->scb[1] & 0x07;

Expand Down Expand Up @@ -1045,7 +1047,7 @@ uint8_t ssc_space(struct scsi_cmd *cmd)
if (icount != 0 || code == 3)
resp_space(icount, code, sam_stat);

return SAM_STAT_GOOD;
return *sam_stat;
}

uint8_t ssc_load_unload(struct scsi_cmd *cmd)
Expand Down

0 comments on commit 48a851e

Please sign in to comment.