[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Don't use the client-side shortcut for get_uuid calls -- we need to keep
# HG changeset patch # User Ewan Mellor <ewan@xxxxxxxxxxxxx> # Date 1174672218 0 # Node ID 94943f2e1de990fb1f73a801b8e266a928a574c5 # Parent 238ed1c75194e7fa345549716443c3e449a28f2c Don't use the client-side shortcut for get_uuid calls -- we need to keep handles and UUIDs conceptually separate. Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx> --- tools/libxen/include/xen_user.h | 6 +++--- tools/libxen/src/xen_console.c | 15 ++++++++++++--- tools/libxen/src/xen_crashdump.c | 11 ++++++++++- tools/libxen/src/xen_host.c | 15 ++++++++++++--- tools/libxen/src/xen_host_cpu.c | 15 ++++++++++++--- tools/libxen/src/xen_host_metrics.c | 11 ++++++++++- tools/libxen/src/xen_network.c | 15 ++++++++++++--- tools/libxen/src/xen_pbd.c | 15 ++++++++++++--- tools/libxen/src/xen_pif.c | 15 ++++++++++++--- tools/libxen/src/xen_pif_metrics.c | 11 ++++++++++- tools/libxen/src/xen_sr.c | 15 ++++++++++++--- tools/libxen/src/xen_user.c | 17 +++++++++++++---- tools/libxen/src/xen_vbd.c | 15 ++++++++++++--- tools/libxen/src/xen_vbd_metrics.c | 11 ++++++++++- tools/libxen/src/xen_vdi.c | 15 ++++++++++++--- tools/libxen/src/xen_vif.c | 15 ++++++++++++--- tools/libxen/src/xen_vif_metrics.c | 11 ++++++++++- tools/libxen/src/xen_vm.c | 15 ++++++++++++--- tools/libxen/src/xen_vm_guest_metrics.c | 15 ++++++++++++--- tools/libxen/src/xen_vm_metrics.c | 15 ++++++++++++--- tools/libxen/src/xen_vtpm.c | 11 ++++++++++- 21 files changed, 232 insertions(+), 52 deletions(-) diff -r 238ed1c75194 -r 94943f2e1de9 tools/libxen/include/xen_user.h --- a/tools/libxen/include/xen_user.h Fri Mar 23 17:42:08 2007 +0000 +++ b/tools/libxen/include/xen_user.h Fri Mar 23 17:50:18 2007 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, XenSource Inc. + * Copyright (c) 2006-2007, XenSource Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -24,8 +24,8 @@ /* - * The user class. - * + * The user class. + * * A user of the system. */ diff -r 238ed1c75194 -r 94943f2e1de9 tools/libxen/src/xen_console.c --- a/tools/libxen/src/xen_console.c Fri Mar 23 17:42:08 2007 +0000 +++ b/tools/libxen/src/xen_console.c Fri Mar 23 17:50:18 2007 +0000 @@ -284,6 +284,15 @@ bool bool xen_console_get_uuid(xen_session *session, char **result, xen_console console) { - *result = session->ok ? xen_strdup_((char *)console) : NULL; - return session->ok; -} + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = console } + }; + + abstract_type result_type = abstract_type_string; + + *result = NULL; + XEN_CALL_("console.get_uuid"); + return session->ok; +} diff -r 238ed1c75194 -r 94943f2e1de9 tools/libxen/src/xen_crashdump.c --- a/tools/libxen/src/xen_crashdump.c Fri Mar 23 17:42:08 2007 +0000 +++ b/tools/libxen/src/xen_crashdump.c Fri Mar 23 17:50:18 2007 +0000 @@ -177,6 +177,15 @@ bool bool xen_crashdump_get_uuid(xen_session *session, char **result, xen_crashdump crashdump) { - *result = session->ok ? xen_strdup_((char *)crashdump) : NULL; + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = crashdump } + }; + + abstract_type result_type = abstract_type_string; + + *result = NULL; + XEN_CALL_("crashdump.get_uuid"); return session->ok; } diff -r 238ed1c75194 -r 94943f2e1de9 tools/libxen/src/xen_host.c --- a/tools/libxen/src/xen_host.c Fri Mar 23 17:42:08 2007 +0000 +++ b/tools/libxen/src/xen_host.c Fri Mar 23 17:50:18 2007 +0000 @@ -754,6 +754,15 @@ bool bool xen_host_get_uuid(xen_session *session, char **result, xen_host host) { - *result = session->ok ? xen_strdup_((char *)host) : NULL; - return session->ok; -} + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = host } + }; + + abstract_type result_type = abstract_type_string; + + *result = NULL; + XEN_CALL_("host.get_uuid"); + return session->ok; +} diff -r 238ed1c75194 -r 94943f2e1de9 tools/libxen/src/xen_host_cpu.c --- a/tools/libxen/src/xen_host_cpu.c Fri Mar 23 17:42:08 2007 +0000 +++ b/tools/libxen/src/xen_host_cpu.c Fri Mar 23 17:50:18 2007 +0000 @@ -282,6 +282,15 @@ bool bool xen_host_cpu_get_uuid(xen_session *session, char **result, xen_host_cpu host_cpu) { - *result = session->ok ? xen_strdup_((char *)host_cpu) : NULL; - return session->ok; -} + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = host_cpu } + }; + + abstract_type result_type = abstract_type_string; + + *result = NULL; + XEN_CALL_("host_cpu.get_uuid"); + return session->ok; +} diff -r 238ed1c75194 -r 94943f2e1de9 tools/libxen/src/xen_host_metrics.c --- a/tools/libxen/src/xen_host_metrics.c Fri Mar 23 17:42:08 2007 +0000 +++ b/tools/libxen/src/xen_host_metrics.c Fri Mar 23 17:50:18 2007 +0000 @@ -176,6 +176,15 @@ bool bool xen_host_metrics_get_uuid(xen_session *session, char **result, xen_host_metrics host_metrics) { - *result = session->ok ? xen_strdup_((char *)host_metrics) : NULL; + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = host_metrics } + }; + + abstract_type result_type = abstract_type_string; + + *result = NULL; + XEN_CALL_("host_metrics.get_uuid"); return session->ok; } diff -r 238ed1c75194 -r 94943f2e1de9 tools/libxen/src/xen_network.c --- a/tools/libxen/src/xen_network.c Fri Mar 23 17:42:08 2007 +0000 +++ b/tools/libxen/src/xen_network.c Fri Mar 23 17:50:18 2007 +0000 @@ -285,6 +285,15 @@ bool bool xen_network_get_uuid(xen_session *session, char **result, xen_network network) { - *result = session->ok ? xen_strdup_((char *)network) : NULL; - return session->ok; -} + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = network } + }; + + abstract_type result_type = abstract_type_string; + + *result = NULL; + XEN_CALL_("network.get_uuid"); + return session->ok; +} diff -r 238ed1c75194 -r 94943f2e1de9 tools/libxen/src/xen_pbd.c --- a/tools/libxen/src/xen_pbd.c Fri Mar 23 17:42:08 2007 +0000 +++ b/tools/libxen/src/xen_pbd.c Fri Mar 23 17:50:18 2007 +0000 @@ -235,6 +235,15 @@ bool bool xen_pbd_get_uuid(xen_session *session, char **result, xen_pbd pbd) { - *result = session->ok ? xen_strdup_((char *)pbd) : NULL; - return session->ok; -} + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = pbd } + }; + + abstract_type result_type = abstract_type_string; + + *result = NULL; + XEN_CALL_("PBD.get_uuid"); + return session->ok; +} diff -r 238ed1c75194 -r 94943f2e1de9 tools/libxen/src/xen_pif.c --- a/tools/libxen/src/xen_pif.c Fri Mar 23 17:42:08 2007 +0000 +++ b/tools/libxen/src/xen_pif.c Fri Mar 23 17:50:18 2007 +0000 @@ -366,6 +366,15 @@ bool bool xen_pif_get_uuid(xen_session *session, char **result, xen_pif pif) { - *result = session->ok ? xen_strdup_((char *)pif) : NULL; - return session->ok; -} + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = pif } + }; + + abstract_type result_type = abstract_type_string; + + *result = NULL; + XEN_CALL_("PIF.get_uuid"); + return session->ok; +} diff -r 238ed1c75194 -r 94943f2e1de9 tools/libxen/src/xen_pif_metrics.c --- a/tools/libxen/src/xen_pif_metrics.c Fri Mar 23 17:42:08 2007 +0000 +++ b/tools/libxen/src/xen_pif_metrics.c Fri Mar 23 17:50:18 2007 +0000 @@ -176,6 +176,15 @@ bool bool xen_pif_metrics_get_uuid(xen_session *session, char **result, xen_pif_metrics pif_metrics) { - *result = session->ok ? xen_strdup_((char *)pif_metrics) : NULL; + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = pif_metrics } + }; + + abstract_type result_type = abstract_type_string; + + *result = NULL; + XEN_CALL_("PIF_metrics.get_uuid"); return session->ok; } diff -r 238ed1c75194 -r 94943f2e1de9 tools/libxen/src/xen_sr.c --- a/tools/libxen/src/xen_sr.c Fri Mar 23 17:42:08 2007 +0000 +++ b/tools/libxen/src/xen_sr.c Fri Mar 23 17:50:18 2007 +0000 @@ -388,6 +388,15 @@ bool bool xen_sr_get_uuid(xen_session *session, char **result, xen_sr sr) { - *result = session->ok ? xen_strdup_((char *)sr) : NULL; - return session->ok; -} + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = sr } + }; + + abstract_type result_type = abstract_type_string; + + *result = NULL; + XEN_CALL_("SR.get_uuid"); + return session->ok; +} diff -r 238ed1c75194 -r 94943f2e1de9 tools/libxen/src/xen_user.c --- a/tools/libxen/src/xen_user.c Fri Mar 23 17:42:08 2007 +0000 +++ b/tools/libxen/src/xen_user.c Fri Mar 23 17:50:18 2007 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2006, XenSource Inc. + * Copyright (c) 2006-2007, XenSource Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -196,6 +196,15 @@ bool bool xen_user_get_uuid(xen_session *session, char **result, xen_user user) { - *result = session->ok ? xen_strdup_((char *)user) : NULL; - return session->ok; -} + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = user } + }; + + abstract_type result_type = abstract_type_string; + + *result = NULL; + XEN_CALL_("user.get_uuid"); + return session->ok; +} diff -r 238ed1c75194 -r 94943f2e1de9 tools/libxen/src/xen_vbd.c --- a/tools/libxen/src/xen_vbd.c Fri Mar 23 17:42:08 2007 +0000 +++ b/tools/libxen/src/xen_vbd.c Fri Mar 23 17:50:18 2007 +0000 @@ -591,6 +591,15 @@ bool bool xen_vbd_get_uuid(xen_session *session, char **result, xen_vbd vbd) { - *result = session->ok ? xen_strdup_((char *)vbd) : NULL; - return session->ok; -} + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = vbd } + }; + + abstract_type result_type = abstract_type_string; + + *result = NULL; + XEN_CALL_("VBD.get_uuid"); + return session->ok; +} diff -r 238ed1c75194 -r 94943f2e1de9 tools/libxen/src/xen_vbd_metrics.c --- a/tools/libxen/src/xen_vbd_metrics.c Fri Mar 23 17:42:08 2007 +0000 +++ b/tools/libxen/src/xen_vbd_metrics.c Fri Mar 23 17:50:18 2007 +0000 @@ -176,6 +176,15 @@ bool bool xen_vbd_metrics_get_uuid(xen_session *session, char **result, xen_vbd_metrics vbd_metrics) { - *result = session->ok ? xen_strdup_((char *)vbd_metrics) : NULL; + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = vbd_metrics } + }; + + abstract_type result_type = abstract_type_string; + + *result = NULL; + XEN_CALL_("VBD_metrics.get_uuid"); return session->ok; } diff -r 238ed1c75194 -r 94943f2e1de9 tools/libxen/src/xen_vdi.c --- a/tools/libxen/src/xen_vdi.c Fri Mar 23 17:42:08 2007 +0000 +++ b/tools/libxen/src/xen_vdi.c Fri Mar 23 17:50:18 2007 +0000 @@ -555,6 +555,15 @@ bool bool xen_vdi_get_uuid(xen_session *session, char **result, xen_vdi vdi) { - *result = session->ok ? xen_strdup_((char *)vdi) : NULL; - return session->ok; -} + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = vdi } + }; + + abstract_type result_type = abstract_type_string; + + *result = NULL; + XEN_CALL_("VDI.get_uuid"); + return session->ok; +} diff -r 238ed1c75194 -r 94943f2e1de9 tools/libxen/src/xen_vif.c --- a/tools/libxen/src/xen_vif.c Fri Mar 23 17:42:08 2007 +0000 +++ b/tools/libxen/src/xen_vif.c Fri Mar 23 17:50:18 2007 +0000 @@ -542,6 +542,15 @@ bool bool xen_vif_get_uuid(xen_session *session, char **result, xen_vif vif) { - *result = session->ok ? xen_strdup_((char *)vif) : NULL; - return session->ok; -} + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = vif } + }; + + abstract_type result_type = abstract_type_string; + + *result = NULL; + XEN_CALL_("VIF.get_uuid"); + return session->ok; +} diff -r 238ed1c75194 -r 94943f2e1de9 tools/libxen/src/xen_vif_metrics.c --- a/tools/libxen/src/xen_vif_metrics.c Fri Mar 23 17:42:08 2007 +0000 +++ b/tools/libxen/src/xen_vif_metrics.c Fri Mar 23 17:50:18 2007 +0000 @@ -176,6 +176,15 @@ bool bool xen_vif_metrics_get_uuid(xen_session *session, char **result, xen_vif_metrics vif_metrics) { - *result = session->ok ? xen_strdup_((char *)vif_metrics) : NULL; + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = vif_metrics } + }; + + abstract_type result_type = abstract_type_string; + + *result = NULL; + XEN_CALL_("VIF_metrics.get_uuid"); return session->ok; } diff -r 238ed1c75194 -r 94943f2e1de9 tools/libxen/src/xen_vm.c --- a/tools/libxen/src/xen_vm.c Fri Mar 23 17:42:08 2007 +0000 +++ b/tools/libxen/src/xen_vm.c Fri Mar 23 17:50:18 2007 +0000 @@ -1608,6 +1608,15 @@ bool bool xen_vm_get_uuid(xen_session *session, char **result, xen_vm vm) { - *result = session->ok ? xen_strdup_((char *)vm) : NULL; - return session->ok; -} + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = vm } + }; + + abstract_type result_type = abstract_type_string; + + *result = NULL; + XEN_CALL_("VM.get_uuid"); + return session->ok; +} diff -r 238ed1c75194 -r 94943f2e1de9 tools/libxen/src/xen_vm_guest_metrics.c --- a/tools/libxen/src/xen_vm_guest_metrics.c Fri Mar 23 17:42:08 2007 +0000 +++ b/tools/libxen/src/xen_vm_guest_metrics.c Fri Mar 23 17:50:18 2007 +0000 @@ -265,6 +265,15 @@ bool bool xen_vm_guest_metrics_get_uuid(xen_session *session, char **result, xen_vm_guest_metrics vm_guest_metrics) { - *result = session->ok ? xen_strdup_((char *)vm_guest_metrics) : NULL; - return session->ok; -} + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = vm_guest_metrics } + }; + + abstract_type result_type = abstract_type_string; + + *result = NULL; + XEN_CALL_("VM_guest_metrics.get_uuid"); + return session->ok; +} diff -r 238ed1c75194 -r 94943f2e1de9 tools/libxen/src/xen_vm_metrics.c --- a/tools/libxen/src/xen_vm_metrics.c Fri Mar 23 17:42:08 2007 +0000 +++ b/tools/libxen/src/xen_vm_metrics.c Fri Mar 23 17:50:18 2007 +0000 @@ -198,6 +198,15 @@ bool bool xen_vm_metrics_get_uuid(xen_session *session, char **result, xen_vm_metrics vm_metrics) { - *result = session->ok ? xen_strdup_((char *)vm_metrics) : NULL; - return session->ok; -} + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = vm_metrics } + }; + + abstract_type result_type = abstract_type_string; + + *result = NULL; + XEN_CALL_("VM_metrics.get_uuid"); + return session->ok; +} diff -r 238ed1c75194 -r 94943f2e1de9 tools/libxen/src/xen_vtpm.c --- a/tools/libxen/src/xen_vtpm.c Fri Mar 23 17:42:08 2007 +0000 +++ b/tools/libxen/src/xen_vtpm.c Fri Mar 23 17:50:18 2007 +0000 @@ -182,6 +182,15 @@ bool bool xen_vtpm_get_uuid(xen_session *session, char **result, xen_vtpm vtpm) { - *result = session->ok ? xen_strdup_((char *)vtpm) : NULL; + abstract_value param_values[] = + { + { .type = &abstract_type_string, + .u.string_val = vtpm } + }; + + abstract_type result_type = abstract_type_string; + + *result = NULL; + XEN_CALL_("VTPM.get_uuid"); return session->ok; } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |