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

[Xen-changelog] [xen master] libxl: a domain can be dying but not shutdown



commit c9a1b736426b9ba5a96660ef3b23bb2f5100e79e
Author:     David Scott <dave.scott@xxxxxxxxxx>
AuthorDate: Wed Oct 22 14:52:41 2014 +0100
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Tue Nov 4 10:25:40 2014 +0000

    libxl: a domain can be dying but not shutdown
    
    The shutdown code is only present if the domain is shutdown.
    If we attempt to extract it from the flags from a dying but not
    shutdown domain then we get values like '255' which is not a
    valid LIBXL_SHUTDOWN_REASON_. We should use LIBXL_SHUTDOWN_UNKNOWN
    in this case.
    
    Signed-off-by: David Scott <dave.scott@xxxxxxxxxx>
    Acked-by: Rob Hoes <rob.hoes@xxxxxxxxxx>
    Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
    [ ijc -- updated comment in libxl_types.idl to match ]
---
 tools/libxl/libxl.c         |    2 +-
 tools/libxl/libxl_types.idl |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 18561fb..7e7d1df 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -609,7 +609,7 @@ static void xcinfo2xlinfo(libxl_ctx *ctx,
     xlinfo->blocked  = !!(xcinfo->flags&XEN_DOMINF_blocked);
     xlinfo->running  = !!(xcinfo->flags&XEN_DOMINF_running);
 
-    if (xlinfo->shutdown || xlinfo->dying)
+    if (xlinfo->shutdown)
         xlinfo->shutdown_reason = (xcinfo->flags>>XEN_DOMINF_shutdownshift) & 
XEN_DOMINF_shutdownmask;
     else
         xlinfo->shutdown_reason = LIBXL_SHUTDOWN_REASON_UNKNOWN;
diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
index ca3f724..f7fc695 100644
--- a/tools/libxl/libxl_types.idl
+++ b/tools/libxl/libxl_types.idl
@@ -260,7 +260,7 @@ libxl_dominfo = Struct("dominfo",[
     ("shutdown",    bool),
     ("dying",       bool),
 
-    # Valid iff (shutdown||dying).
+    # Valid iff ->shutdown is true.
     #
     # Otherwise set to a value guaranteed not to clash with any valid
     # LIBXL_SHUTDOWN_REASON_* constant.
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
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®.