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

[Xen-changelog] [xen-unstable] libxl: add useful xc flags in the xl_dominfo structure



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1262177077 0
# Node ID 49d0c3ff79433f687a2faffd950317d9f91a1c39
# Parent  bb828aacf968b763b3ed99c20a191be04e7a63b4
libxl: add useful xc flags in the xl_dominfo structure

Signed-off-by: Vincent Hanquez <vincent.hanquez@xxxxxxxxxxxxx>
---
 tools/libxl/libxl.c |    8 ++++++++
 tools/libxl/libxl.h |    3 +++
 2 files changed, 11 insertions(+)

diff -r bb828aacf968 -r 49d0c3ff7943 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c       Wed Dec 30 12:43:57 2009 +0000
+++ b/tools/libxl/libxl.c       Wed Dec 30 12:44:37 2009 +0000
@@ -304,6 +304,14 @@ redo:
         }
         memcpy(&(ptr[index].uuid), info[i].handle, 
sizeof(xen_domain_handle_t));
         ptr[index].domid = info[i].domain;
+
+        if (info[i].flags & XEN_DOMINF_dying)
+            ptr[index].dying = 1;
+        else if (info[i].flags & XEN_DOMINF_paused)
+            ptr[index].paused = 1;
+        else if (info[i].flags & XEN_DOMINF_blocked || info[i].flags & 
XEN_DOMINF_running)
+            ptr[index].running = 1;
+
         first_domain = info[i].domain + 1;
         index++;
     }
diff -r bb828aacf968 -r 49d0c3ff7943 tools/libxl/libxl.h
--- a/tools/libxl/libxl.h       Wed Dec 30 12:43:57 2009 +0000
+++ b/tools/libxl/libxl.h       Wed Dec 30 12:44:37 2009 +0000
@@ -28,6 +28,9 @@ struct libxl_dominfo {
 struct libxl_dominfo {
     xen_uuid_t uuid;
     uint32_t domid;
+    uint8_t dying:1;
+    uint8_t paused:1;
+    uint8_t running:1;
 };
 
 struct libxl_ctx {

_______________________________________________
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®.