aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxen
diff options
context:
space:
mode:
authorEwan Mellor <ewan@xensource.com>2007-02-25 22:31:43 +0000
committerEwan Mellor <ewan@xensource.com>2007-02-25 22:31:43 +0000
commit94217354536e8136e0c048809d199af2ff999d06 (patch)
treed584ef7c7cd4c609b65c78ab705ff789cf29fd87 /tools/libxen
parent6bae08b49815fb00e5ded98494650ed1b7006345 (diff)
downloadxen-94217354536e8136e0c048809d199af2ff999d06.tar.gz
xen-94217354536e8136e0c048809d199af2ff999d06.tar.bz2
xen-94217354536e8136e0c048809d199af2ff999d06.zip
Added a VM.domid field.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
Diffstat (limited to 'tools/libxen')
-rw-r--r--tools/libxen/include/xen_vm.h8
-rw-r--r--tools/libxen/src/xen_vm.c19
2 files changed, 27 insertions, 0 deletions
diff --git a/tools/libxen/include/xen_vm.h b/tools/libxen/include/xen_vm.h
index 15abbb11c7..228a3dcb07 100644
--- a/tools/libxen/include/xen_vm.h
+++ b/tools/libxen/include/xen_vm.h
@@ -146,6 +146,7 @@ typedef struct xen_vm_record
char *pci_bus;
xen_string_string_map *tools_version;
xen_string_string_map *other_config;
+ int64_t domid;
bool is_control_domain;
struct xen_vm_metrics_record_opt *metrics;
} xen_vm_record;
@@ -547,6 +548,13 @@ xen_vm_get_other_config(xen_session *session, xen_string_string_map **result, xe
/**
+ * Get the domid field of the given VM.
+ */
+extern bool
+xen_vm_get_domid(xen_session *session, int64_t *result, xen_vm vm);
+
+
+/**
* Get the is_control_domain field of the given VM.
*/
extern bool
diff --git a/tools/libxen/src/xen_vm.c b/tools/libxen/src/xen_vm.c
index c712b71561..1d93e6a840 100644
--- a/tools/libxen/src/xen_vm.c
+++ b/tools/libxen/src/xen_vm.c
@@ -168,6 +168,9 @@ static const struct_member xen_vm_record_struct_members[] =
{ .key = "other_config",
.type = &abstract_type_string_string_map,
.offset = offsetof(xen_vm_record, other_config) },
+ { .key = "domid",
+ .type = &abstract_type_int,
+ .offset = offsetof(xen_vm_record, domid) },
{ .key = "is_control_domain",
.type = &abstract_type_bool,
.offset = offsetof(xen_vm_record, is_control_domain) },
@@ -953,6 +956,22 @@ xen_vm_get_other_config(xen_session *session, xen_string_string_map **result, xe
bool
+xen_vm_get_domid(xen_session *session, int64_t *result, xen_vm vm)
+{
+ abstract_value param_values[] =
+ {
+ { .type = &abstract_type_string,
+ .u.string_val = vm }
+ };
+
+ abstract_type result_type = abstract_type_int;
+
+ XEN_CALL_("VM.get_domid");
+ return session->ok;
+}
+
+
+bool
xen_vm_get_is_control_domain(xen_session *session, bool *result, xen_vm vm)
{
abstract_value param_values[] =