summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-02-01 17:37:48 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-02-01 17:37:48 +0000
commit7f777bf385211e98cb7f274fe57302d061d89c9c (patch)
treeb331ccf7fa1edbcdea3744fede2da0272a3b60e7 /hw
parent56bf1d37a05b6c6f9f01ddceeb154130710158e4 (diff)
downloadqemu-7f777bf385211e98cb7f274fe57302d061d89c9c.tar.gz
qemu-7f777bf385211e98cb7f274fe57302d061d89c9c.tar.bz2
qemu-7f777bf385211e98cb7f274fe57302d061d89c9c.zip
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
Diffstat (limited to 'hw')
-rw-r--r--hw/ide.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/hw/ide.c b/hw/ide.c
index af90e26456..1517f63b14 100644
--- a/hw/ide.c
+++ b/hw/ide.c
@@ -299,6 +299,7 @@
#define ATAPI_INT_REASON_TAG 0xf8
/* same constants as bochs */
+#define ASC_ILLEGAL_OPCODE 0x20
#define ASC_LOGICAL_BLOCK_OOR 0x21
#define ASC_INV_FIELD_IN_CMD_PACKET 0x24
#define ASC_MEDIUM_NOT_PRESENT 0x3a
@@ -1009,7 +1010,10 @@ static void ide_atapi_cmd(IDEState *s)
ide_atapi_cmd_reply(s, 12, max_len);
break;
default:
- goto error_cmd;
+ error_cmd:
+ ide_atapi_cmd_error(s, SENSE_ILLEGAL_REQUEST,
+ ASC_INV_FIELD_IN_CMD_PACKET);
+ break;
}
}
break;
@@ -1040,9 +1044,8 @@ static void ide_atapi_cmd(IDEState *s)
ide_atapi_cmd_reply(s, 36, max_len);
break;
default:
- error_cmd:
ide_atapi_cmd_error(s, SENSE_ILLEGAL_REQUEST,
- ASC_INV_FIELD_IN_CMD_PACKET);
+ ASC_ILLEGAL_OPCODE);
break;
}
}