[BusyBox-cvs] busybox/sysklogd klogd.c,1.13,1.14 logger.c,1.36,1.37 logread.c,1.10,1.11 syslogd.c,1.92,1.93

Manuel Novoa III mjn3 at busybox.net
Wed Mar 19 09:13:39 UTC 2003


Update of /var/cvs/busybox/sysklogd
In directory winder:/home/mjn3/work/busybox/sysklogd

Modified Files:
	klogd.c logger.c logread.c syslogd.c 
Log Message:
Major coreutils update.


Index: klogd.c
===================================================================
RCS file: /var/cvs/busybox/sysklogd/klogd.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- klogd.c	12 Dec 2002 10:54:48 -0000	1.13
+++ klogd.c	19 Mar 2003 09:12:57 -0000	1.14
@@ -136,12 +136,12 @@
 		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 @@
 			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);

Index: logger.c
===================================================================
RCS file: /var/cvs/busybox/sysklogd/logger.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- logger.c	10 Nov 2002 21:33:28 -0000	1.36
+++ logger.c	19 Mar 2003 09:12:57 -0000	1.37
@@ -89,14 +89,14 @@
 		*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 @@
 				safe_strncpy(name, optarg, sizeof(name));
 				break;
 			default:
-				show_usage();
+				bb_show_usage();
 		}
 	}
 

Index: logread.c
===================================================================
RCS file: /var/cvs/busybox/sysklogd/logread.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- logread.c	12 Dec 2002 10:54:48 -0000	1.10
+++ logread.c	19 Mar 2003 09:12:57 -0000	1.11
@@ -87,7 +87,7 @@
 	
 	/* no options, no getopt */
 	if (argc > 1)
-		show_usage();
+		bb_show_usage();
 	
 	// handle intrrupt signal
 	if (setjmp(jmp_env)) goto output_end;

Index: syslogd.c
===================================================================
RCS file: /var/cvs/busybox/sysklogd/syslogd.c,v
retrieving revision 1.92
retrieving revision 1.93
diff -u -d -r1.92 -r1.93
--- syslogd.c	9 Feb 2003 05:07:42 -0000	1.92
+++ syslogd.c	19 Mar 2003 09:12:57 -0000	1.93
@@ -123,7 +123,7 @@
 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_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 @@
 {
 	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 @@
 		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 @@
 	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 @@
 	 * 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 @@
 	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 @@
 				/* 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 @@
 			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 @@
 			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 @@
 			break;
 #endif
 		default:
-			show_usage();
+			bb_show_usage();
 		}
 	}
 
@@ -640,7 +640,7 @@
 
 #if ! defined(__uClinux__)
 	if ((doFork == TRUE) && (daemon(0, 1) < 0)) {
-		perror_msg_and_die("daemon");
+		bb_perror_msg_and_die("daemon");
 	}
 #endif
 	doSyslogd();




More information about the busybox-cvs mailing list