svn commit: trunk/busybox: applets archival coreutils e2fsprogs e2f etc...

vda at busybox.net vda at busybox.net
Mon Oct 1 11:58:41 UTC 2007


Author: vda
Date: 2007-10-01 04:58:38 -0700 (Mon, 01 Oct 2007)
New Revision: 20159

Log:
'simple' error message functions by Loic Grenie <loic.grenie at gmail.com>.
263 bytes saved.



Modified:
   trunk/busybox/applets/applets.c
   trunk/busybox/archival/bbunzip.c
   trunk/busybox/coreutils/chmod.c
   trunk/busybox/coreutils/chown.c
   trunk/busybox/coreutils/dd.c
   trunk/busybox/coreutils/df.c
   trunk/busybox/coreutils/du.c
   trunk/busybox/coreutils/env.c
   trunk/busybox/coreutils/expand.c
   trunk/busybox/coreutils/fold.c
   trunk/busybox/coreutils/head.c
   trunk/busybox/coreutils/ln.c
   trunk/busybox/coreutils/ls.c
   trunk/busybox/coreutils/mkfifo.c
   trunk/busybox/coreutils/mknod.c
   trunk/busybox/coreutils/nice.c
   trunk/busybox/coreutils/nohup.c
   trunk/busybox/coreutils/realpath.c
   trunk/busybox/coreutils/split.c
   trunk/busybox/coreutils/touch.c
   trunk/busybox/coreutils/wc.c
   trunk/busybox/e2fsprogs/fsck.c
   trunk/busybox/e2fsprogs/old_e2fsprogs/fsck.c
   trunk/busybox/findutils/find.c
   trunk/busybox/findutils/grep.c
   trunk/busybox/findutils/xargs.c
   trunk/busybox/include/libbb.h
   trunk/busybox/init/mesg.c
   trunk/busybox/libbb/change_identity.c
   trunk/busybox/libbb/dump.c
   trunk/busybox/libbb/perror_msg.c
   trunk/busybox/libbb/perror_msg_and_die.c
   trunk/busybox/libbb/recursive_action.c
   trunk/busybox/libbb/vfork_daemon_rexec.c
   trunk/busybox/libbb/wfopen.c
   trunk/busybox/libbb/xfuncs.c
   trunk/busybox/loginutils/adduser.c
   trunk/busybox/miscutils/chrt.c
   trunk/busybox/miscutils/mountpoint.c
   trunk/busybox/miscutils/setsid.c
   trunk/busybox/miscutils/taskset.c
   trunk/busybox/modutils/rmmod.c
   trunk/busybox/networking/httpd.c
   trunk/busybox/networking/inetd.c
   trunk/busybox/networking/netstat.c
   trunk/busybox/selinux/setfiles.c
   trunk/busybox/shell/lash.c
   trunk/busybox/util-linux/mount.c
   trunk/busybox/util-linux/setarch.c
   trunk/busybox/util-linux/swaponoff.c


Changeset:
Modified: trunk/busybox/applets/applets.c
===================================================================
--- trunk/busybox/applets/applets.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/applets/applets.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -526,7 +526,7 @@
 				applets[i].name);
 		rc = lf(busybox, fpc);
 		if (rc != 0 && errno != EEXIST) {
-			bb_perror_msg("%s", fpc);
+			bb_simple_perror_msg(fpc);
 		}
 		free(fpc);
 	}

Modified: trunk/busybox/archival/bbunzip.c
===================================================================
--- trunk/busybox/archival/bbunzip.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/archival/bbunzip.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -49,7 +49,7 @@
 		/* Open src */
 		if (filename) {
 			if (stat(filename, &stat_buf) != 0) {
-				bb_perror_msg("%s", filename);
+				bb_simple_perror_msg(filename);
  err:
 				exitcode = 1;
 				goto free_name;

Modified: trunk/busybox/coreutils/chmod.c
===================================================================
--- trunk/busybox/coreutils/chmod.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/coreutils/chmod.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -63,7 +63,7 @@
 	}
  err:
 	if (!OPT_QUIET)
-		bb_perror_msg("%s", fileName);
+		bb_simple_perror_msg(fileName);
 	return FALSE;
 }
 

Modified: trunk/busybox/coreutils/chown.c
===================================================================
--- trunk/busybox/coreutils/chown.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/coreutils/chown.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -57,7 +57,7 @@
 		return TRUE;
 	}
 	if (!OPT_QUIET)
-		bb_perror_msg("%s", fileName);	/* A filename can have % in it... */
+		bb_simple_perror_msg(fileName);	/* A filename can have % in it... */
 	return FALSE;
 }
 

Modified: trunk/busybox/coreutils/dd.c
===================================================================
--- trunk/busybox/coreutils/dd.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/coreutils/dd.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -278,7 +278,7 @@
 		if (n < 0) {
 			if (flags & FLAG_NOERROR) {
 				n = ibs;
-				bb_perror_msg("%s", infile);
+				bb_simple_perror_msg(infile);
 			} else
 				goto die_infile;
 		}
@@ -320,12 +320,12 @@
 	}
 	if (close(ifd) < 0) {
  die_infile:
-		bb_perror_msg_and_die("%s", infile);
+		bb_simple_perror_msg_and_die(infile);
 	}
 
 	if (close(ofd) < 0) {
  die_outfile:
-		bb_perror_msg_and_die("%s", outfile);
+		bb_simple_perror_msg_and_die(outfile);
 	}
  out_status:
 	dd_output_status(0);

Modified: trunk/busybox/coreutils/df.c
===================================================================
--- trunk/busybox/coreutils/df.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/coreutils/df.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -100,7 +100,7 @@
 		mount_point = mount_entry->mnt_dir;
 
 		if (statfs(mount_point, &s) != 0) {
-			bb_perror_msg("%s", mount_point);
+			bb_simple_perror_msg(mount_point);
 			goto SET_ERROR;
 		}
 

Modified: trunk/busybox/coreutils/du.c
===================================================================
--- trunk/busybox/coreutils/du.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/coreutils/du.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -67,7 +67,7 @@
 	unsigned long sum;
 
 	if (lstat(filename, &statbuf) != 0) {
-		bb_perror_msg("%s", filename);
+		bb_simple_perror_msg(filename);
 		G.status = EXIT_FAILURE;
 		return 0;
 	}
@@ -85,7 +85,7 @@
 	if (S_ISLNK(statbuf.st_mode)) {
 		if (G.slink_depth > G.du_depth) {	/* -H or -L */
 			if (stat(filename, &statbuf) != 0) {
-				bb_perror_msg("%s", filename);
+				bb_simple_perror_msg(filename);
 				G.status = EXIT_FAILURE;
 				return 0;
 			}

Modified: trunk/busybox/coreutils/env.c
===================================================================
--- trunk/busybox/coreutils/env.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/coreutils/env.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -81,7 +81,7 @@
 		BB_EXECVP(*argv, argv);
 		/* SUSv3-mandated exit codes. */
 		xfunc_error_retval = (errno == ENOENT) ? 127 : 126;
-		bb_perror_msg_and_die("%s", *argv);
+		bb_simple_perror_msg_and_die(*argv);
 	}
 
 	for (ep = environ; *ep; ep++) {

Modified: trunk/busybox/coreutils/expand.c
===================================================================
--- trunk/busybox/coreutils/expand.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/coreutils/expand.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -192,7 +192,7 @@
 		/* Check and close the file */
 		/* We do want all of them to execute, thus | instead of || */
 		if (ferror(file) | fclose_if_not_stdin(file)) {
-			bb_perror_msg("%s", *argv);
+			bb_simple_perror_msg(*argv);
 			exit_status = EXIT_FAILURE;
 		}
 		/* If stdin also clear EOF */

Modified: trunk/busybox/coreutils/fold.c
===================================================================
--- trunk/busybox/coreutils/fold.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/coreutils/fold.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -145,7 +145,7 @@
 		}
 
 		if (ferror(istream) || fclose_if_not_stdin(istream)) {
-			bb_perror_msg("%s", *argv);	/* Avoid multibyte problems. */
+			bb_simple_perror_msg(*argv);	/* Avoid multibyte problems. */
 			errs |= EXIT_FAILURE;
 		}
 	} while (*++argv);

Modified: trunk/busybox/coreutils/head.c
===================================================================
--- trunk/busybox/coreutils/head.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/coreutils/head.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -128,7 +128,7 @@
 				putchar(c);
 			}
 			if (fclose_if_not_stdin(fp)) {
-				bb_perror_msg("%s", *argv);	/* Avoid multibyte problems. */
+				bb_simple_perror_msg(*argv);	/* Avoid multibyte problems. */
 				retval = EXIT_FAILURE;
 			}
 			die_if_ferror_stdout();

Modified: trunk/busybox/coreutils/ln.c
===================================================================
--- trunk/busybox/coreutils/ln.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/coreutils/ln.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -64,7 +64,7 @@
 		if (!(flag & LN_SYMLINK) && stat(*argv, &statbuf)) {
 			// coreutils: "ln dangling_symlink new_hardlink" works
 			if (lstat(*argv, &statbuf) || !S_ISLNK(statbuf.st_mode)) {
-				bb_perror_msg("%s", *argv);
+				bb_simple_perror_msg(*argv);
 				status = EXIT_FAILURE;
 				free(src_name);
 				continue;
@@ -75,7 +75,7 @@
 			char *backup;
 			backup = xasprintf("%s%s", src, suffix);
 			if (rename(src, backup) < 0 && errno != ENOENT) {
-				bb_perror_msg("%s", src);
+				bb_simple_perror_msg(src);
 				status = EXIT_FAILURE;
 				free(backup);
 				continue;
@@ -97,7 +97,7 @@
 		}
 
 		if (link_func(*argv, src) != 0) {
-			bb_perror_msg("%s", src);
+			bb_simple_perror_msg(src);
 			status = EXIT_FAILURE;
 		}
 

Modified: trunk/busybox/coreutils/ls.c
===================================================================
--- trunk/busybox/coreutils/ls.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/coreutils/ls.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -171,7 +171,7 @@
 		}
 #endif
 		if (stat(fullname, &dstat)) {
-			bb_perror_msg("%s", fullname);
+			bb_simple_perror_msg(fullname);
 			status = EXIT_FAILURE;
 			return 0;
 		}
@@ -182,7 +182,7 @@
 		}
 #endif
 		if (lstat(fullname, &dstat)) {
-			bb_perror_msg("%s", fullname);
+			bb_simple_perror_msg(fullname);
 			status = EXIT_FAILURE;
 			return 0;
 		}

Modified: trunk/busybox/coreutils/mkfifo.c
===================================================================
--- trunk/busybox/coreutils/mkfifo.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/coreutils/mkfifo.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -28,7 +28,7 @@
 
 	do {
 		if (mkfifo(*argv, mode) < 0) {
-			bb_perror_msg("%s", *argv);	/* Avoid multibyte problems. */
+			bb_simple_perror_msg(*argv);	/* Avoid multibyte problems. */
 			retval = EXIT_FAILURE;
 		}
 	} while (*++argv);

Modified: trunk/busybox/coreutils/mknod.c
===================================================================
--- trunk/busybox/coreutils/mknod.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/coreutils/mknod.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -44,7 +44,7 @@
 			if (mknod(name, mode, dev) == 0) {
 				return EXIT_SUCCESS;
 			}
-			bb_perror_msg_and_die("%s", name);
+			bb_simple_perror_msg_and_die(name);
 		}
 	}
 	bb_show_usage();

Modified: trunk/busybox/coreutils/nice.c
===================================================================
--- trunk/busybox/coreutils/nice.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/coreutils/nice.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -51,5 +51,5 @@
 
 	/* The exec failed... */
 	xfunc_error_retval = (errno == ENOENT) ? 127 : 126; /* SUSv3 */
-	bb_perror_msg_and_die("%s", *argv);
+	bb_simple_perror_msg_and_die(*argv);
 }

Modified: trunk/busybox/coreutils/nohup.c
===================================================================
--- trunk/busybox/coreutils/nohup.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/coreutils/nohup.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -56,5 +56,5 @@
 	BB_EXECVP(argv[1], argv+1);
 	if (ENABLE_FEATURE_CLEAN_UP && home)
 		free((char*)nohupout);
-	bb_perror_msg_and_die("%s", argv[1]);
+	bb_simple_perror_msg_and_die(argv[1]);
 }

Modified: trunk/busybox/coreutils/realpath.c
===================================================================
--- trunk/busybox/coreutils/realpath.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/coreutils/realpath.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -35,7 +35,7 @@
 			puts(resolved_path);
 		} else {
 			retval = EXIT_FAILURE;
-			bb_perror_msg("%s", *argv);
+			bb_simple_perror_msg(*argv);
 		}
 	} while (--argc);
 

