[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Rename QEMU device model log file from /tmp/qemu.log to



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID bdcb115c667a12a5514517456639142c1273b0f1
# Parent  5f94478ca9b52d981aa9b7b1881ac7a46c459cb6
Rename QEMU device model log file from /tmp/qemu.log to
/var/log/qemu-dm.<pid>.log.
Also redirect stderr to this log file.

Signed-off-by: Xin Li <xin.b.li@xxxxxxxxx>

diff -r 5f94478ca9b5 -r bdcb115c667a tools/ioemu/exec.c
--- a/tools/ioemu/exec.c        Sat Dec 10 23:17:11 2005
+++ b/tools/ioemu/exec.c        Sat Dec 10 23:20:08 2005
@@ -142,10 +142,9 @@
 #else
         setvbuf(logfile, NULL, _IOLBF, 0);
 #endif
-/*
-       stdout = logfile;
-       stderr = logfile;
-*/
+
+        stdout = logfile;
+        stderr = logfile;
     }
 }
 
diff -r 5f94478ca9b5 -r bdcb115c667a tools/ioemu/vl.c
--- a/tools/ioemu/vl.c  Sat Dec 10 23:17:11 2005
+++ b/tools/ioemu/vl.c  Sat Dec 10 23:20:08 2005
@@ -428,9 +428,9 @@
     vfprintf(stderr, fmt, ap);
     fprintf(stderr, "\n");
     if (logfile) {
-       fprintf(logfile, "qemu: hardware error: ");
-       vfprintf(logfile, fmt, ap);
-       fprintf(logfile, "\n");
+        fprintf(logfile, "qemu: hardware error: ");
+        vfprintf(logfile, fmt, ap);
+        fprintf(logfile, "\n");
     }
     va_end(ap);
     abort();
@@ -526,8 +526,8 @@
 
 #elif defined(__ia64__)
 #include "ia64_intrinsic.h"
-#define cpu_get_real_ticks()   \
-       __ia64_getreg(_IA64_REG_AR_ITC)
+#define cpu_get_real_ticks()    \
+    __ia64_getreg(_IA64_REG_AR_ITC)
 
 #else
 #error unsupported CPU
@@ -2645,6 +2645,7 @@
     char monitor_device[128];
     char serial_devices[MAX_SERIAL_PORTS][128];
     int serial_device_index;
+    char qemu_dm_logfilename[64];
     const char *loadvm = NULL;
     unsigned long nr_pages, extra_pages, ram_pages, *page_array;
     extern void *shared_page;
@@ -2695,6 +2696,8 @@
     macaddr[5] = 0x56;
 
     /* 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;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.