ide_sector_write);
}
- if (win2k_install_hack && ((++s->irq_count % 16) == 0)) {
+ if (s->win2k_install_hack && ((++s->irq_count % 16) == 0)) {
/* It seems there is a bug in the Windows 2000 installer HDD
IDE driver which fills the disk with empty logs when the
IDE write IRQ comes too early. This hack tries to correct
s->drive_kind = kind;
blk_get_geometry(s->blk, &nb_sectors);
+ s->win2k_install_hack = dev->win2k_install_hack;
s->cylinders = dev->conf.cyls;
s->heads = s->drive_heads = dev->conf.heads;
s->sectors = s->drive_sectors = dev->conf.secs;
static Property ide_props[] = {
DEFINE_PROP_UINT32("unit", IDEDevice, unit, -1),
+ DEFINE_PROP_BOOL("win2k-install-hack", IDEDevice, win2k_install_hack, false),
DEFINE_PROP_END_OF_LIST(),
};
int drive_serial;
char drive_serial_str[21];
char drive_model_str[41];
+ bool win2k_install_hack;
uint64_t wwn;
/* ide regs */
uint8_t feature;
* 0xffff - reserved
*/
uint16_t rotation_rate;
+ bool win2k_install_hack;
};
typedef struct IDEDrive {
extern int graphic_depth;
extern int display_opengl;
extern const char *keyboard_layout;
-extern int win2k_install_hack;
extern int graphic_rotate;
extern int old_param;
extern uint8_t *boot_splash_filedata;
``-win2k-hack``
Use it when installing Windows 2000 to avoid a disk full bug. After
Windows 2000 is installed, you no longer need this option (this
- option slows down the IDE transfers).
+ option slows down the IDE transfers). Synonym of ``-global
+ ide-device.win2k-install-hack=on``.
ERST
DEF("no-fd-bootchk", 0, QEMU_OPTION_no_fd_bootchk,
int vga_interface_type = VGA_NONE;
bool vga_interface_created;
Chardev *parallel_hds[MAX_PARALLEL_PORTS];
-int win2k_install_hack;
int graphic_rotate;
QEMUOptionRom option_rom[MAX_OPTION_ROMS];
int nb_option_roms;
pid_file = optarg;
break;
case QEMU_OPTION_win2k_hack:
- win2k_install_hack = 1;
+ object_register_sugar_prop("ide-device", "win2k-install-hack", "true", true);
break;
case QEMU_OPTION_acpitable:
opts = qemu_opts_parse_noisily(qemu_find_opts("acpi"),