Modified: trunk/busybox/coreutils/split.c
===================================================================
--- trunk/busybox/coreutils/split.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/coreutils/split.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -104,7 +104,7 @@
 		if (!bytes_read)
 			break;
 		if (bytes_read < 0)
-			bb_perror_msg_and_die("%s", argv[0]);
+			bb_simple_perror_msg_and_die(argv[0]);
 		src = read_buffer;
 		do {
 			if (!remaining) {

Modified: trunk/busybox/coreutils/touch.c
===================================================================
--- trunk/busybox/coreutils/touch.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/coreutils/touch.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -49,7 +49,7 @@
 				}
 			}
 			status = EXIT_FAILURE;
-			bb_perror_msg("%s", *argv);
+			bb_simple_perror_msg(*argv);
 		}
 	} while (*++argv);
 

Modified: trunk/busybox/coreutils/wc.c
===================================================================
--- trunk/busybox/coreutils/wc.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/coreutils/wc.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -150,7 +150,7 @@
 				}
 			} else if (c == EOF) {
 				if (ferror(fp)) {
-					bb_perror_msg("%s", arg);
+					bb_simple_perror_msg(arg);
 					status = EXIT_FAILURE;
 				}
 				--counts[WC_CHARS];

Modified: trunk/busybox/e2fsprogs/fsck.c
===================================================================
--- trunk/busybox/e2fsprogs/fsck.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/e2fsprogs/fsck.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -659,7 +659,7 @@
 	if (!noexecute) {
 		pid = spawn(argv);
 		if (pid < 0)
-			bb_perror_msg("%s", argv[0]);
+			bb_simple_perror_msg(argv[0]);
 	}
 
 	for (i = num_args+1; i < argc; i++)

Modified: trunk/busybox/e2fsprogs/old_e2fsprogs/fsck.c
===================================================================
--- trunk/busybox/e2fsprogs/old_e2fsprogs/fsck.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/e2fsprogs/old_e2fsprogs/fsck.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -626,7 +626,7 @@
 		if (!interactive)
 			close(0);
 		(void) execv(s, argv);
-		bb_perror_msg_and_die("%s", argv[0]);
+		bb_simple_perror_msg_and_die(argv[0]);
 	}
 
 	for (i = 1; i < argc; i++)

Modified: trunk/busybox/findutils/find.c
===================================================================
--- trunk/busybox/findutils/find.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/findutils/find.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -277,7 +277,7 @@
 
 	rc = spawn_and_wait(argv);
 	if (rc < 0)
-		bb_perror_msg("%s", argv[0]);
+		bb_simple_perror_msg(argv[0]);
 
 	i = 0;
 	while (argv[i])
@@ -347,7 +347,7 @@
 		rc = unlink(fileName);
 	}
 	if (rc < 0)
-		bb_perror_msg("%s", fileName);
+		bb_simple_perror_msg(fileName);
 	return TRUE;
 }
 #endif
@@ -780,7 +780,7 @@
 			ap->context = NULL;
 			/* SELinux headers erroneously declare non-const parameter */
 			if (selinux_raw_to_trans_context((char*)arg1, &ap->context))
-				bb_perror_msg("%s", arg1);
+				bb_simple_perror_msg(arg1);
 		}
 #endif
 		else {

Modified: trunk/busybox/findutils/grep.c
===================================================================
--- trunk/busybox/findutils/grep.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/findutils/grep.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -369,7 +369,7 @@
 	FILE *file = fopen(filename, "r");
 	if (file == NULL) {
 		if (!SUPPRESS_ERR_MSGS)
-			bb_perror_msg("%s", cur_file);
+			bb_simple_perror_msg(cur_file);
 		open_errors = 1;
 		return 0;
 	}
@@ -517,7 +517,7 @@
 			file = fopen(cur_file, "r");
 			if (file == NULL) {
 				if (!SUPPRESS_ERR_MSGS)
-					bb_perror_msg("%s", cur_file);
+					bb_simple_perror_msg(cur_file);
 				open_errors = 1;
 				continue;
 			}

Modified: trunk/busybox/findutils/xargs.c
===================================================================
--- trunk/busybox/findutils/xargs.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/findutils/xargs.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -57,7 +57,7 @@
 
 	status = spawn_and_wait(args);
 	if (status < 0) {
-		bb_perror_msg("%s", args[0]);
+		bb_simple_perror_msg(args[0]);
 		return errno == ENOENT ? 127 : 126;
 	}
 	if (status == 255) {

Modified: trunk/busybox/include/libbb.h
===================================================================
--- trunk/busybox/include/libbb.h	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/include/libbb.h	2007-10-01 11:58:38 UTC (rev 20159)
@@ -677,7 +677,9 @@
 extern void bb_error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2)));
 extern void bb_error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2)));
 extern void bb_perror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2)));
+extern void bb_simple_perror_msg(const char *s);
 extern void bb_perror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2)));
+extern void bb_simple_perror_msg_and_die(const char *s) __attribute__ ((noreturn));
 extern void bb_herror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2)));
 extern void bb_herror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2)));
 extern void bb_perror_nomsg_and_die(void) ATTRIBUTE_NORETURN;
@@ -1185,7 +1187,6 @@
 #include <dmalloc.h>
 #endif
 
-
 #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
 
 #endif /* __LIBBUSYBOX_H__ */

Modified: trunk/busybox/init/mesg.c
===================================================================
--- trunk/busybox/init/mesg.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/init/mesg.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -40,7 +40,7 @@
 				return EXIT_SUCCESS;
 			}
 		}
-		bb_perror_msg_and_die("%s", tty);
+		bb_simple_perror_msg_and_die(tty);
 	}
 	bb_show_usage();
 }

Modified: trunk/busybox/libbb/change_identity.c
===================================================================
--- trunk/busybox/libbb/change_identity.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/libbb/change_identity.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -47,5 +47,5 @@
 	const char *err_msg = change_identity_e2str(pw);
 
 	if (err_msg)
-		bb_perror_msg_and_die("%s", err_msg);
+		bb_simple_perror_msg_and_die(err_msg);
 }

Modified: trunk/busybox/libbb/dump.c
===================================================================
--- trunk/busybox/libbb/dump.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/libbb/dump.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -297,7 +297,7 @@
 
 	if (statok) {
 		if (fstat(STDIN_FILENO, &sbuf)) {
-			bb_perror_msg_and_die("%s", fname);
+			bb_simple_perror_msg_and_die(fname);
 		}
 		if ((!(S_ISCHR(sbuf.st_mode) ||
 			   S_ISBLK(sbuf.st_mode) ||
@@ -309,7 +309,7 @@
 		}
 	}
 	if (fseek(stdin, bb_dump_skip, SEEK_SET)) {
-		bb_perror_msg_and_die("%s", fname);
+		bb_simple_perror_msg_and_die(fname);
 	}
 	savaddress = address += bb_dump_skip;
 	bb_dump_skip = 0;
@@ -328,7 +328,7 @@
 	for (;;) {
 		if (*_argv) {
 			if (!(freopen(*_argv, "r", stdin))) {
-				bb_perror_msg("%s", *_argv);
+				bb_simple_perror_msg(*_argv);
 				exitval = 1;
 				++_argv;
 				continue;
@@ -393,7 +393,7 @@
 				  bb_dump_length == -1 ? need : MIN(bb_dump_length, need), stdin);
 		if (!n) {
 			if (ferror(stdin)) {
-				bb_perror_msg("%s", _argv[-1]);
+				bb_simple_perror_msg(_argv[-1]);
 			}
 			ateof = 1;
 			continue;

Modified: trunk/busybox/libbb/perror_msg.c
===================================================================
--- trunk/busybox/libbb/perror_msg.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/libbb/perror_msg.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -18,3 +18,8 @@
 	bb_verror_msg(s, p, errno ? strerror(errno) : NULL);
 	va_end(p);
 }
+
+void bb_simple_perror_msg(const char *s)
+{
+	bb_perror_msg("%s", s);
+}

Modified: trunk/busybox/libbb/perror_msg_and_die.c
===================================================================
--- trunk/busybox/libbb/perror_msg_and_die.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/libbb/perror_msg_and_die.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -19,3 +19,8 @@
 	va_end(p);
 	xfunc_die();
 }
+
+void bb_simple_perror_msg_and_die(const char *s)
+{
+	bb_perror_msg_and_die("%s", s);
+}

Modified: trunk/busybox/libbb/recursive_action.c
===================================================================
--- trunk/busybox/libbb/recursive_action.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/libbb/recursive_action.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -120,6 +120,6 @@
 	return TRUE;
 
  done_nak_warn:
-	bb_perror_msg("%s", fileName);
+	bb_simple_perror_msg(fileName);
 	return FALSE;
 }

Modified: trunk/busybox/libbb/vfork_daemon_rexec.c
===================================================================
--- trunk/busybox/libbb/vfork_daemon_rexec.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/libbb/vfork_daemon_rexec.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -62,7 +62,7 @@
 {
 	pid_t pid = spawn(argv);
 	if (pid < 0)
-		bb_perror_msg_and_die("%s", *argv);
+		bb_simple_perror_msg_and_die(*argv);
 	return pid;
 }
 

Modified: trunk/busybox/libbb/wfopen.c
===================================================================
--- trunk/busybox/libbb/wfopen.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/libbb/wfopen.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -13,7 +13,7 @@
 {
 	FILE *fp = fopen(path, mode);
 	if (!fp) {
-		bb_perror_msg("%s", path);
+		bb_simple_perror_msg(path);
 		errno = 0;
 	}
 	return fp;

Modified: trunk/busybox/libbb/xfuncs.c
===================================================================
--- trunk/busybox/libbb/xfuncs.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/libbb/xfuncs.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -704,13 +704,13 @@
 
 	ret = ioctl(fd, request, argp);
 	if (ret < 0)
-		bb_perror_msg("%s", ioctl_name);
+		bb_simple_perror_msg(ioctl_name);
 	return ret;
 }
 void bb_xioctl(int fd, int request, void *argp, const char *ioctl_name)
 {
 	if (ioctl(fd, request, argp) < 0)
-		bb_perror_msg_and_die("%s", ioctl_name);
+		bb_simple_perror_msg_and_die(ioctl_name);
 }
 #else
 int bb_ioctl_or_warn(int fd, int request, void *argp)

Modified: trunk/busybox/loginutils/adduser.c
===================================================================
--- trunk/busybox/loginutils/adduser.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/loginutils/adduser.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -144,7 +144,7 @@
 		if (mkdir(p->pw_dir, 0755)
 		|| chown(p->pw_dir, p->pw_uid, p->pw_gid)
 		|| chmod(p->pw_dir, 02755)) {
-			bb_perror_msg("%s", p->pw_dir);
+			bb_simple_perror_msg(p->pw_dir);
 		}
 	}
 

Modified: trunk/busybox/miscutils/chrt.c
===================================================================
--- trunk/busybox/miscutils/chrt.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/miscutils/chrt.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -115,7 +115,7 @@
 	}
 	++argv;
 	BB_EXECVP(*argv, argv);
-	bb_perror_msg_and_die("%s", *argv);
+	bb_simple_perror_msg_and_die(*argv);
 }
 #undef OPT_p
 #undef OPT_r

Modified: trunk/busybox/miscutils/mountpoint.c
===================================================================
--- trunk/busybox/miscutils/mountpoint.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/miscutils/mountpoint.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -61,6 +61,6 @@
 		}
 	}
 	if (!(opt & OPT_q))
-		bb_perror_msg("%s", arg);
+		bb_simple_perror_msg(arg);
 	return EXIT_FAILURE;
 }

Modified: trunk/busybox/miscutils/setsid.c
===================================================================
--- trunk/busybox/miscutils/setsid.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/miscutils/setsid.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -29,5 +29,5 @@
 	setsid();  /* no error possible */
 
 	BB_EXECVP(argv[1], argv + 1);
-	bb_perror_msg_and_die("%s", argv[1]);
+	bb_simple_perror_msg_and_die(argv[1]);
 }

Modified: trunk/busybox/miscutils/taskset.c
===================================================================
--- trunk/busybox/miscutils/taskset.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/miscutils/taskset.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -92,7 +92,7 @@
 	}
 	++argv;
 	BB_EXECVP(*argv, argv);
-	bb_perror_msg_and_die("%s", *argv);
+	bb_simple_perror_msg_and_die(*argv);
 }
 #undef OPT_p
 #undef TASKSET_PRINTF_MASK

Modified: trunk/busybox/modutils/rmmod.c
===================================================================
--- trunk/busybox/modutils/rmmod.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/modutils/rmmod.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -85,7 +85,7 @@
 		}
 
 		if (syscall(__NR_delete_module, ENABLE_FEATURE_2_6_MODULES ? misc_buf : argv[n], flags)) {
-			bb_perror_msg("%s", argv[n]);
+			bb_simple_perror_msg(argv[n]);
 			ret = EXIT_FAILURE;
 		}
 	}

Modified: trunk/busybox/networking/httpd.c
===================================================================
--- trunk/busybox/networking/httpd.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/networking/httpd.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -504,7 +504,7 @@
 			return;
 		}
 		if (configFile && flag == FIRST_PARSE) /* if -c option given */
-			bb_perror_msg_and_die("%s", cf);
+			bb_simple_perror_msg_and_die(cf);
 		flag = FIND_FROM_HTTPD_ROOT;
 		cf = httpd_conf;
 	}

Modified: trunk/busybox/networking/inetd.c
===================================================================
--- trunk/busybox/networking/inetd.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/networking/inetd.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -983,7 +983,7 @@
 	char protoname[10];
 
 	if (!setconfig()) {
-		bb_perror_msg("%s", config_filename);
+		bb_simple_perror_msg(config_filename);
 		return;
 	}
 	for (sep = servtab; sep; sep = sep->se_next)

Modified: trunk/busybox/networking/netstat.c
===================================================================
--- trunk/busybox/networking/netstat.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/networking/netstat.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -464,7 +464,7 @@
 	procinfo = fopen(file, "r");
 	if (procinfo == NULL) {
 		if (errno != ENOENT) {
-			bb_perror_msg("%s", file);
+			bb_simple_perror_msg(file);
 		} else {
 			bb_error_msg("no support for '%s' on this system", name);
 		}

Modified: trunk/busybox/selinux/setfiles.c
===================================================================
--- trunk/busybox/selinux/setfiles.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/selinux/setfiles.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -595,7 +595,7 @@
 		if (argc == 1)
 			bb_show_usage();
 		if (stat(argv[optind], &sb) < 0) {
-			bb_perror_msg_and_die("%s", argv[optind]);
+			bb_simple_perror_msg_and_die(argv[optind]);
 		}
 		if (!S_ISREG(sb.st_mode)) {
 			bb_error_msg_and_die("spec file %s is not a regular file", argv[optind]);
@@ -603,7 +603,7 @@
 		/* Load the file contexts configuration and check it. */
 		rc = matchpathcon_init(argv[optind]);
 		if (rc < 0) {
-			bb_perror_msg_and_die("%s", argv[optind]);
+			bb_simple_perror_msg_and_die(argv[optind]);
 		}
 
 		optind++;

Modified: trunk/busybox/shell/lash.c
===================================================================
--- trunk/busybox/shell/lash.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/shell/lash.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -1159,7 +1159,7 @@
 
 	/* Do not use bb_perror_msg_and_die() here, since we must not
 	 * call exit() but should call _exit() instead */
-	bb_perror_msg("%s", child->argv[0]);
+	bb_simple_perror_msg(child->argv[0]);
 	_exit(EXIT_FAILURE);
 }
 

Modified: trunk/busybox/util-linux/mount.c
===================================================================
--- trunk/busybox/util-linux/mount.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/util-linux/mount.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -1655,7 +1655,7 @@
 	 && (i & (MS_SHARED | MS_PRIVATE | MS_SLAVE | MS_UNBINDABLE))
 	) {
 		rc = mount("", argv[0], "", i, "");
-		if (rc) bb_perror_msg_and_die("%s", argv[0]);
+		if (rc) bb_simple_perror_msg_and_die(argv[0]);
 		goto clean_up;
 	}
 

Modified: trunk/busybox/util-linux/setarch.c
===================================================================
--- trunk/busybox/util-linux/setarch.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/util-linux/setarch.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -44,5 +44,5 @@
 		BB_EXECVP(argv[0], argv);
 	}
 
-	bb_perror_msg_and_die("%s", argv[0]);
+	bb_simple_perror_msg_and_die(argv[0]);
 }

Modified: trunk/busybox/util-linux/swaponoff.c
===================================================================
--- trunk/busybox/util-linux/swaponoff.c	2007-10-01 10:02:25 UTC (rev 20158)
+++ trunk/busybox/util-linux/swaponoff.c	2007-10-01 11:58:38 UTC (rev 20159)
@@ -31,7 +31,7 @@
 		status = swapoff(device);
 
 	if (status != 0) {
-		bb_perror_msg("%s", device);
+		bb_simple_perror_msg(device);
 		return 1;
 	}
 




More information about the busybox-cvs mailing list