|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen staging] tools/libxc: misc: Mark const the parameter 'params' of xc_set_parameters()
commit 897b6f4b4324b7696602fe386b5ea93506415442
Author: Julien Grall <jgrall@xxxxxxxxxx>
AuthorDate: Mon Mar 30 20:21:53 2020 +0100
Commit: Julien Grall <jgrall@xxxxxxxxxx>
CommitDate: Wed Apr 1 10:57:07 2020 +0100
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 <jgrall@xxxxxxxxxx>
Reviewed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
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;
--
generated by git-patchbot for /home/xen/git/xen.git#staging
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |