Skip to contentSkip to conversation

crash when run with the -nographic switch

Qemu-devel Enache Adrian 1 participant 1 message Mar 18, 2007

lore
Share & tools
lore
#0 lore raw

ahq$ ./qemu -nographic -snapshot -fda serflp.fs
Segmentation fault (core dumped)
[...]
(gdb) bt
#0 console_putchar (s=0x8ae43000, ch=112)

    at /scrap/ahq/build/qemu/console.c:809
#1  0x1c01258a in console_puts (chr=0x0,
    buf=0xcfbd1e20 "parallel0 console\r\n", len=19)
    at /scrap/ahq/build/qemu/console.c:1014

[...]

Obviously, since it's running -nographic, the graphic console (vc) where it's trying to write that stuff is not initialized.

Adi

vl.c renamed from home/src/qemu/vl.c +1 -0
@@ -7073,6 +7075,7 @@ int main(int argc, char **argv)
                 break;
             case QEMU_OPTION_nographic:
                 pstrcpy(serial_devices[0], sizeof(serial_devices[0]), "stdio");
+                pstrcpy(parallel_devices[0], sizeof(parallel_devices[0]), "null");
                 pstrcpy(monitor_device, sizeof(monitor_device), "stdio");
                 nographic = 1;
                 break;