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] xend: Make /var/lib/xen if not already pr

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: Make /var/lib/xen if not already present.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 03 Mar 2009 11:10:40 -0800
Delivery-date: Tue, 03 Mar 2009 11:12:34 -0800
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
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1236080251 0
# Node ID bb281d11fa99191a9528fb18734dcddc4fe04bf4
# Parent  310c85c9cb860bc0933caa426097d788f99dbb6e
xend: Make /var/lib/xen if not already present.
Signed-off-by: Christoph Egger <christoph.egger@xxxxxxx>
---
 tools/python/xen/xend/XendCheckpoint.py |   14 ++++++++++++++
 1 files changed, 14 insertions(+)

diff -r 310c85c9cb86 -r bb281d11fa99 tools/python/xen/xend/XendCheckpoint.py
--- a/tools/python/xen/xend/XendCheckpoint.py   Mon Mar 02 16:24:50 2009 +0000
+++ b/tools/python/xen/xend/XendCheckpoint.py   Tue Mar 03 11:37:31 2009 +0000
@@ -66,6 +66,13 @@ def insert_after(list, pred, value):
 
 
 def save(fd, dominfo, network, live, dst, checkpoint=False, node=-1):
+    try:
+        if not os.path.isdir("/var/lib/xen"):
+            os.makedirs("/var/lib/xen")
+    except Exception, exn:
+        log.exception("Can't create directory '/var/lib/xen'")
+        raise XendError("Can't create directory '/var/lib/xen'")
+
     write_exact(fd, SIGNATURE, "could not write guest state file: signature")
 
     sxprep = dominfo.sxpr()
@@ -166,6 +173,13 @@ def save(fd, dominfo, network, live, dst
 
 
 def restore(xd, fd, dominfo = None, paused = False, relocating = False):
+    try:
+        if not os.path.isdir("/var/lib/xen"):
+            os.makedirs("/var/lib/xen")
+    except Exception, exn:
+        log.exception("Can't create directory '/var/lib/xen'")
+        raise XendError("Can't create directory '/var/lib/xen'")
+
     signature = read_exact(fd, len(SIGNATURE),
         "not a valid guest state file: signature read")
     if signature != SIGNATURE:

_______________________________________________
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] xend: Make /var/lib/xen if not already present., Xen patchbot-unstable <=