summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/pol/flat.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2017-02-08 17:09:55 +0100
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2017-02-08 18:04:13 +0100
commit742d01a4f9a32f17561104ee7da8971c1bcdd703 (patch)
tree26a9c0b622b5bf875b783692837d1069799f8fcc /src/ipcpd/normal/pol/flat.c
parent9117f7f6fec70f2da24e8e77256747d11d67bf8d (diff)
downloadouroboros-742d01a4f9a32f17561104ee7da8971c1bcdd703.tar.gz
ouroboros-742d01a4f9a32f17561104ee7da8971c1bcdd703.zip
lib: Log to the logging system
This removes the logfile and outputs log messages to the logging system. The creation of the logfiles (as well as the ap_init() call) were moved into ipcp_init() to simplify the IPCP creation and shutdown. Fixes #25 Fixes #27
Diffstat (limited to 'src/ipcpd/normal/pol/flat.c')
-rw-r--r--src/ipcpd/normal/pol/flat.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ipcpd/normal/pol/flat.c b/src/ipcpd/normal/pol/flat.c
index 31fcd4e8..9ffeb5c7 100644
--- a/src/ipcpd/normal/pol/flat.c
+++ b/src/ipcpd/normal/pol/flat.c
@@ -102,29 +102,29 @@ uint64_t flat_address(void)
strcpy(path, "/" MEMBERS_NAME);
if (!rib_has(path)) {
- LOG_ERR("Could not read members from RIB.");
+ log_err("Could not read members from RIB.");
return INVALID_ADDRESS;
}
if (rib_read("/" BOOT_NAME "/dt/const/addr_size",
&addr_size, sizeof(addr_size)) != sizeof(addr_size)) {
- LOG_ERR("Failed to read address size.");
+ log_err("Failed to read address size.");
return INVALID_ADDRESS;
}
if (addr_size != 4) {
- LOG_ERR("Flat address policy mandates 4 byte addresses.");
+ log_err("Flat address policy mandates 4 byte addresses.");
return INVALID_ADDRESS;
}
n_members = rib_children(path, &members);
if (n_members > REC_DIF_SIZE)
- LOG_WARN("DIF exceeding recommended size for flat addresses.");
+ log_warn("DIF exceeding recommended size for flat addresses.");
rib_path_append(path, ipcpi.name);
if (!rib_has(path)) {
- LOG_ERR("This ipcp is not a member.");
+ log_err("This ipcp is not a member.");
freepp(char, members, n_members);
return INVALID_ADDRESS;
}
@@ -142,12 +142,12 @@ uint64_t flat_address(void)
freepp(char, members, n_members);
if (rib_add(path, name)) {
- LOG_ERR("Failed to add address to RIB.");
+ log_err("Failed to add address to RIB.");
return INVALID_ADDRESS;
}
if (rib_write(path, &addr, sizeof(addr))) {
- LOG_ERR("Failed to write address in RIB.");
+ log_err("Failed to write address in RIB.");
return INVALID_ADDRESS;
}