diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2018-06-14 09:13:18 -0400 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-08-14 20:02:05 +0000 |
| commit | 481bc15ffcebcc7d0395a3ffa8ce70249e221d5b (patch) | |
| tree | 9c11638144a147251871840b9fb94429433cfe32 /lib/netns_linux.c | |
| parent | 3ec8b5b8980bb0267f32dfc2508c457db55d5156 (diff) | |
lib: Add LIB_ERR_SYSTEM_CALL and convert VRF_SOCKET to SOCKET
Add a new error code LIB_ERR_SYSTEM_CALL to the ferr subsystem.
Additionally convert LIB_ERR_VRF_SOCKET to a more generic
LIB_ERR_SOCKET.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib/netns_linux.c')
| -rw-r--r-- | lib/netns_linux.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/netns_linux.c b/lib/netns_linux.c index a80b51fa00..801264d1a8 100644 --- a/lib/netns_linux.c +++ b/lib/netns_linux.c @@ -35,10 +35,10 @@ #include "ns.h" #include "log.h" #include "memory.h" - #include "command.h" #include "vty.h" #include "vrf.h" +#include "lib_errors.h" DEFINE_MTYPE_STATIC(LIB, NS, "NetNS Context") DEFINE_MTYPE_STATIC(LIB, NS_NAME, "NetNS Name") @@ -219,8 +219,9 @@ static int ns_enable_internal(struct ns *ns, void (*func)(ns_id_t, void *)) } if (!ns_is_enabled(ns)) { - zlog_err("Can not enable NS %u: %s!", ns->ns_id, - safe_strerror(errno)); + zlog_ferr(LIB_ERR_SYSTEM_CALL, + "Can not enable NS %u: %s!", ns->ns_id, + safe_strerror(errno)); return 0; } |
