aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxen/test
diff options
context:
space:
mode:
authorEwan Mellor <ewan@xensource.com>2007-02-25 23:37:05 +0000
committerEwan Mellor <ewan@xensource.com>2007-02-25 23:37:05 +0000
commit496ee4e22a895b6b13452ef0b2f59d95851d37bd (patch)
tree8bff4495eee034ec82116c549744df9b45ca4b35 /tools/libxen/test
parentd8f5871da1f98195c4f8b86c1cd5188b729fdc5c (diff)
downloadxen-496ee4e22a895b6b13452ef0b2f59d95851d37bd.tar.gz
xen-496ee4e22a895b6b13452ef0b2f59d95851d37bd.tar.bz2
xen-496ee4e22a895b6b13452ef0b2f59d95851d37bd.zip
Added host.capabilities field.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
Diffstat (limited to 'tools/libxen/test')
-rw-r--r--tools/libxen/test/test_bindings.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/libxen/test/test_bindings.c b/tools/libxen/test/test_bindings.c
index c76768af15..6a51cd3a05 100644
--- a/tools/libxen/test/test_bindings.c
+++ b/tools/libxen/test/test_bindings.c
@@ -238,6 +238,22 @@ int main(int argc, char **argv)
return 1;
}
+ xen_string_set *capabilities;
+ if (!xen_host_get_capabilities(session, &capabilities, host))
+ {
+ print_error(session);
+ free(dmesg);
+ xen_string_set_free(supported_bootloaders);
+ xen_string_string_map_free(versions);
+ xen_host_free(host);
+ xen_vm_record_free(vm_record);
+ xen_uuid_bytes_free(vm_uuid_bytes);
+ xen_uuid_free(vm_uuid);
+ xen_vm_free(vm);
+ CLEANUP;
+ return 1;
+ }
+
printf("%s.\n", vm_uuid);
fprintf(stderr, "In bytes, the VM UUID is ");
@@ -264,6 +280,13 @@ int main(int argc, char **argv)
}
printf("\n");
+ printf("Host has the following capabilities:");
+ for (size_t i = 0; i < capabilities->size; i++)
+ {
+ printf(" %s", capabilities->contents[i]);
+ }
+ printf("\n");
+
printf("%s.\n", vm_record->uuid);
printf("Resident on %s.\n", (char *)vm_record->resident_on->u.handle);
@@ -279,6 +302,7 @@ int main(int argc, char **argv)
xen_string_string_map_free(versions);
free(dmesg);
xen_string_set_free(supported_bootloaders);
+ xen_string_set_free(capabilities);
print_vm_metrics(session, vm);
if (!session->ok)