diff options
Diffstat (limited to 'tools/ioemu/patches/qemu-logging')
-rw-r--r-- | tools/ioemu/patches/qemu-logging | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/tools/ioemu/patches/qemu-logging b/tools/ioemu/patches/qemu-logging new file mode 100644 index 0000000000..c11dbb6ae3 --- /dev/null +++ b/tools/ioemu/patches/qemu-logging @@ -0,0 +1,70 @@ +Index: ioemu/vl.c +=================================================================== +--- ioemu.orig/vl.c 2006-07-12 11:35:00.955797021 +0100 ++++ ioemu/vl.c 2006-07-12 11:35:01.094779608 +0100 +@@ -4697,7 +4697,7 @@ + "-S freeze CPU at startup (use 'c' to start execution)\n" + "-s wait gdb connection to port %d\n" + "-p port change gdb connection port\n" +- "-d item1,... output log to %s (use -d ? for a list of log items)\n" ++ "-l item1,... output log to %s (use -d ? for a list of log items)\n" + "-hdachs c,h,s[,t] force hard disk 0 physical geometry and the optional BIOS\n" + " translation (t=none or lba) (usually qemu can guess them)\n" + "-L path set the directory for the BIOS and VGA BIOS\n" +@@ -4775,7 +4775,7 @@ + QEMU_OPTION_S, + QEMU_OPTION_s, + QEMU_OPTION_p, +- QEMU_OPTION_d, ++ QEMU_OPTION_l, + QEMU_OPTION_hdachs, + QEMU_OPTION_L, + #ifdef USE_CODE_COPY +@@ -4844,7 +4844,7 @@ + { "S", 0, QEMU_OPTION_S }, + { "s", 0, QEMU_OPTION_s }, + { "p", HAS_ARG, QEMU_OPTION_p }, +- { "d", HAS_ARG, QEMU_OPTION_d }, ++ { "l", HAS_ARG, QEMU_OPTION_l }, + { "hdachs", HAS_ARG, QEMU_OPTION_hdachs }, + { "L", HAS_ARG, QEMU_OPTION_L }, + #ifdef USE_CODE_COPY +@@ -5095,6 +5095,8 @@ + char usb_devices[MAX_VM_USB_PORTS][128]; + int usb_devices_index; + ++ char qemu_dm_logfilename[64]; ++ + LIST_INIT (&vm_change_state_head); + #if !defined(CONFIG_SOFTMMU) + /* we never want that malloc() uses mmap() */ +@@ -5144,6 +5146,11 @@ + nb_nics = 0; + /* default mac address of the first network interface */ + ++ /* init debug */ ++ sprintf(qemu_dm_logfilename, "/var/log/qemu-dm.%d.log", getpid()); ++ cpu_set_log_filename(qemu_dm_logfilename); ++ cpu_set_log(0); ++ + optind = 1; + for(;;) { + if (optind >= argc) +@@ -5329,7 +5336,7 @@ + exit(1); + } + break; +- case QEMU_OPTION_d: ++ case QEMU_OPTION_l: + { + int mask; + CPULogItem *item; +@@ -5698,7 +5705,7 @@ + stk.ss_flags = 0; + + if (sigaltstack(&stk, NULL) < 0) { +- perror("sigaltstack"); ++ fprintf(logfile, "sigaltstack returned error %d\n", errno); + exit(1); + } + } |