aboutsummaryrefslogtreecommitdiffstats
path: root/vpp-api-test/vat
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2016-07-18 14:23:36 -0400
committerDave Barach <dave@barachs.net>2016-07-18 14:29:04 -0400
commit98cfc1aab07d311b53b0171fad62a4031c96fcfd (patch)
tree7779590482e032169590f2a5d1c4f4fcab66678f /vpp-api-test/vat
parent2221cd8dd18e66bcdb9bb9a4114ba0c3dddcd00c (diff)
Add uid/gid config parameters to shared-vm database map operator
So vpp_get_metrics and similar will not need to run as root Change-Id: I635e830834c82990ad84ddaae06f2e50e55fd616 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'vpp-api-test/vat')
-rw-r--r--vpp-api-test/vat/restart.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/vpp-api-test/vat/restart.c b/vpp-api-test/vat/restart.c
index d94ddf89..2bbaa516 100644
--- a/vpp-api-test/vat/restart.c
+++ b/vpp-api-test/vat/restart.c
@@ -40,6 +40,7 @@ int restart_main_fn (unformat_input_t * i)
struct stat statb;
ino_t old_inode;
int sleeps;
+ svmdb_map_args_t _ma, *ma= &_ma;
struct timespec _req, *req = &_req;
struct timespec _rem, *rem = &_rem;
@@ -63,7 +64,10 @@ int restart_main_fn (unformat_input_t * i)
/*
* Step 1: look up the current VPP pid in the shared-memory database
*/
- svmdb_client = svmdb_map_chroot ((char *) chroot_path);
+ memset (ma, 0, sizeof (*ma));
+ ma->root_path = (char *)chroot_path;
+
+ svmdb_client = svmdb_map (ma);
pidp = svmdb_local_get_variable_reference (svmdb_client,
SVMDB_NAMESPACE_VEC,
@@ -173,7 +177,7 @@ int restart_main_fn (unformat_input_t * i)
/*
* Step 6: remap the SVM database
*/
- svmdb_client = svmdb_map_chroot ((char *) chroot_path);
+ svmdb_client = svmdb_map (ma);
pidp = svmdb_local_get_variable_reference (svmdb_client,
SVMDB_NAMESPACE_VEC,