From 481bc15ffcebcc7d0395a3ffa8ce70249e221d5b Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Thu, 14 Jun 2018 09:13:18 -0400 Subject: 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 --- lib/netns_linux.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/netns_linux.c') 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; } -- cgit v1.2.3