Module: xenomai-3
Branch: master
Commit: 20ece3049f5fe0999784e2cf4dd12233fcc47aa5
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=20ece3049f5fe0999784e2cf4dd12233fcc47aa5

Author: Jan Kiszka <jan.kis...@siemens.com>
Date:   Thu Nov 27 17:13:59 2014 +0100

lib/copperplate: Use single source for default registry path

This helps when deciding to change it.

Signed-off-by: Jan Kiszka <jan.kis...@siemens.com>

---

 lib/copperplate/init.c      |    4 ++--
 lib/copperplate/internal.h  |    3 +++
 lib/copperplate/regd/regd.c |    4 +---
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/lib/copperplate/init.c b/lib/copperplate/init.c
index adf2c48..9faae60 100644
--- a/lib/copperplate/init.c
+++ b/lib/copperplate/init.c
@@ -40,8 +40,8 @@
 
 struct coppernode __node_info = {
        .mem_pool = 1024 * 1024, /* Default, 1Mb. */
-       .session_label = "anon",
-       .registry_root = "/mnt/xenomai",
+       .session_label = DEFAULT_REGISTRY_SESSION,
+       .registry_root = DEFAULT_REGISTRY_ROOT,
        .no_mlock = 0,
        .no_registry = 0,
        .no_sanity = !CONFIG_XENO_SANITY,
diff --git a/lib/copperplate/internal.h b/lib/copperplate/internal.h
index 8c5e943..380b522 100644
--- a/lib/copperplate/internal.h
+++ b/lib/copperplate/internal.h
@@ -30,6 +30,9 @@
 #include <boilerplate/sched.h>
 #include <copperplate/heapobj.h>
 
+#define DEFAULT_REGISTRY_ROOT          "/mnt/xenomai"
+#define DEFAULT_REGISTRY_SESSION       "anon"
+
 struct coppernode {
        unsigned int mem_pool;
        const char *session_label;
diff --git a/lib/copperplate/regd/regd.c b/lib/copperplate/regd/regd.c
index d5249f2..43f763e 100644
--- a/lib/copperplate/regd/regd.c
+++ b/lib/copperplate/regd/regd.c
@@ -39,8 +39,6 @@
 #include "../internal.h"
 #include "sysregfs.h"
 
-#define DEFAULT_ROOT "/mnt/xenomai/anon"
-
 /* Allow use of oldish umount2(). */
 #ifndef MNT_DETACH
 #define MNT_DETACH 0
@@ -52,7 +50,7 @@
                        printf("regd: " fmt "\n", ##args);      \
        } while (0)
 
-static const char *rootdir = DEFAULT_ROOT;
+static const char *rootdir = DEFAULT_REGISTRY_ROOT"/"DEFAULT_REGISTRY_SESSION;
 
 static int sockfd;
 


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
http://www.xenomai.org/mailman/listinfo/xenomai-git

Reply via email to