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

[Xen-changelog] [xen-unstable] qemu: Use domid in qemu log name. Can be related back to domain name



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1181033974 -3600
# Node ID f45c84dd5f4133feae766082acc6e449a42c4116
# Parent  23460646912e4ad627b30bc614045ee20a18233a
qemu: Use domid in qemu log name. Can be related back to domain name
or uuid via xend logs, less unique than pids to prevent excessive
number of log files hanging around, yet not immediately reused (unlike
e.g., after domain crash or reboot) where previous log file is
immediately overwritten. Not using domain names in logs avoids and
chance of unprintable charcatres becoming embedded in filenames.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/ioemu/vl.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff -r 23460646912e -r f45c84dd5f41 tools/ioemu/vl.c
--- a/tools/ioemu/vl.c  Tue Jun 05 08:57:53 2007 +0100
+++ b/tools/ioemu/vl.c  Tue Jun 05 09:59:34 2007 +0100
@@ -183,7 +183,7 @@ extern int vcpus;
 
 int xc_handle;
 
-char domain_name[64] = "Xen HVM Guest";
+char domain_name[64] = "Xen-HVM-no-name";
 extern int domid;
 
 char vncpasswd[64];
@@ -7525,8 +7525,8 @@ int main(int argc, char **argv)
                 semihosting_enabled = 1;
                 break;
             case QEMU_OPTION_domainname:
-                strncpy(domain_name, optarg, sizeof(domain_name));
-                domain_name[sizeof(domain_name)-1] = '\0';
+                snprintf(domain_name, sizeof(domain_name),
+                         "Xen-HVM-%s", optarg);
                 break;
             case QEMU_OPTION_d:
                 domid = atoi(optarg);
@@ -7550,7 +7550,7 @@ int main(int argc, char **argv)
     }
 
     /* Now send logs to our named config */
-    sprintf(qemu_dm_logfilename, "/var/log/xen/qemu-dm-%s.log", domain_name);
+    sprintf(qemu_dm_logfilename, "/var/log/xen/qemu-dm-%d.log", domid);
     cpu_set_log_filename(qemu_dm_logfilename);
 
 #ifndef _WIN32

_______________________________________________
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®.