[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v3 09/10] tools: Introduce a non-truncating xc_xenver_cmdline()
Update libxl to match. No API/ABI change. Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Acked-by: Anthony PERARD <anthony.perard@xxxxxxxxxx> --- CC: Wei Liu <wl@xxxxxxx> CC: Anthony PERARD <anthony.perard@xxxxxxxxxx> CC: Juergen Gross <jgross@xxxxxxxx> --- tools/include/xenctrl.h | 1 + tools/libs/ctrl/xc_version.c | 5 +++++ tools/libs/light/libxl.c | 4 +--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/include/xenctrl.h b/tools/include/xenctrl.h index 0400d65acaed..1b6f2ac508e0 100644 --- a/tools/include/xenctrl.h +++ b/tools/include/xenctrl.h @@ -1600,6 +1600,7 @@ int xc_version(xc_interface *xch, int cmd, void *arg); char *xc_xenver_extraversion(xc_interface *xch); char *xc_xenver_capabilities(xc_interface *xch); char *xc_xenver_changeset(xc_interface *xch); +char *xc_xenver_commandline(xc_interface *xch); int xc_flask_op(xc_interface *xch, xen_flask_op_t *op); diff --git a/tools/libs/ctrl/xc_version.c b/tools/libs/ctrl/xc_version.c index 9f2cae03dba8..02f6e9551b57 100644 --- a/tools/libs/ctrl/xc_version.c +++ b/tools/libs/ctrl/xc_version.c @@ -166,3 +166,8 @@ char *xc_xenver_changeset(xc_interface *xch) { return varbuf_simple_string(xch, XENVER_changeset2); } + +char *xc_xenver_commandline(xc_interface *xch) +{ + return varbuf_simple_string(xch, XENVER_commandline2); +} diff --git a/tools/libs/light/libxl.c b/tools/libs/light/libxl.c index 9a3532ce139a..04f037f3c199 100644 --- a/tools/libs/light/libxl.c +++ b/tools/libs/light/libxl.c @@ -584,7 +584,6 @@ const libxl_version_info* libxl_get_version_info(libxl_ctx *ctx) union { xen_compile_info_t xen_cc; xen_platform_parameters_t p_parms; - xen_commandline_t xen_commandline; xen_build_id_t build_id; } u; long xen_version; @@ -614,8 +613,7 @@ const libxl_version_info* libxl_get_version_info(libxl_ctx *ctx) info->pagesize = xc_version(ctx->xch, XENVER_pagesize, NULL); - xc_version(ctx->xch, XENVER_commandline, &u.xen_commandline); - info->commandline = libxl__strdup(NOGC, u.xen_commandline); + info->commandline = xc_xenver_commandline(ctx->xch); u.build_id.len = sizeof(u) - sizeof(u.build_id); r = libxl__xc_version_wrap(gc, info, &u.build_id); -- 2.30.2
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |