aboutsummaryrefslogtreecommitdiff
path: root/syslogd.c
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2000-12-18 03:57:16 +0000
committerMatt Kraai <kraai@debian.org>2000-12-18 03:57:16 +0000
commit1fa1adea2ae16d4f4c82d7466905dce4c6edd5f5 (patch)
treeb85a425c19b299f5d8635599e11c78c96f12a4c2 /syslogd.c
parent0dab82997777bffb95d01d68e1628ee79207a03d (diff)
downloadbusybox-w32-1fa1adea2ae16d4f4c82d7466905dce4c6edd5f5.tar.gz
busybox-w32-1fa1adea2ae16d4f4c82d7466905dce4c6edd5f5.tar.bz2
busybox-w32-1fa1adea2ae16d4f4c82d7466905dce4c6edd5f5.zip
Change calls to error_msg.* and strerror to use perror_msg.*.
Diffstat (limited to 'syslogd.c')
-rw-r--r--syslogd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/syslogd.c b/syslogd.c
index a599b2113..4217c362f 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -313,7 +313,7 @@ static void doSyslogd (void)
313 /* Create the syslog file so realpath() can work. */ 313 /* Create the syslog file so realpath() can work. */
314 close (open (_PATH_LOG, O_RDWR | O_CREAT, 0644)); 314 close (open (_PATH_LOG, O_RDWR | O_CREAT, 0644));
315 if (realpath (_PATH_LOG, lfile) == NULL) 315 if (realpath (_PATH_LOG, lfile) == NULL)
316 error_msg_and_die ("Could not resolve path to " _PATH_LOG ": %s\n", strerror (errno)); 316 perror_msg_and_die ("Could not resolve path to " _PATH_LOG);
317 317
318 unlink (lfile); 318 unlink (lfile);
319 319
@@ -321,14 +321,14 @@ static void doSyslogd (void)
321 sunx.sun_family = AF_UNIX; 321 sunx.sun_family = AF_UNIX;
322 strncpy (sunx.sun_path, lfile, sizeof (sunx.sun_path)); 322 strncpy (sunx.sun_path, lfile, sizeof (sunx.sun_path));
323 if ((sock_fd = socket (AF_UNIX, SOCK_STREAM, 0)) < 0) 323 if ((sock_fd = socket (AF_UNIX, SOCK_STREAM, 0)) < 0)
324 error_msg_and_die ("Couldn't obtain descriptor for socket " _PATH_LOG ": %s\n", strerror (errno)); 324 perror_msg_and_die ("Couldn't obtain descriptor for socket " _PATH_LOG);
325 325
326 addrLength = sizeof (sunx.sun_family) + strlen (sunx.sun_path); 326 addrLength = sizeof (sunx.sun_family) + strlen (sunx.sun_path);
327 if ((bind (sock_fd, (struct sockaddr *) &sunx, addrLength)) || (listen (sock_fd, 5))) 327 if ((bind (sock_fd, (struct sockaddr *) &sunx, addrLength)) || (listen (sock_fd, 5)))
328 error_msg_and_die ("Could not connect to socket " _PATH_LOG ": %s\n", strerror (errno)); 328 perror_msg_and_die ("Could not connect to socket " _PATH_LOG);
329 329
330 if (chmod (lfile, 0666) < 0) 330 if (chmod (lfile, 0666) < 0)
331 error_msg_and_die ("Could not set permission on " _PATH_LOG ": %s\n", strerror (errno)); 331 perror_msg_and_die ("Could not set permission on " _PATH_LOG);
332 332
333 FD_ZERO (&fds); 333 FD_ZERO (&fds);
334 FD_SET (sock_fd, &fds); 334 FD_SET (sock_fd, &fds);
@@ -351,7 +351,7 @@ static void doSyslogd (void)
351 351
352 if ((n_ready = select (FD_SETSIZE, &readfds, NULL, NULL, NULL)) < 0) { 352 if ((n_ready = select (FD_SETSIZE, &readfds, NULL, NULL, NULL)) < 0) {
353 if (errno == EINTR) continue; /* alarm may have happened. */ 353 if (errno == EINTR) continue; /* alarm may have happened. */
354 error_msg_and_die ("select error: %s\n", strerror (errno)); 354 perror_msg_and_die ("select error");
355 } 355 }
356 356
357 for (fd = 0; (n_ready > 0) && (fd < FD_SETSIZE); fd++) { 357 for (fd = 0; (n_ready > 0) && (fd < FD_SETSIZE); fd++) {
@@ -365,7 +365,7 @@ static void doSyslogd (void)
365 pid_t pid; 365 pid_t pid;
366 366
367 if ((conn = accept (sock_fd, (struct sockaddr *) &sunx, &addrLength)) < 0) { 367 if ((conn = accept (sock_fd, (struct sockaddr *) &sunx, &addrLength)) < 0) {
368 error_msg_and_die ("accept error: %s\n", strerror (errno)); 368 perror_msg_and_die ("accept error");
369 } 369 }
370 370
371 pid = fork(); 371 pid = fork();