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/command.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/command.c') diff --git a/lib/command.c b/lib/command.c index 7eda239ee4..ca916c6043 100644 --- a/lib/command.c +++ b/lib/command.c @@ -45,6 +45,7 @@ #include "libfrr.h" #include "jhash.h" #include "hook.h" +#include "lib_errors.h" DEFINE_MTYPE(LIB, HOST, "Host config") DEFINE_MTYPE(LIB, COMPLETION, "Completion item") @@ -2416,7 +2417,8 @@ static int set_log_file(struct vty *vty, const char *fname, int loglevel) cwd[MAXPATHLEN] = '\0'; if (getcwd(cwd, MAXPATHLEN) == NULL) { - zlog_err("config_log_file: Unable to alloc mem!"); + zlog_ferr(LIB_ERR_SYSTEM_CALL, + "config_log_file: Unable to alloc mem!"); return CMD_WARNING_CONFIG_FAILED; } -- cgit v1.2.3