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] XendDomain.py, xc_linux_save.c:

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] XendDomain.py, xc_linux_save.c:
From: BitKeeper Bot <riel@xxxxxxxxxxx>
Date: Mon, 23 May 2005 10:17:35 +0000
Delivery-date: Mon, 23 May 2005 16:03:52 +0000
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/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 Development List <xen-devel@xxxxxxxxxxxxxxxxxxx>
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
ChangeSet 1.1510, 2005/05/23 11:17:35+01:00, cl349@xxxxxxxxxxxxxxxxxxxx

        XendDomain.py, xc_linux_save.c:
          Re-arrange layout of save/restore file.
        Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>



 libxc/xc_linux_save.c         |    9 ++++++---
 python/xen/xend/XendDomain.py |   20 ++++++++++----------
 2 files changed, 16 insertions(+), 13 deletions(-)


diff -Nru a/tools/libxc/xc_linux_save.c b/tools/libxc/xc_linux_save.c
--- a/tools/libxc/xc_linux_save.c       2005-05-23 12:04:36 -04:00
+++ b/tools/libxc/xc_linux_save.c       2005-05-23 12:04:36 -04:00
@@ -638,14 +638,17 @@
 
     /* Start writing out the saved-domain record. */
 
-    if ( xcio_write(ioctxt, "LinuxGuestRecord",    16) ||
-         xcio_write(ioctxt, &nr_pfns,              sizeof(unsigned long)) ||
-         xcio_write(ioctxt, pfn_to_mfn_frame_list, PAGE_SIZE) ){
+    if ( xcio_write(ioctxt, "LinuxGuestRecord",    16) ){
         xcio_error(ioctxt, "Error writing header");
         goto out;
     }
     if(write_vmconfig(ioctxt)){
         xcio_error(ioctxt, "Error writing vmconfig");
+        goto out;
+    }
+    if ( xcio_write(ioctxt, &nr_pfns,              sizeof(unsigned long)) ||
+         xcio_write(ioctxt, pfn_to_mfn_frame_list, PAGE_SIZE) ){
+        xcio_error(ioctxt, "Error writing header");
         goto out;
     }
 
diff -Nru a/tools/python/xen/xend/XendDomain.py 
b/tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py       2005-05-23 12:04:36 -04:00
+++ b/tools/python/xen/xend/XendDomain.py       2005-05-23 12:04:36 -04:00
@@ -342,16 +342,6 @@
                 raise XendError("not a valid guest state file: found '%s'" %
                                 signature)
 
-            l = fd.read_exact(sizeof_unsigned_long,
-                              "not a valid guest state file: pfn count read")
-            nr_pfns = unpack("=L", l)[0]   # XXX endianess
-            if nr_pfns > 1024*1024:     # XXX
-                raise XendError(
-                    "not a valid guest state file: pfn count out of range")
-
-            pfn_to_mfn_frame_list = fd.read_exact(PAGE_SIZE,
-                "not a valid guest state file: pfn_to_mfn_frame_list read")
-
             l = fd.read_exact(sizeof_int,
                               "not a valid guest state file: config size read")
             vmconfig_size = unpack("i", l)[0] # XXX endianess
@@ -365,6 +355,16 @@
 
             vmconfig = p.get_val()
             dominfo = self.domain_configure(vmconfig)
+
+            l = fd.read_exact(sizeof_unsigned_long,
+                              "not a valid guest state file: pfn count read")
+            nr_pfns = unpack("=L", l)[0]   # XXX endianess
+            if nr_pfns > 1024*1024:     # XXX
+                raise XendError(
+                    "not a valid guest state file: pfn count out of range")
+
+            pfn_to_mfn_frame_list = fd.read_exact(PAGE_SIZE,
+                "not a valid guest state file: pfn_to_mfn_frame_list read")
 
             # XXXcl hack: fd.tell will sync up the object and
             #             underlying file descriptor

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] XendDomain.py, xc_linux_save.c:, BitKeeper Bot <=