From: Julien Grall <jgr...@amazon.com> The parameter 'params' of xc_set_parameters() should never be modified. So mark it as const.
Signed-off-by: Julien Grall <jgr...@amazon.com> --- tools/libxc/include/xenctrl.h | 2 +- tools/libxc/xc_misc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h index d8874eb846..58fa931de1 100644 --- a/tools/libxc/include/xenctrl.h +++ b/tools/libxc/include/xenctrl.h @@ -1226,7 +1226,7 @@ int xc_readconsolering(xc_interface *xch, int clear, int incremental, uint32_t *pindex); int xc_send_debug_keys(xc_interface *xch, const char *keys); -int xc_set_parameters(xc_interface *xch, char *params); +int xc_set_parameters(xc_interface *xch, const char *params); typedef struct xen_sysctl_physinfo xc_physinfo_t; typedef struct xen_sysctl_cputopo xc_cputopo_t; diff --git a/tools/libxc/xc_misc.c b/tools/libxc/xc_misc.c index 957c03415c..fe477bf344 100644 --- a/tools/libxc/xc_misc.c +++ b/tools/libxc/xc_misc.c @@ -187,11 +187,11 @@ int xc_send_debug_keys(xc_interface *xch, const char *keys) return ret; } -int xc_set_parameters(xc_interface *xch, char *params) +int xc_set_parameters(xc_interface *xch, const char *params) { int ret, len = strlen(params); DECLARE_SYSCTL; - DECLARE_HYPERCALL_BOUNCE(params, len, XC_HYPERCALL_BUFFER_BOUNCE_IN); + DECLARE_HYPERCALL_BOUNCE_IN(params, len); if ( xc_hypercall_bounce_pre(xch, params) ) return -1; -- 2.17.1