diff options
author | Manuel Novoa III <mjn3@codepoet.org> | 2003-03-19 09:13:01 +0000 |
---|---|---|
committer | Manuel Novoa III <mjn3@codepoet.org> | 2003-03-19 09:13:01 +0000 |
commit | cad5364599eb5062d59e0c397ed638ddd61a8d5d (patch) | |
tree | a318d0f03aa076c74b576ea45dc543a5669e8e91 /sysklogd | |
parent | e01f9662a5bd5d91be4f6b3941b57fff73cd5af1 (diff) | |
download | busybox-cad5364599eb5062d59e0c397ed638ddd61a8d5d.tar.gz |
Major coreutils update.
Diffstat (limited to 'sysklogd')
-rw-r--r-- | sysklogd/klogd.c | 10 | ||||
-rw-r--r-- | sysklogd/logger.c | 6 | ||||
-rw-r--r-- | sysklogd/logread.c | 2 | ||||
-rw-r--r-- | sysklogd/syslogd.c | 34 |
4 files changed, 26 insertions, 26 deletions
diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c index 4132eb68e..b76a52ff7 100644 --- a/sysklogd/klogd.c +++ b/sysklogd/klogd.c @@ -136,12 +136,12 @@ extern int klogd_main(int argc, char **argv) switch (opt) { case 'c': if ((optarg == NULL) || (optarg[1] != '\0')) { - show_usage(); + bb_show_usage(); } /* Valid levels are between 1 and 8 */ console_log_level = *optarg - '1'; if (console_log_level > 7) { - show_usage(); + bb_show_usage(); } console_log_level++; @@ -150,16 +150,16 @@ extern int klogd_main(int argc, char **argv) doFork = FALSE; break; default: - show_usage(); + bb_show_usage(); } } if (doFork) { #if !defined(__UCLIBC__) || defined(__UCLIBC_HAS_MMU__) if (daemon(0, 1) < 0) - perror_msg_and_die("daemon"); + bb_perror_msg_and_die("daemon"); #else - error_msg_and_die("daemon not supported"); + bb_error_msg_and_die("daemon not supported"); #endif } doKlogd(console_log_level); diff --git a/sysklogd/logger.c b/sysklogd/logger.c index bb63975e7..1b55bf589 100644 --- a/sysklogd/logger.c +++ b/sysklogd/logger.c @@ -89,14 +89,14 @@ static int pencode(char *s) *s = '\0'; fac = decode(save, facilitynames); if (fac < 0) - error_msg_and_die("unknown facility name: %s", save); + bb_error_msg_and_die("unknown facility name: %s", save); *s++ = '.'; } else { s = save; } lev = decode(s, prioritynames); if (lev < 0) - error_msg_and_die("unknown priority name: %s", save); + bb_error_msg_and_die("unknown priority name: %s", save); return ((lev & LOG_PRIMASK) | (fac & LOG_FACMASK)); } @@ -124,7 +124,7 @@ extern int logger_main(int argc, char **argv) safe_strncpy(name, optarg, sizeof(name)); break; default: - show_usage(); + bb_show_usage(); } } diff --git a/sysklogd/logread.c b/sysklogd/logread.c index ecdf2f579..ae8dbae3a 100644 --- a/sysklogd/logread.c +++ b/sysklogd/logread.c @@ -87,7 +87,7 @@ extern int logread_main(int argc, char **argv) /* no options, no getopt */ if (argc > 1) - show_usage(); + bb_show_usage(); // handle intrrupt signal if (setjmp(jmp_env)) goto output_end; diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index 1c58a64f8..b912f5f8f 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c @@ -123,7 +123,7 @@ static int circular_logging = FALSE; static inline void sem_up(int semid) { if (semop(semid, SMwup, 1) == -1) { - perror_msg_and_die("semop[SMwup]"); + bb_perror_msg_and_die("semop[SMwup]"); } } @@ -133,7 +133,7 @@ static inline void sem_up(int semid) static inline void sem_down(int semid) { if (semop(semid, SMwdn, 3) == -1) { - perror_msg_and_die("semop[SMwdn]"); + bb_perror_msg_and_die("semop[SMwdn]"); } } @@ -157,11 +157,11 @@ void ipcsyslog_init(void) { if (buf == NULL) { if ((shmid = shmget(KEY_ID, shm_size, IPC_CREAT | 1023)) == -1) { - perror_msg_and_die("shmget"); + bb_perror_msg_and_die("shmget"); } if ((buf = shmat(shmid, NULL, 0)) == NULL) { - perror_msg_and_die("shmat"); + bb_perror_msg_and_die("shmat"); } buf->size = data_size; @@ -171,10 +171,10 @@ void ipcsyslog_init(void) if ((s_semid = semget(KEY_ID, 2, IPC_CREAT | IPC_EXCL | 1023)) == -1) { if (errno == EEXIST) { if ((s_semid = semget(KEY_ID, 2, 0)) == -1) { - perror_msg_and_die("semget"); + bb_perror_msg_and_die("semget"); } } else { - perror_msg_and_die("semget"); + bb_perror_msg_and_die("semget"); } } } else { @@ -471,7 +471,7 @@ static void init_RemoteLog(void) remotefd = socket(AF_INET, SOCK_DGRAM, 0); if (remotefd < 0) { - error_msg_and_die("cannot create socket"); + bb_error_msg_and_die("cannot create socket"); } hostinfo = xgethostbyname(RemoteHost); @@ -484,7 +484,7 @@ static void init_RemoteLog(void) * for future operations */ if (0 != (connect(remotefd, (struct sockaddr *) &remoteaddr, len))) { - error_msg_and_die("cannot connect to remote host %s:%d", RemoteHost, + bb_error_msg_and_die("cannot connect to remote host %s:%d", RemoteHost, RemotePort); } @@ -521,17 +521,17 @@ static void doSyslogd(void) sunx.sun_family = AF_UNIX; strncpy(sunx.sun_path, lfile, sizeof(sunx.sun_path)); if ((sock_fd = socket(AF_UNIX, SOCK_DGRAM, 0)) < 0) { - perror_msg_and_die("Couldn't get file descriptor for socket " + bb_perror_msg_and_die("Couldn't get file descriptor for socket " _PATH_LOG); } addrLength = sizeof(sunx.sun_family) + strlen(sunx.sun_path); if (bind(sock_fd, (struct sockaddr *) &sunx, addrLength) < 0) { - perror_msg_and_die("Could not connect to socket " _PATH_LOG); + bb_perror_msg_and_die("Could not connect to socket " _PATH_LOG); } if (chmod(lfile, 0666) < 0) { - perror_msg_and_die("Could not set permission on " _PATH_LOG); + bb_perror_msg_and_die("Could not set permission on " _PATH_LOG); } #ifdef CONFIG_FEATURE_IPC_SYSLOG if (circular_logging == TRUE) { @@ -557,7 +557,7 @@ static void doSyslogd(void) /* alarm may have happened. */ continue; } - perror_msg_and_die("select error"); + bb_perror_msg_and_die("select error"); } if (FD_ISSET(sock_fd, &fds)) { @@ -569,7 +569,7 @@ static void doSyslogd(void) if ((i = recv(sock_fd, tmpbuf, BUFSIZ, 0)) > 0) { serveConnection(tmpbuf, i); } else { - perror_msg_and_die("UNIX socket error"); + bb_perror_msg_and_die("UNIX socket error"); } RELEASE_CONFIG_BUFFER(tmpbuf); } /* FD_ISSET() */ @@ -598,11 +598,11 @@ extern int syslogd_main(int argc, char **argv) break; #endif case 'O': - logFilePath = xstrdup(optarg); + logFilePath = bb_xstrdup(optarg); break; #ifdef CONFIG_FEATURE_REMOTE_LOG case 'R': - RemoteHost = xstrdup(optarg); + RemoteHost = bb_xstrdup(optarg); if ((p = strchr(RemoteHost, ':'))) { RemotePort = atoi(p + 1); *p = '\0'; @@ -619,7 +619,7 @@ extern int syslogd_main(int argc, char **argv) break; #endif default: - show_usage(); + bb_show_usage(); } } @@ -640,7 +640,7 @@ extern int syslogd_main(int argc, char **argv) #if ! defined(__uClinux__) if ((doFork == TRUE) && (daemon(0, 1) < 0)) { - perror_msg_and_die("daemon"); + bb_perror_msg_and_die("daemon"); } #endif doSyslogd(); |