[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [xen master] tools: Introduce a non-truncating xc_xenver_cmdline()
commit 75f91607621c98b0ea73b2749cb9a563f6db1618 Author: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> AuthorDate: Tue Jan 17 12:47:44 2023 +0000 Commit: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> CommitDate: Fri Dec 20 22:44:42 2024 +0000 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> --- 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 8ca493c5ff..3aeff3f0e9 100644 --- a/tools/include/xenctrl.h +++ b/tools/include/xenctrl.h @@ -1580,6 +1580,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 9f2cae03db..02f6e9551b 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 9a3532ce13..04f037f3c1 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); -- generated by git-patchbot for /home/xen/git/xen.git#master
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |