From: Ewan Mellor Date: Tue, 30 Jan 2007 00:34:31 +0000 (+0000) Subject: Remove VM.actions_after_suspend, which never made any sense. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15368^2~41 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e9ee2b1071689278287dd8edef6e7706cfbce2be;p=xen.git Remove VM.actions_after_suspend, which never made any sense. Signed-off-by: Ewan Mellor --- diff --git a/docs/xen-api/xenapi-datamodel.tex b/docs/xen-api/xenapi-datamodel.tex index 47b6a7e919..5e34bb63e9 100644 --- a/docs/xen-api/xenapi-datamodel.tex +++ b/docs/xen-api/xenapi-datamodel.tex @@ -1034,7 +1034,6 @@ $\mathit{RW}$ & {\tt VCPUs/number} & int & Current number of VCPUs \\ $\mathit{RO}_\mathit{run}$ & {\tt VCPUs/utilisation} & (int $\rightarrow$ float) Map & Utilisation for all of guest's current VCPUs \\ $\mathit{RW}$ & {\tt actions/after\_shutdown} & on\_normal\_exit & action to take after the guest has shutdown itself \\ $\mathit{RW}$ & {\tt actions/after\_reboot} & on\_normal\_exit & action to take after the guest has rebooted itself \\ -$\mathit{RW}$ & {\tt actions/after\_suspend} & on\_normal\_exit & action to take after the guest has suspended itself \\ $\mathit{RW}$ & {\tt actions/after\_crash} & on\_crash\_behaviour & action to take if the guest crashes \\ $\mathit{RO}_\mathit{run}$ & {\tt consoles} & (console ref) Set & virtual console devices \\ $\mathit{RO}_\mathit{run}$ & {\tt VIFs} & (VIF ref) Set & virtual network interfaces \\ @@ -2455,72 +2454,6 @@ void -\vspace{0.3cm} -\vspace{0.3cm} -\vspace{0.3cm} -\subsubsection{RPC name:~get\_actions\_after\_suspend} - -{\bf Overview:} -Get the actions/after\_suspend field of the given VM. - - \noindent {\bf Signature:} -\begin{verbatim} (on_normal_exit) get_actions_after_suspend (session_id s, VM ref self)\end{verbatim} - - -\noindent{\bf Arguments:} - - -\vspace{0.3cm} -\begin{tabular}{|c|c|p{7cm}|} - \hline -{\bf type} & {\bf name} & {\bf description} \\ \hline -{\tt VM ref } & self & reference to the object \\ \hline - -\end{tabular} - -\vspace{0.3cm} - - \noindent {\bf Return Type:} -{\tt -on\_normal\_exit -} - - -value of the field -\vspace{0.3cm} -\vspace{0.3cm} -\vspace{0.3cm} -\subsubsection{RPC name:~set\_actions\_after\_suspend} - -{\bf Overview:} -Set the actions/after\_suspend field of the given VM. - - \noindent {\bf Signature:} -\begin{verbatim} void set_actions_after_suspend (session_id s, VM ref self, on_normal_exit value)\end{verbatim} - - -\noindent{\bf Arguments:} - - -\vspace{0.3cm} -\begin{tabular}{|c|c|p{7cm}|} - \hline -{\bf type} & {\bf name} & {\bf description} \\ \hline -{\tt VM ref } & self & reference to the object \\ \hline - -{\tt on\_normal\_exit } & value & New value to set \\ \hline - -\end{tabular} - -\vspace{0.3cm} - - \noindent {\bf Return Type:} -{\tt -void -} - - - \vspace{0.3cm} \vspace{0.3cm} \vspace{0.3cm} diff --git a/tools/libxen/include/xen_vm.h b/tools/libxen/include/xen_vm.h index 091cb34239..0ef8c4eb7e 100644 --- a/tools/libxen/include/xen_vm.h +++ b/tools/libxen/include/xen_vm.h @@ -120,7 +120,6 @@ typedef struct xen_vm_record xen_int_float_map *vcpus_utilisation; enum xen_on_normal_exit actions_after_shutdown; enum xen_on_normal_exit actions_after_reboot; - enum xen_on_normal_exit actions_after_suspend; enum xen_on_crash_behaviour actions_after_crash; struct xen_console_record_opt_set *consoles; struct xen_vif_record_opt_set *vifs; @@ -391,13 +390,6 @@ extern bool xen_vm_get_actions_after_reboot(xen_session *session, enum xen_on_normal_exit *result, xen_vm vm); -/** - * Get the actions/after_suspend field of the given VM. - */ -extern bool -xen_vm_get_actions_after_suspend(xen_session *session, enum xen_on_normal_exit *result, xen_vm vm); - - /** * Get the actions/after_crash field of the given VM. */ @@ -615,13 +607,6 @@ extern bool xen_vm_set_actions_after_reboot(xen_session *session, xen_vm vm, enum xen_on_normal_exit after_reboot); -/** - * Set the actions/after_suspend field of the given VM. - */ -extern bool -xen_vm_set_actions_after_suspend(xen_session *session, xen_vm vm, enum xen_on_normal_exit after_suspend); - - /** * Set the actions/after_crash field of the given VM. */ diff --git a/tools/libxen/src/xen_vm.c b/tools/libxen/src/xen_vm.c index 83e107e858..ef26a68366 100644 --- a/tools/libxen/src/xen_vm.c +++ b/tools/libxen/src/xen_vm.c @@ -103,9 +103,6 @@ static const struct_member xen_vm_record_struct_members[] = { .key = "actions_after_reboot", .type = &xen_on_normal_exit_abstract_type_, .offset = offsetof(xen_vm_record, actions_after_reboot) }, - { .key = "actions_after_suspend", - .type = &xen_on_normal_exit_abstract_type_, - .offset = offsetof(xen_vm_record, actions_after_suspend) }, { .key = "actions_after_crash", .type = &xen_on_crash_behaviour_abstract_type_, .offset = offsetof(xen_vm_record, actions_after_crash) }, @@ -587,21 +584,6 @@ xen_vm_get_actions_after_reboot(xen_session *session, enum xen_on_normal_exit *r } -bool -xen_vm_get_actions_after_suspend(xen_session *session, enum xen_on_normal_exit *result, xen_vm vm) -{ - abstract_value param_values[] = - { - { .type = &abstract_type_string, - .u.string_val = vm } - }; - - abstract_type result_type = xen_on_normal_exit_abstract_type_; - XEN_CALL_("VM.get_actions_after_suspend"); - return session->ok; -} - - bool xen_vm_get_actions_after_crash(xen_session *session, enum xen_on_crash_behaviour *result, xen_vm vm) { @@ -1111,22 +1093,6 @@ xen_vm_set_actions_after_reboot(xen_session *session, xen_vm vm, enum xen_on_nor } -bool -xen_vm_set_actions_after_suspend(xen_session *session, xen_vm vm, enum xen_on_normal_exit after_suspend) -{ - abstract_value param_values[] = - { - { .type = &abstract_type_string, - .u.string_val = vm }, - { .type = &xen_on_normal_exit_abstract_type_, - .u.string_val = xen_on_normal_exit_to_string(after_suspend) } - }; - - xen_call_(session, "VM.set_actions_after_suspend", param_values, 2, NULL, NULL); - return session->ok; -} - - bool xen_vm_set_actions_after_crash(xen_session *session, xen_vm vm, enum xen_on_crash_behaviour after_crash) { diff --git a/tools/libxen/test/test_bindings.c b/tools/libxen/test/test_bindings.c index f83bd9a399..cfd1fb69e7 100644 --- a/tools/libxen/test/test_bindings.c +++ b/tools/libxen/test/test_bindings.c @@ -277,13 +277,6 @@ int main(int argc, char **argv) */ static xen_vm create_new_vm(xen_session *session) { - xen_cpu_feature_set *empty_cpu_feature_set = - xen_cpu_feature_set_alloc(0); - - xen_cpu_feature_set *force_off_cpu_feature_set = - xen_cpu_feature_set_alloc(1); - force_off_cpu_feature_set->contents[0] = XEN_CPU_FEATURE_MMX; - xen_vm_record vm_record = { .name_label = "NewVM", @@ -297,13 +290,8 @@ static xen_vm create_new_vm(xen_session *session) .vcpus_policy = "credit", .vcpus_params = "", .vcpus_number = 2, - .vcpus_features_required = empty_cpu_feature_set, - .vcpus_features_can_use = empty_cpu_feature_set, - .vcpus_features_force_on = empty_cpu_feature_set, - .vcpus_features_force_off = force_off_cpu_feature_set, .actions_after_shutdown = XEN_ON_NORMAL_EXIT_DESTROY, .actions_after_reboot = XEN_ON_NORMAL_EXIT_RESTART, - .actions_after_suspend = XEN_ON_NORMAL_EXIT_DESTROY, .actions_after_crash = XEN_ON_CRASH_BEHAVIOUR_PRESERVE, .hvm_boot = "", .pv_bootloader = "pygrub", @@ -317,9 +305,6 @@ static xen_vm create_new_vm(xen_session *session) xen_vm vm; xen_vm_create(session, &vm, &vm_record); - xen_cpu_feature_set_free(empty_cpu_feature_set); - xen_cpu_feature_set_free(force_off_cpu_feature_set); - if (!session->ok) { fprintf(stderr, "VM creation failed.\n");