Commit 7f777bf385211e98cb7f274fe57302d061d89c9c

Authored by bellard
1 parent 56bf1d37

fixed atapi error codes (initial patch by Jens Axboe)


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@593 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 6 additions and 3 deletions
hw/ide.c
... ... @@ -299,6 +299,7 @@
299 299 #define ATAPI_INT_REASON_TAG 0xf8
300 300  
301 301 /* same constants as bochs */
  302 +#define ASC_ILLEGAL_OPCODE 0x20
302 303 #define ASC_LOGICAL_BLOCK_OOR 0x21
303 304 #define ASC_INV_FIELD_IN_CMD_PACKET 0x24
304 305 #define ASC_MEDIUM_NOT_PRESENT 0x3a
... ... @@ -1009,7 +1010,10 @@ static void ide_atapi_cmd(IDEState *s)
1009 1010 ide_atapi_cmd_reply(s, 12, max_len);
1010 1011 break;
1011 1012 default:
1012   - goto error_cmd;
  1013 + error_cmd:
  1014 + ide_atapi_cmd_error(s, SENSE_ILLEGAL_REQUEST,
  1015 + ASC_INV_FIELD_IN_CMD_PACKET);
  1016 + break;
1013 1017 }
1014 1018 }
1015 1019 break;
... ... @@ -1040,9 +1044,8 @@ static void ide_atapi_cmd(IDEState *s)
1040 1044 ide_atapi_cmd_reply(s, 36, max_len);
1041 1045 break;
1042 1046 default:
1043   - error_cmd:
1044 1047 ide_atapi_cmd_error(s, SENSE_ILLEGAL_REQUEST,
1045   - ASC_INV_FIELD_IN_CMD_PACKET);
  1048 + ASC_ILLEGAL_OPCODE);
1046 1049 break;
1047 1050 }
1048 1051 }
... ...