summaryrefslogtreecommitdiffstats
path: root/hw/ide/core.c
diff options
context:
space:
mode:
authorPaolo Bonzini2011-09-13 14:41:56 +0200
committerKevin Wolf2011-10-28 19:25:50 +0200
commit67cc61e43077eeffc7c95a1bb25d05a12d051c67 (patch)
treea803822fb32290d330eb37df6f7972d2fcdbc876 /hw/ide/core.c
parentscsi: pass correct sense code for ENOMEDIUM (diff)
downloadqemu-67cc61e43077eeffc7c95a1bb25d05a12d051c67.tar.gz
qemu-67cc61e43077eeffc7c95a1bb25d05a12d051c67.tar.xz
qemu-67cc61e43077eeffc7c95a1bb25d05a12d051c67.zip
atapi/scsi: unify definitions for MMC
The definitions in ide/internal.h are duplicates, since ATAPI commands actually come from SCSI. Use the ones in scsi-defs.h and move the missing ones there. Two exceptions: - MODE_PAGE_WRITE_PARMS conflicts with the "flexible disk geometry" page in scsi-disk.c. It is unused, so pick the latter. - GPCMD_* is left in ide/internal.h, at least for now. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'hw/ide/core.c')
-rw-r--r--hw/ide/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/ide/core.c b/hw/ide/core.c
index 29305d35f4..9a2fd30607 100644
--- a/hw/ide/core.c
+++ b/hw/ide/core.c
@@ -799,7 +799,7 @@ static void ide_cd_change_cb(void *opaque, bool load)
* First indicate to the guest that a CD has been removed. That's
* done on the next command the guest sends us.
*
- * Then we set SENSE_UNIT_ATTENTION, by which the guest will
+ * Then we set UNIT_ATTENTION, by which the guest will
* detect a new CD in the drive. See ide_atapi_cmd() for details.
*/
s->cdrom_changed = 1;
@@ -2027,7 +2027,7 @@ static int ide_drive_post_load(void *opaque, int version_id)
IDEState *s = opaque;
if (version_id < 3) {
- if (s->sense_key == SENSE_UNIT_ATTENTION &&
+ if (s->sense_key == UNIT_ATTENTION &&
s->asc == ASC_MEDIUM_MAY_HAVE_CHANGED) {
s->cdrom_changed = 1;
}