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] [qemu-xen-unstable] replace stat("/etc/disable-guest-log

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [qemu-xen-unstable] replace stat("/etc/disable-guest-log-throttle") in xen_platform.c
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Tue, 2 Jun 2009 10:45:28 -0700
Delivery-date: Thu, 11 Jun 2009 08:02:41 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
commit e17ca57cf5e6d4c6d11eccca7daee853915a6eff
Author: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Date:   Thu May 28 18:24:49 2009 +0100

    replace stat("/etc/disable-guest-log-throttle") in xen_platform.c
    
    currently xen_platform reads /etc/disable-guest-log-throttle at boot to
    decide whether is going to throttle guest logging or not.
    When using stubdom this is the only code in qemu that rely on
    fs-backend, apart from saving and loading the statefile for migration.
    This patch removes the read from /etc and adds a read from xenstore
    instead.
    
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
 hw/xen_platform.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/hw/xen_platform.c b/hw/xen_platform.c
index 9827e3f..36610a4 100644
--- a/hw/xen_platform.c
+++ b/hw/xen_platform.c
@@ -276,6 +276,8 @@ static int platform_fixed_ioport_load(QEMUFile *f, void 
*opaque, int version_id)
 void platform_fixed_ioport_init(void)
 {
     struct stat stbuf;
+    char *throttling;
+    int len = 1;
 
     register_savevm("platform_fixed_ioport", 0, 1, platform_fixed_ioport_save,
                     platform_fixed_ioport_load, NULL);
@@ -286,8 +288,11 @@ void platform_fixed_ioport_init(void)
     register_ioport_read(0x10, 16, 2, platform_fixed_ioport_read2, NULL);
     register_ioport_read(0x10, 16, 1, platform_fixed_ioport_read1, NULL);
 
-    if (stat("/etc/disable-guest-log-throttle", &stbuf) == 0)
-        throttling_disabled = 1;
+    throttling = xenstore_vm_read(domid, "log-throttling", &len);
+    if (throttling != NULL) {
+        throttling_disabled = (throttling[0] - '0');
+        free(throttling);
+    }
 
     platform_fixed_ioport_write1(NULL, 0x10, 0);
 }
--
generated by git-patchbot for /home/xen/git/qemu-xen-unstable.git

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [qemu-xen-unstable] replace stat("/etc/disable-guest-log-throttle") in xen_platform.c, Ian Jackson <=