summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/fmgr.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2017-02-16 19:22:50 +0100
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2017-02-17 10:53:43 +0100
commit645cf66af11ac36b81648f2e1eb3b1f5aeb7b544 (patch)
treec5e4af02e99a098dd123509cc67bfeb6efb6d69c /src/ipcpd/normal/fmgr.c
parent8cb5218438feaf455a297915d037675e3c3eea21 (diff)
downloadouroboros-645cf66af11ac36b81648f2e1eb3b1f5aeb7b544.tar.gz
ouroboros-645cf66af11ac36b81648f2e1eb3b1f5aeb7b544.zip
ipcpd: Move RIB configuration to common header
Moves the definitions of paths in the RIB for the normal IPCP to a header ribconfig.h to avoid repetition.
Diffstat (limited to 'src/ipcpd/normal/fmgr.c')
-rw-r--r--src/ipcpd/normal/fmgr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ipcpd/normal/fmgr.c b/src/ipcpd/normal/fmgr.c
index 31c83ac5..c2b53abf 100644
--- a/src/ipcpd/normal/fmgr.c
+++ b/src/ipcpd/normal/fmgr.c
@@ -36,6 +36,7 @@
#include "ipcp.h"
#include "shm_pci.h"
#include "gam.h"
+#include "ribconfig.h"
#include <stdlib.h>
#include <stdbool.h>
@@ -285,13 +286,13 @@ int fmgr_init(void)
}
}
- if (rib_read("/" BOOT_NAME "/dt/gam/type", &pg, sizeof(pg))
+ if (rib_read(BOOT_PATH "/dt/gam/type", &pg, sizeof(pg))
!= sizeof(pg)) {
log_err("Failed to read policy for ribmgr gam.");
return -1;
}
- if (rib_read("/" BOOT_NAME "/dt/gam/cacep", &pc, sizeof(pc))
+ if (rib_read(BOOT_PATH "/dt/gam/cacep", &pc, sizeof(pc))
!= sizeof(pc)) {
log_err("Failed to read CACEP policy for ribmgr gam.");
return -1;
@@ -375,7 +376,7 @@ int fmgr_np1_alloc(int fd,
assert(strlen(dst_ap_name) + strlen("/" DIR_NAME) + 1
< RIB_MAX_PATH_LEN);
- strcpy(path, "/" DIR_NAME);
+ strcpy(path, DIR_PATH);
rib_path_append(path, dst_ap_name);