WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] qemu: Use domid in qemu log name. Can be related back to domain name
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 11 Jun 2007 02:22:15 -0700
Delivery-date: Mon, 11 Jun 2007 02:24:30 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] qemu: Use domid in qemu log name. Can be related back to domain name, Xen patchbot-unstable <=