[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] libxc: fix xc_version by handling all known command types.
# HG changeset patch # User Ian Campbell <ian.campbell@xxxxxxxxxx> # Date 1288178668 -3600 # Node ID 28a16074681582f1209c9077f870ccf44927133e # Parent cd193fa265b88bf4ff891f03c9be0e12415e6778 libxc: fix xc_version by handling all known command types. xend was crashing since 22289:ca4a781c8ae8 due to missing handling of XENVER_commandline. Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> --- tools/libxc/xc_private.c | 20 +++++++++++++++++++- 1 files changed, 19 insertions(+), 1 deletion(-) diff -r cd193fa265b8 -r 28a160746815 tools/libxc/xc_private.c --- a/tools/libxc/xc_private.c Tue Oct 26 12:22:52 2010 +0100 +++ b/tools/libxc/xc_private.c Wed Oct 27 12:24:28 2010 +0100 @@ -447,11 +447,14 @@ int xc_version(xc_interface *xch, int cm int xc_version(xc_interface *xch, int cmd, void *arg) { DECLARE_HYPERCALL_BOUNCE(arg, 0, XC_HYPERCALL_BUFFER_BOUNCE_OUT); /* Size unknown until cmd decoded */ - size_t sz = 0; + size_t sz; int rc; switch ( cmd ) { + case XENVER_version: + sz = 0; + break; case XENVER_extraversion: sz = sizeof(xen_extraversion_t); break; @@ -467,6 +470,21 @@ int xc_version(xc_interface *xch, int cm case XENVER_platform_parameters: sz = sizeof(xen_platform_parameters_t); break; + case XENVER_get_features: + sz = sizeof(xen_feature_info_t); + break; + case XENVER_pagesize: + sz = 0; + break; + case XENVER_guest_handle: + sz = sizeof(xen_domain_handle_t); + break; + case XENVER_commandline: + sz = sizeof(xen_commandline_t); + break; + default: + ERROR("xc_version: unknown command %d\n", cmd); + return -EINVAL; } HYPERCALL_BOUNCE_SET_SIZE(arg, sz); _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |