[BusyBox-cvs] busybox/init halt.c,1.19,1.20 init.c,1.181,1.182 mesg.c,1.1,1.2 poweroff.c,1.16,1.17 reboot.c,1.25,1.26 start_stop_daemon.c,1.7,1.8

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


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

Modified Files:
	halt.c init.c mesg.c poweroff.c reboot.c start_stop_daemon.c 
Log Message:
Major coreutils update.


Index: halt.c
===================================================================
RCS file: /var/cvs/busybox/init/halt.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- halt.c	13 Apr 2002 08:31:53 -0000	1.19
+++ halt.c	19 Mar 2003 09:11:57 -0000	1.20
@@ -32,7 +32,7 @@
 	if (!pid || *pid<=0) {
 		pid = find_pid_by_name("linuxrc");
 		if (!pid || *pid<=0)
-			error_msg_and_die("no process killed");
+			bb_error_msg_and_die("no process killed");
 	}
 	return(kill(*pid, SIGUSR1));
 #else

Index: init.c
===================================================================
RCS file: /var/cvs/busybox/init/init.c,v
retrieving revision 1.181
retrieving revision 1.182
diff -u -d -r1.181 -r1.182
--- init.c	23 Jan 2003 07:08:26 -0000	1.181
+++ init.c	19 Mar 2003 09:11:57 -0000	1.182
@@ -247,14 +247,14 @@
 	if (log_fd < 0) {
 		if ((log_fd = device_open(log, O_RDWR | O_NDELAY | O_NOCTTY)) < 0) {
 			log_fd = -2;
-			error_msg("Bummer, can't write to log on %s!", log);
+			bb_error_msg("Bummer, can't write to log on %s!", log);
 			device = CONSOLE;
 		} else {
 			fcntl(log_fd, F_SETFD, FD_CLOEXEC);
 		}
 	}
 	if ((device & LOG) && (log_fd >= 0)) {
-		full_write(log_fd, msg, l);
+		bb_full_write(log_fd, msg, l);
 	}
 #endif
 
@@ -263,12 +263,12 @@
 					O_WRONLY | O_NOCTTY | O_NDELAY);
 		/* Always send console messages to /dev/console so people will see them. */
 		if (fd >= 0) {
-			full_write(fd, msg, l);
+			bb_full_write(fd, msg, l);
 			close(fd);
 #ifdef DEBUG_INIT
 		/* all descriptors may be closed */
 		} else {
-			error_msg("Bummer, can't print: ");
+			bb_error_msg("Bummer, can't print: ");
 			va_start(arguments, fmt);
 			vfprintf(stderr, fmt, arguments);
 			va_end(arguments);
@@ -323,7 +323,7 @@
 	unsigned int result, u, s = 10;
 
 	if (sysinfo(&info) != 0) {
-		perror_msg("Error checking free memory");
+		bb_perror_msg("Error checking free memory");
 		return -1;
 	}
 
@@ -564,11 +564,11 @@
 			++cmdpath;
 
 			/* find the last component in the command pathname */
-			s = get_last_path_component(cmdpath);
+			s = bb_get_last_path_component(cmdpath);
 
 			/* make a new argv[0] */
 			if ((cmd[0] = malloc(strlen(s) + 2)) == NULL) {
-				message(LOG | CONSOLE, memory_exhausted);
+				message(LOG | CONSOLE, bb_msg_memory_exhausted);
 				cmd[0] = cmdpath;
 			} else {
 				cmd[0][0] = '-';
@@ -589,7 +589,7 @@
 			messageD(LOG, "Waiting for enter to start '%s'"
 						"(pid %d, terminal %s)\n",
 					  cmdpath, getpid(), a->terminal);
-			full_write(1, press_enter, sizeof(press_enter) - 1);
+			bb_full_write(1, press_enter, sizeof(press_enter) - 1);
 			while(read(0, &c, 1) == 1 && c != '\n')
 				;
 		}
@@ -1017,7 +1017,7 @@
 		if (!pid || *pid <= 0) {
 			pid = find_pid_by_name("linuxrc");
 			if (!pid || *pid <= 0)
-				error_msg_and_die("no process killed");
+				bb_error_msg_and_die("no process killed");
 		}
 		return kill(*pid, SIGHUP);
 	}
@@ -1025,10 +1025,10 @@
 	/* Expect to be invoked as init with PID=1 or be invoked as linuxrc */
 	if (getpid() != 1
 #ifdef CONFIG_FEATURE_INITRD
-		&& strstr(applet_name, "linuxrc") == NULL
+		&& strstr(bb_applet_name, "linuxrc") == NULL
 #endif
 		) {
-		show_usage();
+		bb_show_usage();
 	}
 	/* Set up sig handlers  -- be sure to
 	 * clear all of these in run() */
@@ -1068,10 +1068,10 @@
 		const char * const *e;
 		/* Make sure environs is set to something sane */
 		for(e = environment; *e; e++)
-			putenv(*e);
+			putenv((char *) *e);
 	}
 	/* Hello world */
