mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
bitkeeper revision 1.1510 (4291adbf-g-WMA-w33q-SnHuwoX3BA)
XendDomain.py, xc_linux_save.c: Re-arrange layout of save/restore file. Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
This commit is contained in:
1 parent
0665373fa3
commit
f900ac3343
2 files changed
+16
-13
No files matched your search
@@ -342,16 +342,6 @@ class XendDomain:
|
||||
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
|
||||
@@ -366,6 +356,16 @@ class XendDomain:
|
||||
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
|
||||
ignore = fd.tell()
|
||||
|
||||