summaryrefslogtreecommitdiffstats
path: root/lib/buffer.c
diff options
context:
space:
mode:
authorChris Hall <GMCH@hestia.halldom.com>2010-04-08 19:51:10 +0100
committerChris Hall <GMCH@hestia.halldom.com>2010-04-08 19:51:10 +0100
commit83447a051fbcc88b33fcea6670520687668d3ba1 (patch)
treef3be10368d9fc6c605c1ec351bc7c1f2c0c61ff0 /lib/buffer.c
parent17b711e6e4a4d5ce3728a07890434d890ebb76b4 (diff)
downloadquagga-83447a051fbcc88b33fcea6670520687668d3ba1.tar.bz2
quagga-83447a051fbcc88b33fcea6670520687668d3ba1.tar.xz
New functions for error numbers and addresses in messages.
Implemented less onerous ways of including descriptions of errors and IP addresses in logging and other messages. Implemented mapping of error numbers to error names, which is generally more meaningful.
Diffstat (limited to 'lib/buffer.c')
-rw-r--r--lib/buffer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/buffer.c b/lib/buffer.c
index b81924ec..816b0d1d 100644
--- a/lib/buffer.c
+++ b/lib/buffer.c
@@ -350,7 +350,7 @@ buffer_flush_window (struct buffer *b, int fd, int width, int height,
if ((nbytes = writev(fd, c_iov, iov_size)) < 0)
{
zlog_warn("%s: writev to fd %d failed: %s",
- __func__, fd, safe_strerror(errno));
+ __func__, fd, errtoa(errno, 0).str) ;
break;
}
@@ -362,7 +362,7 @@ buffer_flush_window (struct buffer *b, int fd, int width, int height,
#else /* IOV_MAX */
if ((nbytes = writev (fd, iov, iov_index)) < 0)
zlog_warn("%s: writev to fd %d failed: %s",
- __func__, fd, safe_strerror(errno));
+ __func__, fd, errtoa(errno, 0).str);
#endif /* IOV_MAX */
/* Free printed buffer data. */
@@ -424,7 +424,7 @@ in one shot. */
/* Calling code should try again later. */
return BUFFER_PENDING;
zlog_warn("%s: write error on fd %d: %s",
- __func__, fd, safe_strerror(errno));
+ __func__, fd, errtoa(errno, 0).str);
return BUFFER_ERROR;
}
@@ -479,7 +479,7 @@ buffer_write(struct buffer *b, int fd, const void *p, size_t size)
else
{
zlog_warn("%s: write error on fd %d: %s",
- __func__, fd, safe_strerror(errno));
+ __func__, fd, errtoa(errno, 0).str);
return BUFFER_ERROR;
}
}