summaryrefslogtreecommitdiffstats
path: root/src/svm
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2017-04-26 13:59:20 -0700
committerDave Barach <openvpp@barachs.net>2017-05-03 12:35:05 +0000
commite72be39cd0f498178fd62dfc0a0b0daa2b633f62 (patch)
tree7b18cfecc33966c9fcb7a8daf3743d97a72332c6 /src/svm
parent9e355523f30e46efd2b1550ae029b544dfe866c4 (diff)
A sprinkling of const in vlibmemory/api.h and friends
Change-Id: I953ebb37eeec7de0c4a6b00258c3c67a83cbc020 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/svm')
-rw-r--r--src/svm/svm.c6
-rw-r--r--src/svm/svm.h10
-rw-r--r--src/svm/svmdb.h2
3 files changed, 9 insertions, 9 deletions
diff --git a/src/svm/svm.c b/src/svm/svm.c
index e4ca98e1ed2..97add5a786c 100644
--- a/src/svm/svm.c
+++ b/src/svm/svm.c
@@ -796,7 +796,7 @@ svm_region_init (void)
}
void
-svm_region_init_chroot (char *root_path)
+svm_region_init_chroot (const char *root_path)
{
svm_map_region_args_t _a, *a = &_a;
@@ -813,7 +813,7 @@ svm_region_init_chroot (char *root_path)
}
void
-svm_region_init_chroot_uid_gid (char *root_path, int uid, int gid)
+svm_region_init_chroot_uid_gid (const char *root_path, int uid, int gid)
{
svm_map_region_args_t _a, *a = &_a;
@@ -1151,7 +1151,7 @@ svm_client_scan_this_region_nolock (svm_region_t * rp)
* Scan svm regions for dead clients
*/
void
-svm_client_scan (char *root_path)
+svm_client_scan (const char *root_path)
{
int i, j;
svm_main_region_t *mp;
diff --git a/src/svm/svm.h b/src/svm/svm.h
index 0b87dbcbc64..06797fa1a79 100644
--- a/src/svm/svm.h
+++ b/src/svm/svm.h
@@ -69,8 +69,8 @@ typedef struct svm_region_
typedef struct svm_map_region_args_
{
- char *root_path; /* NULL means use the truly global arena */
- char *name;
+ const char *root_path; /* NULL means use the truly global arena */
+ const char *name;
u64 baseva;
u64 size;
u64 pvt_heap_size;
@@ -115,12 +115,12 @@ typedef struct
void *svm_region_find_or_create (svm_map_region_args_t * a);
void svm_region_init (void);
-void svm_region_init_chroot (char *root_path);
-void svm_region_init_chroot_uid_gid (char *root_path, int uid, int gid);
+void svm_region_init_chroot (const char *root_path);
+void svm_region_init_chroot_uid_gid (const char *root_path, int uid, int gid);
void svm_region_init_args (svm_map_region_args_t * a);
void svm_region_exit (void);
void svm_region_unmap (void *rp_arg);
-void svm_client_scan (char *root_path);
+void svm_client_scan (const char *root_path);
void svm_client_scan_this_region_nolock (svm_region_t * rp);
u8 *shm_name_from_svm_map_region_args (svm_map_region_args_t * a);
diff --git a/src/svm/svmdb.h b/src/svm/svmdb.h
index e02628a0bb9..e35be8aa538 100644
--- a/src/svm/svmdb.h
+++ b/src/svm/svmdb.h
@@ -83,7 +83,7 @@ typedef struct
typedef struct
{
- char *root_path;
+ const char *root_path;
uword size;
u32 uid;
u32 gid;