aboutsummaryrefslogtreecommitdiff
path: root/hw/i386/pc.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-01-26 09:16:07 +0000
committerPeter Maydell <peter.maydell@linaro.org>2016-01-26 09:16:07 +0000
commit1535a6d699487740b490369e44f9ca8d305463cd (patch)
tree6e26639d54ebf2ceadb8b60a889f5f87a3a42307 /hw/i386/pc.c
parent6ee06cc3dc7e8eb238e2f60cfd04f094d5c6b948 (diff)
parent4812fa27fa75bce89738a82a191755853dd88408 (diff)
downloadqemu-1535a6d699487740b490369e44f9ca8d305463cd.zip
qemu-1535a6d699487740b490369e44f9ca8d305463cd.tar.gz
qemu-1535a6d699487740b490369e44f9ca8d305463cd.tar.bz2
Merge remote-tracking branch 'remotes/jnsnow/tags/ide-pull-request' into staging
# gpg: Signature made Mon 25 Jan 2016 19:39:58 GMT using RSA key ID AAFC390E # gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>" * remotes/jnsnow/tags/ide-pull-request: fdc: change auto fallback drive for ISA FDC to 288 qtest/fdc: Support for 2.88MB drives fdc: rework pick_geometry fdc: add physical disk sizes fdc: add drive type option fdc: Add fallback option fdc: add pick_drive fdc: Throw an assertion on misconfigured fd_formats table fdc: add disk field fdc: add drive type qapi enum fdc: reduce number of pick_geometry arguments fdc: move pick_geometry ide: Correct the CHS 'cyls_max' limit to be 65535 Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/i386/pc.c')
-rw-r--r--hw/i386/pc.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 838636c..78cf8fa 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -199,24 +199,24 @@ static void pic_irq_request(void *opaque, int irq, int level)
#define REG_EQUIPMENT_BYTE 0x14
-static int cmos_get_fd_drive_type(FDriveType fd0)
+static int cmos_get_fd_drive_type(FloppyDriveType fd0)
{
int val;
switch (fd0) {
- case FDRIVE_DRV_144:
+ case FLOPPY_DRIVE_TYPE_144:
/* 1.44 Mb 3"5 drive */
val = 4;
break;
- case FDRIVE_DRV_288:
+ case FLOPPY_DRIVE_TYPE_288:
/* 2.88 Mb 3"5 drive */
val = 5;
break;
- case FDRIVE_DRV_120:
+ case FLOPPY_DRIVE_TYPE_120:
/* 1.2 Mb 5"5 drive */
val = 2;
break;
- case FDRIVE_DRV_NONE:
+ case FLOPPY_DRIVE_TYPE_NONE:
default:
val = 0;
break;
@@ -287,7 +287,8 @@ static void pc_boot_set(void *opaque, const char *boot_device, Error **errp)
static void pc_cmos_init_floppy(ISADevice *rtc_state, ISADevice *floppy)
{
int val, nb, i;
- FDriveType fd_type[2] = { FDRIVE_DRV_NONE, FDRIVE_DRV_NONE };
+ FloppyDriveType fd_type[2] = { FLOPPY_DRIVE_TYPE_NONE,
+ FLOPPY_DRIVE_TYPE_NONE };
/* floppy type */
if (floppy) {
@@ -301,10 +302,10 @@ static void pc_cmos_init_floppy(ISADevice *rtc_state, ISADevice *floppy)
val = rtc_get_memory(rtc_state, REG_EQUIPMENT_BYTE);
nb = 0;
- if (fd_type[0] < FDRIVE_DRV_NONE) {
+ if (fd_type[0] != FLOPPY_DRIVE_TYPE_NONE) {
nb++;
}
- if (fd_type[1] < FDRIVE_DRV_NONE) {
+ if (fd_type[1] != FLOPPY_DRIVE_TYPE_NONE) {
nb++;
}
switch (nb) {