if $vga eq 'terminal';
print "warning: qemu doesn't support jitter\n"
if defined $jitter;
- my (@cmd) = ('qemu');
- push (@cmd, '-no-kqemu');
+ my (@cmd) = ('qemu-system-i386');
+ push (@cmd, '-device', 'isa-debug-exit');
+
push (@cmd, '-hda', $disks[0]) if defined $disks[0];
push (@cmd, '-hdb', $disks[1]) if defined $disks[1];
push (@cmd, '-hdc', $disks[2]) if defined $disks[2];
for (;;) {
if (waitpid ($pid, WNOHANG) != 0) {
# Subprocess died. Pass through any remaining data.
- print $buf while sysread ($in, $buf, 4096) > 0;
+ do { print $buf } while sysread ($in, $buf, 4096) > 0;
last;
}
exit 0;
}
- return $?;
+ # Kind of a gross hack, because qemu's isa-debug-exit device
+ # only allows odd-numbered exit values, so we can't exit
+ # cleanly with 0. We use exit status 0x63 as an alternate
+ # "clean" exit status.
+ return ($? != 0x6300) && $?;
}
}