aboutsummaryrefslogtreecommitdiffstats
path: root/tools/libxen/src
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2007-12-12 09:57:55 +0000
committerKeir Fraser <keir.fraser@citrix.com>2007-12-12 09:57:55 +0000
commit7d6b2ecfac3e7188815bf4d3feb51631c0b3a019 (patch)
tree1ca851a0f919ee68f245db3d4517574698a3a415 /tools/libxen/src
parentaaa7e11a7cac991f6249d7659ba22e23cfbf1e3e (diff)
downloadxen-7d6b2ecfac3e7188815bf4d3feb51631c0b3a019.tar.gz
xen-7d6b2ecfac3e7188815bf4d3feb51631c0b3a019.tar.bz2
xen-7d6b2ecfac3e7188815bf4d3feb51631c0b3a019.zip
xend, acm: Extend Xen-API with function to reset the policy
This patch extends the Xen-API and the legacy XML-RPC interface with a function to reset the policy on the system (through an update with the default policy). I adapted the code in 'xm resetpolicy' to use this now. This patch also extends libxen and the documentation to reflect the new function. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Diffstat (limited to 'tools/libxen/src')
-rw-r--r--tools/libxen/src/xen_xspolicy.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/libxen/src/xen_xspolicy.c b/tools/libxen/src/xen_xspolicy.c
index ccafe1f4e8..e5f290c1a1 100644
--- a/tools/libxen/src/xen_xspolicy.c
+++ b/tools/libxen/src/xen_xspolicy.c
@@ -225,6 +225,24 @@ xen_xspolicy_set_xspolicy(xen_session *session, xen_xs_policystate **result,
bool
+xen_xspolicy_reset_xspolicy(xen_session *session, xen_xs_policystate **result,
+ xs_type type)
+{
+ abstract_value param_values[] =
+ {
+ { .type = &abstract_type_int,
+ .u.int_val = type },
+ };
+
+ abstract_type result_type = xen_xs_policystate_abstract_type_;
+
+ *result = NULL;
+ XEN_CALL_("XSPolicy.reset_xspolicy");
+ return session->ok;
+}
+
+
+bool
xen_xspolicy_get_xspolicy(xen_session *session, xen_xs_policystate **result)
{
abstract_value param_values[] =