Index: ioemu/vl.c
===================================================================
--- ioemu.orig/vl.c	2007-05-03 19:00:14.000000000 +0100
+++ ioemu/vl.c	2007-05-03 19:00:51.000000000 +0100
@@ -6127,7 +6127,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, VGA BIOS and keymaps\n"
@@ -6205,7 +6205,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
@@ -6284,7 +6284,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
@@ -6555,6 +6555,8 @@
     int usb_devices_index;
     int fds[2];
 
+    char qemu_dm_logfilename[64];
+
     LIST_INIT (&vm_change_state_head);
 #ifndef _WIN32
     {
@@ -6634,6 +6636,11 @@
     nb_nics = 0;
     /* default mac address of the first network interface */
     
+    /* init debug */
+    sprintf(qemu_dm_logfilename, "/var/log/xen/qemu-dm.%ld.log", (long)getpid());
+    cpu_set_log_filename(qemu_dm_logfilename);
+    cpu_set_log(0);
+    
     optind = 1;
     for(;;) {
         if (optind >= argc)
@@ -6827,7 +6834,7 @@
                     exit(1);
                 }
                 break;
-            case QEMU_OPTION_d:
+            case QEMU_OPTION_l:
                 {
                     int mask;
                     CPULogItem *item;
