From: Julien Grall Date: Mon, 30 Mar 2020 19:21:53 +0000 (+0100) Subject: tools/libxc: misc: Mark const the parameter 'params' of xc_set_parameters() X-Git-Tag: archive/raspbian/4.14.0+80-gd101b417b7-1+rpi1^2~63^2~463 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=897b6f4b4324b7696602fe386b5ea93506415442;p=xen.git tools/libxc: misc: Mark const the parameter 'params' of xc_set_parameters() The parameter 'params' of xc_set_parameters() should never be modified. So mark it as const. Signed-off-by: Julien Grall Reviewed-by: Ian Jackson --- 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;