From 742d01a4f9a32f17561104ee7da8971c1bcdd703 Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Wed, 8 Feb 2017 17:09:55 +0100 Subject: 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 --- src/ipcpd/normal/pol/flat.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/ipcpd/normal/pol/flat.c') 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; } -- cgit v1.2.3