A sprinkling of const in vlibmemory/api.h and friends
Change-Id: I953ebb37eeec7de0c4a6b00258c3c67a83cbc020
Signed-off-by: Neale Ranns <nranns@cisco.com>
diff --git a/src/svm/svm.c b/src/svm/svm.c
index e4ca98e..97add5a 100644
--- a/src/svm/svm.c
+++ b/src/svm/svm.c
@@ -796,7 +796,7 @@
}
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 @@
}
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 @@
* 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 0b87dbc..06797fa 100644
--- a/src/svm/svm.h
+++ b/src/svm/svm.h
@@ -69,8 +69,8 @@
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 @@
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 e02628a..e35be8a 100644
--- a/src/svm/svmdb.h
+++ b/src/svm/svmdb.h
@@ -83,7 +83,7 @@
typedef struct
{
- char *root_path;
+ const char *root_path;
uword size;
u32 uid;
u32 gid;