[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [HVM] Save/restore: Sometimes the hg changeset is not available.



# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
# Date 1169138891 0
# Node ID 5859be20111093146d54e6820545f7a36eafab78
# Parent  53a1dbb703864f0f09acd1b943ac0d247367361b
[HVM] Save/restore: Sometimes the hg changeset is not available.
Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/intercept.c |   17 +++++++++++++++--
 1 files changed, 15 insertions(+), 2 deletions(-)

diff -r 53a1dbb70386 -r 5859be201110 xen/arch/x86/hvm/intercept.c
--- a/xen/arch/x86/hvm/intercept.c      Thu Jan 18 16:48:10 2007 +0000
+++ b/xen/arch/x86/hvm/intercept.c      Thu Jan 18 16:48:11 2007 +0000
@@ -210,7 +210,11 @@ int hvm_save(struct vcpu *v, hvm_domain_
     hvm_put_32u(h, HVM_FILE_VERSION);
 
     /* save xen changeset */
-    chgset = strrchr(XEN_CHANGESET, ' ') + 1;
+    chgset = strrchr(XEN_CHANGESET, ' ');
+    if ( chgset )
+        chgset++;
+    else
+        chgset = XEN_CHANGESET;
 
     len = strlen(chgset);
     hvm_put_8u(h, len);
@@ -303,7 +307,11 @@ int hvm_load(struct vcpu *v, hvm_domain_
     }
 
     /* check xen change set */
-    cur_chgset = strrchr(XEN_CHANGESET, ' ') + 1;
+    cur_chgset = strrchr(XEN_CHANGESET, ' ');
+    if ( cur_chgset )
+        cur_chgset++;
+    else
+        cur_chgset = XEN_CHANGESET;
 
     len = hvm_get_8u(h);
     if (len > 20) { /*typical length is 18 -- "revision number:changeset id" */
@@ -316,6 +324,11 @@ int hvm_load(struct vcpu *v, hvm_domain_
     if (strncmp(cur_chgset, chgset, len + 1))
         printk("warnings: try to restore hvm guest(%s) on a different 
changeset %s.\n",
                 chgset, cur_chgset);
+
+
+    if ( !strcmp(cur_chgset, "unavailable") )
+        printk("warnings: try to restore hvm guest when changeset is 
unavailable.\n");
+
 
     /* check cpuid */
     cpuid(1, &eax, &ebx, &ecx, &edx);

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.