aboutsummaryrefslogtreecommitdiffstats
path: root/src/svm/svm.c
diff options
context:
space:
mode:
authorMatej Perina <mperina@cisco.com>2017-07-18 13:59:41 +0200
committerFlorin Coras <florin.coras@gmail.com>2017-08-25 16:26:17 +0000
commitd135c19a1fde609b82be5a30413d6b9ab43811e3 (patch)
tree9d91f9cd63579bbb72611cc288912ea8ae0319f5 /src/svm/svm.c
parentacdc306093aaea2633cf765307d6cb7c1b80081c (diff)
jvpp: introducing callback api and future api tests for all plugins (VPP-591)
test can be run with: make test TEST=test_jvpp memory_shared.c: declaring and assigning variable in if statement makes it usage outside statement impossible. Looks like memory space assigned to variable declared in statement is freed when statement ends svm.c: - fixed case when root path can have a "/" at beggining - added option for test to operate over shared memory space with /vpe-api name and not create new one with name consisting of root path and region name which would require root permisions Change-Id: Iff1170dc6a5c1be134c152f2757c7ab9b919a8ed Signed-off-by: Matej Perina <mperina@cisco.com>
Diffstat (limited to 'src/svm/svm.c')
-rw-r--r--src/svm/svm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/svm/svm.c b/src/svm/svm.c
index 663324e0..14c5bd9b 100644
--- a/src/svm/svm.c
+++ b/src/svm/svm.c
@@ -426,7 +426,7 @@ shm_name_from_svm_map_region_args (svm_map_region_args_t * a)
if (a->name[0] == '/')
name_offset = 1;
- shm_name = format (0, "/%s-%s%c", a->root_path,
+ shm_name = format (0, "/%s-%s%c", &a->root_path[root_path_offset],
&a->name[name_offset], 0);
}
else