From 6a52d0d155fc8b892e30cdb5e3fbe4c2779bd4cd Mon Sep 17 00:00:00 2001 From: ajs Date: Sun, 30 Jan 2005 18:49:28 +0000 Subject: 2005-01-30 Andrew J. Schorr * daemon.c: (daemon) Replace perror with zlog_err. * vty.c: (vty_serv_un) Replace perror with zlog_err. * ripd.c: (rip_create_socket) Replace perror with zlog_err. * ioctl.c: (if_ioctl,if_ioctl_ipv6,if_get_flags) Replace perror with zlog_err. * ioctl_solaris.c: (if_ioctl,if_ioctl_ipv6) Replace perror with zlog_err. --- lib/ChangeLog | 5 +++++ lib/daemon.c | 4 ++-- lib/vty.c | 6 +++--- 3 files changed, 10 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/ChangeLog b/lib/ChangeLog index 34dad166..dcf37767 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,8 @@ +2005-01-30 Andrew J. Schorr + + * daemon.c: (daemon) Replace perror with zlog_err. + * vty.c: (vty_serv_un) Replace perror with zlog_err. + 2005-01-29 Andrew J. Schorr * buffer.h: Fix comment on buffer_getstr to reflect that it now diff --git a/lib/daemon.c b/lib/daemon.c index d8380106..e73a74f1 100644 --- a/lib/daemon.c +++ b/lib/daemon.c @@ -35,7 +35,7 @@ daemon (int nochdir, int noclose) /* In case of fork is error. */ if (pid < 0) { - perror ("fork"); + zlog_err ("fork failed: %s", safe_strerror(errno)); return -1; } @@ -48,7 +48,7 @@ daemon (int nochdir, int noclose) if (pid == -1) { - perror ("setsid"); + zlog_err ("setsid failed: %s", safe_strerror(errno)); return -1; } diff --git a/lib/vty.c b/lib/vty.c index 42487330..053e9ee8 100644 --- a/lib/vty.c +++ b/lib/vty.c @@ -1824,7 +1824,7 @@ vty_serv_un (const char *path) sock = socket (AF_UNIX, SOCK_STREAM, 0); if (sock < 0) { - perror ("sock"); + zlog_err("Cannot create unix stream socket: %s", safe_strerror(errno)); return; } @@ -1841,7 +1841,7 @@ vty_serv_un (const char *path) ret = bind (sock, (struct sockaddr *) &serv, len); if (ret < 0) { - perror ("bind"); + zlog_err("Cannot bind path %s: %s", path, safe_strerror(errno)); close (sock); /* Avoid sd leak. */ return; } @@ -1849,7 +1849,7 @@ vty_serv_un (const char *path) ret = listen (sock, 5); if (ret < 0) { - perror ("listen"); + zlog_err("listen(fd %d) failed: %s", sock, safe_strerror(errno)); close (sock); /* Avoid sd leak. */ return; } -- cgit v1.2.1