-	message(MAYBE_CONSOLE | LOG, "init started:  %s", full_version);
+	message(MAYBE_CONSOLE | LOG, "init started:  %s", bb_msg_full_version);
 
 	/* Make sure there is enough memory to do something useful. */
 	check_memory();

Index: mesg.c
===================================================================
RCS file: /var/cvs/busybox/init/mesg.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- mesg.c	16 Sep 2002 04:21:46 -0000	1.1
+++ mesg.c	19 Mar 2003 09:11:57 -0000	1.2
@@ -52,7 +52,7 @@
 				return EXIT_SUCCESS;
 			}
 		}
-		perror_msg_and_die("%s", tty);
+		bb_perror_msg_and_die("%s", tty);
 	}
-	show_usage();
+	bb_show_usage();
 }

Index: poweroff.c
===================================================================
RCS file: /var/cvs/busybox/init/poweroff.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- poweroff.c	13 Apr 2002 08:31:54 -0000	1.16
+++ poweroff.c	19 Mar 2003 09:11:57 -0000	1.17
@@ -32,7 +32,7 @@
 	if (!pid || *pid<=0) {
 		pid = find_pid_by_name("linuxrc");
 		if (!pid || *pid<=0)
-			error_msg_and_die("no process killed");
+			bb_error_msg_and_die("no process killed");
 	}
 	return(kill(*pid, SIGUSR2));
 #else

Index: reboot.c
===================================================================
RCS file: /var/cvs/busybox/init/reboot.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- reboot.c	7 Dec 2002 23:14:38 -0000	1.25
+++ reboot.c	19 Mar 2003 09:11:57 -0000	1.26
@@ -52,7 +52,7 @@
 			break;
 
 		default:
-			show_usage();
+			bb_show_usage();
 			break;
 		}
 	}
@@ -99,7 +99,7 @@
 		if (!pid || *pid<=0)
 			pid = find_pid_by_name("linuxrc");
 		if (!pid || *pid<=0)
-			error_msg_and_die("no process killed");
+			bb_error_msg_and_die("no process killed");
 		fflush(stdout);
 		return(kill(*pid, SIGTERM));
 	}

Index: start_stop_daemon.c
===================================================================
RCS file: /var/cvs/busybox/init/start_stop_daemon.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- start_stop_daemon.c	3 Jul 2002 23:19:11 -0000	1.7
+++ start_stop_daemon.c	19 Mar 2003 09:11:57 -0000	1.8
@@ -74,7 +74,7 @@
 			break;
 		case 's':
 			if (sscanf(optarg, "%d", &signal_nr) != 1)
-				error_msg_and_die ("-s takes a numeric argument");
+				bb_error_msg_and_die ("-s takes a numeric argument");
 			break;
 		case 'u':
 			userspec = optarg;
@@ -86,21 +86,21 @@
 			fork_before_exec = 1;
 			break;
 		default:
-			show_usage();
+			bb_show_usage();
 		}
 	}
 
 	if (start == stop)
-		error_msg_and_die ("need one of -S or -K");
+		bb_error_msg_and_die ("need one of -S or -K");
 
 	if (!execname && !userspec)
-		error_msg_and_die ("need at least one of -x or -u");
+		bb_error_msg_and_die ("need at least one of -x or -u");
 
 	if (!startas)
 		startas = execname;
 
 	if (start && !startas)
-		error_msg_and_die ("-S needs -x or -a");
+		bb_error_msg_and_die ("-S needs -x or -a");
 }
 
 
@@ -185,7 +185,7 @@
 
 	procdir = opendir("/proc");
 	if (!procdir)
-		perror_msg_and_die ("opendir /proc");
+		bb_perror_msg_and_die ("opendir /proc");
 
 	foundany = 0;
 	while ((entry = readdir(procdir)) != NULL) {
@@ -196,7 +196,7 @@
 	}
 	closedir(procdir);
 	if (!foundany)
-		error_msg_and_die ("nothing in /proc - not mounted?");
+		bb_error_msg_and_die ("nothing in /proc - not mounted?");
 }
 
 
@@ -214,7 +214,7 @@
 	else if (userspec)
 		sprintf(what, "process(es) owned by `%s'", userspec);
 	else
-		error_msg_and_die ("internal error, please report");
+		bb_error_msg_and_die ("internal error, please report");
 
 	if (!found) {
 		printf("no %s found; none killed.\n", what);
@@ -225,7 +225,7 @@
 			p->pid = -p->pid;
 			killed++;
 		} else {
-			perror_msg("warning: failed to kill %d:", p->pid);
+			bb_perror_msg("warning: failed to kill %d:", p->pid);
 		}
 	}
 	if (killed) {
@@ -262,10 +262,10 @@
 	*--argv = startas;
 	if (fork_before_exec) {
 		if (daemon(0, 0) == -1)
-			perror_msg_and_die ("unable to fork");
+			bb_perror_msg_and_die ("unable to fork");
 	}
 	setsid();
 	execv(startas, argv);
-	perror_msg_and_die ("unable to start %s", startas);
+	bb_perror_msg_and_die ("unable to start %s", startas);
 }
 




More information about the busybox-cvs mailing list