mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 06:53:03 +00:00
lib: Convert netns_linux.c to new error-code work
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
0bff8eea70
commit
8b895cd32f
@ -34,6 +34,12 @@ static struct log_ref ferr_lib_warn[] = {
|
|||||||
.description = "During sanity checking stream.c has detected an error in the data associated with a particular stream",
|
.description = "During sanity checking stream.c has detected an error in the data associated with a particular stream",
|
||||||
.suggestion = "Gather log data and open an Issue, restart FRR",
|
.suggestion = "Gather log data and open an Issue, restart FRR",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
.code = LIB_WARN_LINUX_NS,
|
||||||
|
.title = "The Linux namespace subsystem has encountered a parsing error",
|
||||||
|
.description = "During system startup an invalid parameter for the namesapce was give to FRR",
|
||||||
|
.suggestion = "Gather log data and open an Issue. restart FRR",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
.code = END_FERR,
|
.code = END_FERR,
|
||||||
},
|
},
|
||||||
|
@ -40,6 +40,7 @@ enum lib_log_refs {
|
|||||||
LIB_ERR_UNAVAILABLE,
|
LIB_ERR_UNAVAILABLE,
|
||||||
LIB_WARN_SNMP,
|
LIB_WARN_SNMP,
|
||||||
LIB_WARN_STREAM,
|
LIB_WARN_STREAM,
|
||||||
|
LIB_WARN_LINUX_NS,
|
||||||
};
|
};
|
||||||
|
|
||||||
extern void lib_error_init(void);
|
extern void lib_error_init(void);
|
||||||
|
@ -441,8 +441,8 @@ char *ns_netns_pathname(struct vty *vty, const char *name)
|
|||||||
pathname,
|
pathname,
|
||||||
safe_strerror(errno));
|
safe_strerror(errno));
|
||||||
else
|
else
|
||||||
zlog_warn("Invalid pathname for %s: %s",
|
flog_warn(LIB_WARN_LINUX_NS,
|
||||||
pathname,
|
"Invalid pathname for %s: %s", pathname,
|
||||||
safe_strerror(errno));
|
safe_strerror(errno));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -452,7 +452,8 @@ char *ns_netns_pathname(struct vty *vty, const char *name)
|
|||||||
vty_out(vty, "NS name (%s) invalid: too long (>%d)\n",
|
vty_out(vty, "NS name (%s) invalid: too long (>%d)\n",
|
||||||
check_base, NS_NAMSIZ - 1);
|
check_base, NS_NAMSIZ - 1);
|
||||||
else
|
else
|
||||||
zlog_warn("NS name (%s) invalid: too long (>%d)",
|
flog_warn(LIB_WARN_LINUX_NS,
|
||||||
|
"NS name (%s) invalid: too long (>%d)",
|
||||||
check_base, NS_NAMSIZ - 1);
|
check_base, NS_NAMSIZ - 1);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user