summaryrefslogtreecommitdiffstats
path: root/zebra/ioctl_solaris.c
diff options
context:
space:
mode:
authorajs <ajs>2005-01-30 18:49:28 +0000
committerajs <ajs>2005-01-30 18:49:28 +0000
commit8f2f1ca9397200f230e98df6a8a698aafcfcd599 (patch)
treefca908d4a0c3bc96558c5de3dbb667fe4c3c1105 /zebra/ioctl_solaris.c
parent60f562486ce709c5ae09a554e5b15cd0f6633db0 (diff)
downloadquagga-8f2f1ca9397200f230e98df6a8a698aafcfcd599.tar.bz2
quagga-8f2f1ca9397200f230e98df6a8a698aafcfcd599.tar.xz
2005-01-30 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* 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.
Diffstat (limited to 'zebra/ioctl_solaris.c')
-rw-r--r--zebra/ioctl_solaris.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/zebra/ioctl_solaris.c b/zebra/ioctl_solaris.c
index 5ec327ac..43e1e83f 100644
--- a/zebra/ioctl_solaris.c
+++ b/zebra/ioctl_solaris.c
@@ -55,9 +55,10 @@ if_ioctl (u_long request, caddr_t buffer)
sock = socket (AF_INET, SOCK_DGRAM, 0);
if (sock < 0)
{
+ int save_errno = errno;
if (zserv_privs.change(ZPRIVS_LOWER))
zlog (NULL, LOG_ERR, "Can't lower privileges");
- perror ("socket");
+ zlog_err("Cannot create UDP socket: %s", safe_strerror(save_errno));
exit (1);
}
@@ -92,9 +93,11 @@ if_ioctl_ipv6 (u_long request, caddr_t buffer)
sock = socket (AF_INET6, SOCK_DGRAM, 0);
if (sock < 0)
{
+ int save_errno = errno;
if (zserv_privs.change(ZPRIVS_LOWER))
zlog (NULL, LOG_ERR, "Can't lower privileges");
- perror ("socket");
+ zlog_err("Cannot create IPv6 datagram socket: %s",
+ safe_strerror(save_errno));
exit (1);
}