summaryrefslogtreecommitdiff
path: root/lib/buffer.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2018-06-14 09:13:18 -0400
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-08-14 20:02:05 +0000
commit481bc15ffcebcc7d0395a3ffa8ce70249e221d5b (patch)
tree9c11638144a147251871840b9fb94429433cfe32 /lib/buffer.c
parent3ec8b5b8980bb0267f32dfc2508c457db55d5156 (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/buffer.c')
-rw-r--r--lib/buffer.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/buffer.c b/lib/buffer.c
index b573981c1b..207f2320ff 100644
--- a/lib/buffer.c
+++ b/lib/buffer.c
@@ -25,6 +25,8 @@
#include "buffer.h"
#include "log.h"
#include "network.h"
+#include "lib_errors.h"
+
#include <stddef.h>
DEFINE_MTYPE_STATIC(LIB, BUFFER, "Buffer")
@@ -341,11 +343,11 @@ buffer_status_t buffer_flush_window(struct buffer *b, int fd, int width,
iov_alloc * sizeof(*iov));
} else {
/* This should absolutely never occur. */
- zlog_err(
- "%s: corruption detected: iov_small overflowed; "
- "head %p, tail %p, head->next %p",
- __func__, (void *)b->head,
- (void *)b->tail, (void *)b->head->next);
+ zlog_ferr(LIB_ERR_SYSTEM_CALL,
+ "%s: corruption detected: iov_small overflowed; "
+ "head %p, tail %p, head->next %p",
+ __func__, (void *)b->head,
+ (void *)b->tail, (void *)b->head->next);
iov = XMALLOC(MTYPE_TMP,
iov_alloc * sizeof(*iov));
memcpy(iov, small_iov, sizeof(small_iov));