Change calls to error_msg.* and strerror to use perror_msg.*.
diff --git a/applets/busybox.c b/applets/busybox.c
index e6f25af..0439fb5 100644
--- a/applets/busybox.c
+++ b/applets/busybox.c
@@ -54,7 +54,7 @@
 	if (len != -1) {
 		path[len] = 0;
 	} else {
-		error_msg("%s: %s\n", proc, strerror(errno));
+		perror_msg("%s", proc);
 		return NULL;
 	}
 	return strdup(path);
@@ -78,7 +78,7 @@
 		rc = Link(busybox, command);
 
 		if (rc) {
-			error_msg("%s: %s\n", command, strerror(errno));
+			perror_msg("%s", command);
 		}
 	}
 }
diff --git a/archival/tar.c b/archival/tar.c
index e1beee1..c6a2a66 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -317,7 +317,7 @@
 		else
 			tarFd = open(tarName, O_RDONLY);
 		if (tarFd < 0)
-			error_msg_and_die( "Error opening '%s': %s\n", tarName, strerror(errno));
+			perror_msg_and_die("Error opening '%s'", tarName);
 
 #ifdef BB_FEATURE_TAR_GZIP	
 		/* unzip tarFd in a seperate process */
@@ -425,8 +425,7 @@
 		return( TRUE);
 
 	if (create_path(header->name, header->mode) != TRUE) {
-		error_msg("%s: Cannot mkdir: %s\n", 
-				header->name, strerror(errno)); 
+		perror_msg("%s: Cannot mkdir", header->name); 
 		return( FALSE);
 	}
 	/* make the final component, just in case it was
@@ -445,8 +444,8 @@
 		return( TRUE);
 
 	if (link(header->linkname, header->name) < 0) {
-		error_msg("%s: Cannot create hard link to '%s': %s\n", 
-				header->name, header->linkname, strerror(errno)); 
+		perror_msg("%s: Cannot create hard link to '%s'", header->name,
+				header->linkname); 
 		return( FALSE);
 	}
 
@@ -463,8 +462,8 @@
 
 #ifdef	S_ISLNK
 	if (symlink(header->linkname, header->name) < 0) {
-		error_msg("%s: Cannot create symlink to '%s': %s\n", 
-				header->name, header->linkname, strerror(errno)); 
+		perror_msg("%s: Cannot create symlink to '%s'", header->name,
+				header->linkname); 
 		return( FALSE);
 	}
 	/* Try to change ownership of the symlink.
@@ -493,14 +492,12 @@
 
 	if (S_ISCHR(header->mode) || S_ISBLK(header->mode) || S_ISSOCK(header->mode)) {
 		if (mknod(header->name, header->mode, makedev(header->devmajor, header->devminor)) < 0) {
-			error_msg("%s: Cannot mknod: %s\n",
-				header->name, strerror(errno)); 
+			perror_msg("%s: Cannot mknod", header->name); 
 			return( FALSE);
 		}
 	} else if (S_ISFIFO(header->mode)) {
 		if (mkfifo(header->name, header->mode) < 0) {
-			error_msg("%s: Cannot mkfifo: %s\n",
-				header->name, strerror(errno)); 
+			perror_msg("%s: Cannot mkfifo", header->name); 
 			return( FALSE);
 		}
 	}
@@ -790,7 +787,7 @@
 	close(tarFd);
 	if (status > 0) {
 		/* Bummer - we read a partial header */
-		error_msg( "Error reading tar file: %s\n", strerror(errno));
+		perror_msg("Error reading tar file");
 		return ( FALSE);
 	}
 	else if (errorFlag==TRUE) {
@@ -1007,7 +1004,7 @@
 		header.typeflag  = SYMTYPE;
 		link_size = readlink(fileName, buffer, sizeof(buffer) - 1);
 		if ( link_size < 0) {
-			error_msg("Error reading symlink '%s': %s\n", header.name, strerror(errno));
+			perror_msg("Error reading symlink '%s'", header.name);
 			return ( FALSE);
 		}
 		buffer[link_size] = '\0';
@@ -1165,7 +1162,7 @@
 	else
 		tbInfo.tarFd = open (tarName, O_WRONLY | O_CREAT | O_TRUNC, 0644);
 	if (tbInfo.tarFd < 0) {
-		error_msg( "Error opening '%s': %s\n", tarName, strerror(errno));
+		perror_msg( "Error opening '%s'", tarName);
 		freeHardLinkInfo(&tbInfo.hlInfoHead);
 		return ( FALSE);
 	}
diff --git a/busybox.c b/busybox.c
index e6f25af..0439fb5 100644
--- a/busybox.c
+++ b/busybox.c
@@ -54,7 +54,7 @@
 	if (len != -1) {
 		path[len] = 0;
 	} else {
-		error_msg("%s: %s\n", proc, strerror(errno));
+		perror_msg("%s", proc);
 		return NULL;
 	}
 	return strdup(path);
@@ -78,7 +78,7 @@
 		rc = Link(busybox, command);
 
 		if (rc) {
-			error_msg("%s: %s\n", command, strerror(errno));
+			perror_msg("%s", command);
 		}
 	}
 }
diff --git a/chroot.c b/chroot.c
index 34daf7f..91d3407 100644
--- a/chroot.c
+++ b/chroot.c
@@ -38,7 +38,7 @@
 	argv++;
 
 	if (chroot(*argv) || (chdir("/"))) {
-		error_msg_and_die("cannot change root directory to %s: %s\n", *argv, strerror(errno));
+		perror_msg_and_die("cannot change root directory to %s", *argv);
 	}
 
 	argc--;
@@ -57,7 +57,7 @@
 		return EXIT_SUCCESS;
 #endif
 	}
-	error_msg_and_die("cannot execute %s: %s\n", prog, strerror(errno));
+	perror_msg_and_die("cannot execute %s", prog);
 
 }
 
diff --git a/console-tools/dumpkmap.c b/console-tools/dumpkmap.c
index 3ff5ef6..c5a2ea7 100644
--- a/console-tools/dumpkmap.c
+++ b/console-tools/dumpkmap.c
@@ -50,7 +50,7 @@
 
 	fd = open("/dev/tty0", O_RDWR);
 	if (fd < 0) {
-		error_msg("Error opening /dev/tty0: %s\n", strerror(errno));
+		perror_msg("Error opening /dev/tty0");
 		return EXIT_FAILURE;
 	}
 
diff --git a/console-tools/loadacm.c b/console-tools/loadacm.c
index a696640..52702bf 100644
--- a/console-tools/loadacm.c
+++ b/console-tools/loadacm.c
@@ -39,13 +39,11 @@
 
 	fd = open("/dev/tty", O_RDWR);
 	if (fd < 0) {
-		error_msg("Error opening /dev/tty1: %s\n", strerror(errno));
-		return EXIT_FAILURE;
+		perror_msg_and_die("Error opening /dev/tty1");
 	}
 
 	if (screen_map_load(fd, stdin)) {
-		error_msg("Error loading acm: %s\n", strerror(errno));
-		return EXIT_FAILURE;
+		perror_msg_and_die("Error loading acm");
 	}
 
 	write(fd, "\033(K", 3);
diff --git a/coreutils/chroot.c b/coreutils/chroot.c
index 34daf7f..91d3407 100644
--- a/coreutils/chroot.c
+++ b/coreutils/chroot.c
@@ -38,7 +38,7 @@
 	argv++;
 
 	if (chroot(*argv) || (chdir("/"))) {
-		error_msg_and_die("cannot change root directory to %s: %s\n", *argv, strerror(errno));
+		perror_msg_and_die("cannot change root directory to %s", *argv);
 	}
 
 	argc--;
@@ -57,7 +57,7 @@
 		return EXIT_SUCCESS;
 #endif
 	}
-	error_msg_and_die("cannot execute %s: %s\n", prog, strerror(errno));
+	perror_msg_and_die("cannot execute %s", prog);
 
 }
 
diff --git a/coreutils/cut.c b/coreutils/cut.c
index 8b31996..62f9e87 100644
--- a/coreutils/cut.c
+++ b/coreutils/cut.c
@@ -234,7 +234,7 @@
 		for (i = optind; i < argc; i++) {
 			file = fopen(argv[i], "r");
 			if (file == NULL) {
-				error_msg("%s: %s\n", argv[i], strerror(errno));
+				perror_msg("%s", argv[i]);
 			} else {
 				cut_file(file);
 				fclose(file);
diff --git a/coreutils/head.c b/coreutils/head.c
index f3aef1b..6e05ede 100644
--- a/coreutils/head.c
+++ b/coreutils/head.c
@@ -80,7 +80,7 @@
 			}
 			head(len, fp);
 			if (errno) {
-				error_msg("%s: %s\n", argv[optind], strerror(errno));
+				perror_msg("%s", argv[optind]);
 				status = EXIT_FAILURE;
 				errno = 0;
 			}
diff --git a/coreutils/ls.c b/coreutils/ls.c
index 655dd7f..e44bd9b 100644
--- a/coreutils/ls.c
+++ b/coreutils/ls.c
@@ -181,7 +181,7 @@
 #ifdef BB_FEATURE_LS_FOLLOWLINKS
 	if (follow_links == TRUE) {
 		if (stat(cur->fullname, &cur->dstat)) {
-			error_msg("%s: %s\n", cur->fullname, strerror(errno));
+			perror_msg("%s", cur->fullname);
 			status = EXIT_FAILURE;
 			free(cur->fullname);
 			free(cur);
@@ -190,7 +190,7 @@
 	} else
 #endif
 	if (lstat(cur->fullname, &cur->dstat)) {
-		error_msg("%s: %s\n", cur->fullname, strerror(errno));
+		perror_msg("%s", cur->fullname);
 		status = EXIT_FAILURE;
 		free(cur->fullname);
 		free(cur);
@@ -511,7 +511,7 @@
 	nfiles= 0;
 	dir = opendir(path);
 	if (dir == NULL) {
-		error_msg("%s: %s\n", path, strerror(errno));
+		perror_msg("%s", path);
 		status = EXIT_FAILURE;
 		return(NULL);	/* could not open the dir */
 	}
diff --git a/coreutils/md5sum.c b/coreutils/md5sum.c
index 57fac74..ecc1458 100644
--- a/coreutils/md5sum.c
+++ b/coreutils/md5sum.c
@@ -651,13 +651,13 @@
   } else {
     fp = fopen(filename, OPENOPTS(binary));
     if (fp == NULL) {
-      error_msg("%s: %s\n", filename, strerror(errno));
+      perror_msg("%s", filename);
       return FALSE;
     }
   }
 
   if (md5_stream(fp, md5_result)) {
-    error_msg("%s: %s\n", filename, strerror(errno));
+    perror_msg("%s", filename);
 
     if (fp != stdin)
       fclose(fp);
@@ -665,7 +665,7 @@
   }
 
   if (fp != stdin && fclose(fp) == EOF) {
-    error_msg("%s: %s\n", filename, strerror(errno));
+    perror_msg("%s", filename);
     return FALSE;
   }
 
@@ -689,7 +689,7 @@
   } else {
     checkfile_stream = fopen(checkfile_name, "r");
     if (checkfile_stream == NULL) {
-      error_msg("%s: %s\n", checkfile_name, strerror(errno));
+      perror_msg("%s", checkfile_name);
       return FALSE;
     }
   }
@@ -775,7 +775,7 @@
   }
 
   if (checkfile_stream != stdin && fclose(checkfile_stream) == EOF) {
-    error_msg("md5sum: %s: %s\n", checkfile_name, strerror(errno));
+    perror_msg("md5sum: %s", checkfile_name);
     return FALSE;
   }
 
diff --git a/coreutils/pwd.c b/coreutils/pwd.c
index 7173194..da089f3 100644
--- a/coreutils/pwd.c
+++ b/coreutils/pwd.c
@@ -31,8 +31,8 @@
 	char buf[BUFSIZ + 1];
 
 	if (getcwd(buf, sizeof(buf)) == NULL)
-		error_msg_and_die("%s\n", strerror(errno));
+		perror_msg_and_die("getcwd");
 
-	printf("%s\n", buf);
+	puts(buf);
 	return EXIT_SUCCESS;
 }
diff --git a/coreutils/tee.c b/coreutils/tee.c
index 347684a..f0eca07 100644
--- a/coreutils/tee.c
+++ b/coreutils/tee.c
@@ -47,7 +47,7 @@
 	while (optind < argc) {
 		if ((files[nfiles++] = fopen(argv[optind++], mode)) == NULL) {
 			nfiles--;
-			error_msg("%s: %s\n", argv[optind-1], strerror(errno));
+			perror_msg("%s", argv[optind-1]);
 			status = 1;
 		}
 	}
diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c
index ff4a9d9..279b9d6 100644
--- a/coreutils/uudecode.c
+++ b/coreutils/uudecode.c
@@ -257,7 +257,7 @@
       && (freopen (outname, "w", stdout) == NULL
 	  || chmod (outname, mode & (S_IRWXU | S_IRWXG | S_IRWXO))
          )) {
-    error_msg("%s: %s %s\n", outname, inname, strerror(errno)); /* */
+    perror_msg("%s", outname); /* */
     return FALSE;
   }
 
@@ -302,7 +302,7 @@
         if (decode (argv[optind], outname) != 0)
           exit_status = FALSE;
       } else {
-        error_msg("%s: %s\n", argv[optind], strerror(errno));
+        perror_msg("%s", argv[optind]);
         exit_status = EXIT_FAILURE;
       }
       optind++;
diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c
index 41e6590..36bc497 100644
--- a/coreutils/uuencode.c
+++ b/coreutils/uuencode.c
@@ -160,15 +160,12 @@
   trans_ptr = uu_std;      /* Standard encoding is old uu format */
 
   /* Parse any options */
-  while ((opt = getopt (argc, argv, "m")) != EOF) {
+  while ((opt = getopt (argc, argv, "m")) > 0) {
     switch (opt) {
      case 'm':
       trans_ptr = uu_base64;
       break;
 
-     case 0:
-      break;
-
      default:
       usage(uuencode_usage);
     }
@@ -178,7 +175,7 @@
    case 2:
     /* Optional first argument is input file.  */
     if (!freopen (argv[optind], "r", stdin) || fstat (fileno (stdin), &sb)) {
-      error_msg("%s: %s\n", argv[optind], strerror(errno));
+      perror_msg("%s", argv[optind]);
       return EXIT_FAILURE;
     }
     mode = sb.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO);
diff --git a/cp_mv.c b/cp_mv.c
index b334206..0b32882 100644
--- a/cp_mv.c
+++ b/cp_mv.c
@@ -130,8 +130,7 @@
 	if (mv_Action_first_time && (dz_i == is_mv)) {
 		mv_Action_first_time = errno = 0;
 		if (rename(fileName, destName) < 0 && errno != EXDEV) {
-			error_msg("rename(%s, %s): %s\n", fileName, destName, 
-					strerror(errno));
+			perror_msg("rename(%s, %s)", fileName, destName);
 			goto do_copyFile;	/* Try anyway... */
 		}
 		else if (errno == EXDEV)
@@ -143,7 +142,7 @@
 	if (preserveFlag == TRUE && statbuf->st_nlink > 1) {
 		if (is_in_ino_dev_hashtable(statbuf, &name)) {
 			if (link(name, destName) < 0) {
-				error_msg("link(%s, %s): %s\n", name, destName, strerror(errno));
+				perror_msg("link(%s, %s)", name, destName);
 				return FALSE;
 			}
 			return TRUE;
@@ -162,11 +161,11 @@
 
 	if (S_ISDIR(statbuf->st_mode)) {
 		if (rmdir(fileName) < 0) {
-			error_msg("rmdir(%s): %s\n", fileName, strerror(errno));
+			perror_msg("rmdir(%s)", fileName);
 			status = FALSE;
 		}
 	} else if (unlink(fileName) < 0) {
-		error_msg("unlink(%s): %s\n", fileName, strerror(errno));
+		perror_msg("unlink(%s)", fileName);
 		status = FALSE;
 	}
 	return status;
@@ -260,20 +259,20 @@
 			char		*pushd, *d, *p;
 
 			if ((pushd = getcwd(NULL, BUFSIZ + 1)) == NULL) {
-				error_msg("getcwd(): %s\n", strerror(errno));
+				perror_msg("getcwd()");
 				continue;
 			}
 			if (chdir(baseDestName) < 0) {
-				error_msg("chdir(%s): %s\n", baseSrcName, strerror(errno));
+				perror_msg("chdir(%s)", baseSrcName);
 				continue;
 			}
 			if ((d = getcwd(NULL, BUFSIZ + 1)) == NULL) {
-				error_msg("getcwd(): %s\n", strerror(errno));
+				perror_msg("getcwd()");
 				continue;
 			}
 			while (!state && *d != '\0') {
 				if (stat(d, &sb) < 0) {	/* stat not lstat - always dereference targets */
-					error_msg("stat(%s): %s\n", d, strerror(errno));
+					perror_msg("stat(%s)", d);
 					state = -1;
 					continue;
 				}
@@ -290,7 +289,7 @@
 				}
 			}
 			if (chdir(pushd) < 0) {
-				error_msg("chdir(%s): %s\n", pushd, strerror(errno));
+				perror_msg("chdir(%s)", pushd);
 				free(pushd);
 				free(d);
 				continue;
diff --git a/cut.c b/cut.c
index 8b31996..62f9e87 100644
--- a/cut.c
+++ b/cut.c
@@ -234,7 +234,7 @@
 		for (i = optind; i < argc; i++) {
 			file = fopen(argv[i], "r");
 			if (file == NULL) {
-				error_msg("%s: %s\n", argv[i], strerror(errno));
+				perror_msg("%s", argv[i]);
 			} else {
 				cut_file(file);
 				fclose(file);
diff --git a/dumpkmap.c b/dumpkmap.c
index 3ff5ef6..c5a2ea7 100644
--- a/dumpkmap.c
+++ b/dumpkmap.c
@@ -50,7 +50,7 @@
 
 	fd = open("/dev/tty0", O_RDWR);
 	if (fd < 0) {
-		error_msg("Error opening /dev/tty0: %s\n", strerror(errno));
+		perror_msg("Error opening /dev/tty0");
 		return EXIT_FAILURE;
 	}
 
diff --git a/editors/sed.c b/editors/sed.c
index 812f621..a7152e5 100644
--- a/editors/sed.c
+++ b/editors/sed.c
@@ -757,7 +757,7 @@
 		for (i = optind; i < argc; i++) {
 			file = fopen(argv[i], "r");
 			if (file == NULL) {
-				error_msg("%s: %s\n", argv[i], strerror(errno));
+				perror_msg("%s", argv[i]);
 			} else {
 				process_file(file);
 				fclose(file);
diff --git a/findutils/grep.c b/findutils/grep.c
index 9014443..8333661 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -169,7 +169,7 @@
 			file = fopen(cur_file, "r");
 			if (file == NULL) {
 				if (!suppress_err_msgs)
-					error_msg("%s: %s\n", cur_file, strerror(errno));
+					perror_msg("%s", cur_file);
 			}
 			else {
 				grep_file(file);
diff --git a/freeramdisk.c b/freeramdisk.c
index a568cc6..a2b17c6 100644
--- a/freeramdisk.c
+++ b/freeramdisk.c
@@ -43,10 +43,10 @@
 	}
 
 	if ((f = open(argv[1], O_RDWR)) == -1) {
-		error_msg_and_die( "cannot open %s: %s\n", argv[1], strerror(errno));
+		perror_msg_and_die("cannot open %s", argv[1]);
 	}
 	if (ioctl(f, BLKFLSBUF) < 0) {
-		error_msg_and_die( "failed ioctl on %s: %s\n", argv[1], strerror(errno));
+		perror_msg_and_die("failed ioctl on %s", argv[1]);
 	}
 	/* Don't bother closing.  Exit does
 	 * that, so we can save a few bytes */
diff --git a/grep.c b/grep.c
index 9014443..8333661 100644
--- a/grep.c
+++ b/grep.c
@@ -169,7 +169,7 @@
 			file = fopen(cur_file, "r");
 			if (file == NULL) {
 				if (!suppress_err_msgs)
-					error_msg("%s: %s\n", cur_file, strerror(errno));
+					perror_msg("%s", cur_file);
 			}
 			else {
 				grep_file(file);
diff --git a/head.c b/head.c
index f3aef1b..6e05ede 100644
--- a/head.c
+++ b/head.c
@@ -80,7 +80,7 @@
 			}
 			head(len, fp);
 			if (errno) {
-				error_msg("%s: %s\n", argv[optind], strerror(errno));
+				perror_msg("%s", argv[optind]);
 				status = EXIT_FAILURE;
 				errno = 0;
 			}
diff --git a/insmod.c b/insmod.c
index f2f1e80..cbe00c2 100644
--- a/insmod.c
+++ b/insmod.c
@@ -78,7 +78,7 @@
 #ifndef MODUTILS_MODULE_H
 #define MODUTILS_MODULE_H 1
 
-#ident "$Id: insmod.c,v 1.32 2000/12/13 16:41:29 andersen Exp $"
+#ident "$Id: insmod.c,v 1.33 2000/12/18 03:57:16 kraai Exp $"
 
 /* This file contains the structures used by the 2.0 and 2.1 kernels.
    We do not use the kernel headers directly because we do not wish
@@ -284,7 +284,7 @@
 #ifndef MODUTILS_OBJ_H
 #define MODUTILS_OBJ_H 1
 
-#ident "$Id: insmod.c,v 1.32 2000/12/13 16:41:29 andersen Exp $"
+#ident "$Id: insmod.c,v 1.33 2000/12/18 03:57:16 kraai Exp $"
 
 /* The relocatable object is manipulated using elfin types.  */
 
@@ -1562,7 +1562,7 @@
 
 	nks = get_kernel_syms(NULL);
 	if (nks < 0) {
-		error_msg("get_kernel_syms: %s: %s\n", m_name, strerror(errno));
+		perror_msg("get_kernel_syms: %s", m_name);
 		return 0;
 	}
 
@@ -1743,7 +1743,7 @@
 							  m_size | (flag_autoclean ? OLD_MOD_AUTOCLEAN
 										: 0), &routines, symtab);
 	if (ret)
-		error_msg("init_module: %s: %s\n", m_name, strerror(errno));
+		perror_msg("init_module: %s", m_name);
 
 	free(image);
 	free(symtab);
@@ -2055,7 +2055,7 @@
 			module_names = xrealloc(module_names, bufsize = ret);
 			goto retry_modules_load;
 		}
-		error_msg("QM_MODULES: %s\n", strerror(errno));
+		perror_msg("QM_MODULES");
 		return 0;
 	}
 
@@ -2074,7 +2074,7 @@
 				/* The module was removed out from underneath us.  */
 				continue;
 			}
-			error_msg("query_module: QM_INFO: %s: %s\n", mn, strerror(errno));
+			perror_msg("query_module: QM_INFO: %s", mn);
 			return 0;
 		}
 
@@ -2089,7 +2089,7 @@
 				/* The module was removed out from underneath us.  */
 				continue;
 			default:
-				error_msg("query_module: QM_SYMBOLS: %s: %s\n", mn, strerror(errno));
+				perror_msg("query_module: QM_SYMBOLS: %s", mn);
 				return 0;
 			}
 		}
@@ -2114,7 +2114,7 @@
 			syms = xrealloc(syms, bufsize = ret);
 			goto retry_kern_sym_load;
 		}
-		error_msg("kernel: QM_SYMBOLS: %s\n", strerror(errno));
+		perror_msg("kernel: QM_SYMBOLS");
 		return 0;
 	}
 	nksyms = nsyms = ret;
@@ -2295,7 +2295,7 @@
 
 	ret = new_sys_init_module(m_name, (struct new_module *) image);
 	if (ret)
-		error_msg("init_module: %s: %s\n", m_name, strerror(errno));
+		perror_msg("init_module: %s", m_name);
 
 	free(image);
 
@@ -2680,7 +2680,7 @@
 
 	fseek(fp, 0, SEEK_SET);
 	if (fread(&f->header, sizeof(f->header), 1, fp) != 1) {
-		error_msg("error reading ELF header: %s\n", strerror(errno));
+		perror_msg("error reading ELF header");
 		return NULL;
 	}
 
@@ -2719,7 +2719,7 @@
 	section_headers = alloca(sizeof(ElfW(Shdr)) * shnum);
 	fseek(fp, f->header.e_shoff, SEEK_SET);
 	if (fread(section_headers, sizeof(ElfW(Shdr)), shnum, fp) != shnum) {
-		error_msg("error reading ELF section headers: %s\n", strerror(errno));
+		perror_msg("error reading ELF section headers");
 		return NULL;
 	}
 
@@ -2749,7 +2749,7 @@
 				sec->contents = xmalloc(sec->header.sh_size);
 				fseek(fp, sec->header.sh_offset, SEEK_SET);
 				if (fread(sec->contents, sec->header.sh_size, 1, fp) != 1) {
-					error_msg("error reading ELF section data: %s\n", strerror(errno));
+					perror_msg("error reading ELF section data");
 					return NULL;
 				}
 			} else {
@@ -3075,7 +3075,7 @@
 				m_size);
 		goto out;
 	default:
-		error_msg("create_module: %s: %s\n", m_name, strerror(errno));
+		perror_msg("create_module: %s", m_name);
 		goto out;
 	}
 
diff --git a/kill.c b/kill.c
index caaa52a..8fa9da7 100644
--- a/kill.c
+++ b/kill.c
@@ -204,10 +204,10 @@
 			int pid;
 
 			if (!isdigit(**argv))
-				error_msg_and_die( "Bad PID: %s\n", strerror(errno));
+				perror_msg_and_die( "Bad PID");
 			pid = strtol(*argv, NULL, 0);
 			if (kill(pid, sig) != 0) 
-				error_msg_and_die( "Could not kill pid '%d': %s\n", pid, strerror(errno));
+				perror_msg_and_die( "Could not kill pid '%d'", pid);
 			argv++;
 		}
 	} 
@@ -229,7 +229,7 @@
 				if (*pidList==myPid)
 					continue;
 				if (kill(*pidList, sig) != 0) 
-					error_msg_and_die( "Could not kill pid '%d': %s\n", *pidList, strerror(errno));
+					perror_msg_and_die( "Could not kill pid '%d'", *pidList);
 			}
 			/* Note that we don't bother to free the memory
 			 * allocated in find_pid_by_name().  It will be freed
diff --git a/loadacm.c b/loadacm.c
index a696640..52702bf 100644
--- a/loadacm.c
+++ b/loadacm.c
@@ -39,13 +39,11 @@
 
 	fd = open("/dev/tty", O_RDWR);
 	if (fd < 0) {
-		error_msg("Error opening /dev/tty1: %s\n", strerror(errno));
-		return EXIT_FAILURE;
+		perror_msg_and_die("Error opening /dev/tty1");
 	}
 
 	if (screen_map_load(fd, stdin)) {
-		error_msg("Error loading acm: %s\n", strerror(errno));
-		return EXIT_FAILURE;
+		perror_msg_and_die("Error loading acm");
 	}
 
 	write(fd, "\033(K", 3);
diff --git a/ls.c b/ls.c
index 655dd7f..e44bd9b 100644
--- a/ls.c
+++ b/ls.c
@@ -181,7 +181,7 @@
 #ifdef BB_FEATURE_LS_FOLLOWLINKS
 	if (follow_links == TRUE) {
 		if (stat(cur->fullname, &cur->dstat)) {
-			error_msg("%s: %s\n", cur->fullname, strerror(errno));
+			perror_msg("%s", cur->fullname);
 			status = EXIT_FAILURE;
 			free(cur->fullname);
 			free(cur);
@@ -190,7 +190,7 @@
 	} else
 #endif
 	if (lstat(cur->fullname, &cur->dstat)) {
-		error_msg("%s: %s\n", cur->fullname, strerror(errno));
+		perror_msg("%s", cur->fullname);
 		status = EXIT_FAILURE;
 		free(cur->fullname);
 		free(cur);
@@ -511,7 +511,7 @@
 	nfiles= 0;
 	dir = opendir(path);
 	if (dir == NULL) {
-		error_msg("%s: %s\n", path, strerror(errno));
+		perror_msg("%s", path);
 		status = EXIT_FAILURE;
 		return(NULL);	/* could not open the dir */
 	}
diff --git a/md5sum.c b/md5sum.c
index 57fac74..ecc1458 100644
--- a/md5sum.c
+++ b/md5sum.c
@@ -651,13 +651,13 @@
   } else {
     fp = fopen(filename, OPENOPTS(binary));
     if (fp == NULL) {
-      error_msg("%s: %s\n", filename, strerror(errno));
+      perror_msg("%s", filename);
       return FALSE;
     }
   }
 
   if (md5_stream(fp, md5_result)) {
-    error_msg("%s: %s\n", filename, strerror(errno));
+    perror_msg("%s", filename);
 
     if (fp != stdin)
       fclose(fp);
@@ -665,7 +665,7 @@
   }
 
   if (fp != stdin && fclose(fp) == EOF) {
-    error_msg("%s: %s\n", filename, strerror(errno));
+    perror_msg("%s", filename);
     return FALSE;
   }
 
@@ -689,7 +689,7 @@
   } else {
     checkfile_stream = fopen(checkfile_name, "r");
     if (checkfile_stream == NULL) {
-      error_msg("%s: %s\n", checkfile_name, strerror(errno));
+      perror_msg("%s", checkfile_name);
       return FALSE;
     }
   }
@@ -775,7 +775,7 @@
   }
 
   if (checkfile_stream != stdin && fclose(checkfile_stream) == EOF) {
-    error_msg("md5sum: %s: %s\n", checkfile_name, strerror(errno));
+    perror_msg("md5sum: %s", checkfile_name);
     return FALSE;
   }
 
diff --git a/miscutils/readlink.c b/miscutils/readlink.c
index bb40b07..bb2056a 100644
--- a/miscutils/readlink.c
+++ b/miscutils/readlink.c
@@ -39,7 +39,7 @@
 		buf = xrealloc(buf, bufsize);
 		size = readlink(argv[1], buf, bufsize);
 		if (size == -1)
-			error_msg_and_die("%s: %s\n", argv[1], strerror(errno));
+			perror_msg_and_die("%s", argv[1]);
 	}
 
 	buf[size] = '\0';
diff --git a/modutils/insmod.c b/modutils/insmod.c
index f2f1e80..cbe00c2 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -78,7 +78,7 @@
 #ifndef MODUTILS_MODULE_H
 #define MODUTILS_MODULE_H 1
 
-#ident "$Id: insmod.c,v 1.32 2000/12/13 16:41:29 andersen Exp $"
+#ident "$Id: insmod.c,v 1.33 2000/12/18 03:57:16 kraai Exp $"
 
 /* This file contains the structures used by the 2.0 and 2.1 kernels.
    We do not use the kernel headers directly because we do not wish
@@ -284,7 +284,7 @@
 #ifndef MODUTILS_OBJ_H
 #define MODUTILS_OBJ_H 1
 
-#ident "$Id: insmod.c,v 1.32 2000/12/13 16:41:29 andersen Exp $"
+#ident "$Id: insmod.c,v 1.33 2000/12/18 03:57:16 kraai Exp $"
 
 /* The relocatable object is manipulated using elfin types.  */
 
@@ -1562,7 +1562,7 @@
 
 	nks = get_kernel_syms(NULL);
 	if (nks < 0) {
-		error_msg("get_kernel_syms: %s: %s\n", m_name, strerror(errno));
+		perror_msg("get_kernel_syms: %s", m_name);
 		return 0;
 	}
 
@@ -1743,7 +1743,7 @@
 							  m_size | (flag_autoclean ? OLD_MOD_AUTOCLEAN
 										: 0), &routines, symtab);
 	if (ret)
-		error_msg("init_module: %s: %s\n", m_name, strerror(errno));
+		perror_msg("init_module: %s", m_name);
 
 	free(image);
 	free(symtab);
@@ -2055,7 +2055,7 @@
 			module_names = xrealloc(module_names, bufsize = ret);
 			goto retry_modules_load;
 		}
-		error_msg("QM_MODULES: %s\n", strerror(errno));
+		perror_msg("QM_MODULES");
 		return 0;
 	}
 
@@ -2074,7 +2074,7 @@
 				/* The module was removed out from underneath us.  */
 				continue;
 			}
-			error_msg("query_module: QM_INFO: %s: %s\n", mn, strerror(errno));
+			perror_msg("query_module: QM_INFO: %s", mn);
 			return 0;
 		}
 
@@ -2089,7 +2089,7 @@
 				/* The module was removed out from underneath us.  */
 				continue;
 			default:
-				error_msg("query_module: QM_SYMBOLS: %s: %s\n", mn, strerror(errno));
+				perror_msg("query_module: QM_SYMBOLS: %s", mn);
 				return 0;
 			}
 		}
@@ -2114,7 +2114,7 @@
 			syms = xrealloc(syms, bufsize = ret);
 			goto retry_kern_sym_load;
 		}
-		error_msg("kernel: QM_SYMBOLS: %s\n", strerror(errno));
+		perror_msg("kernel: QM_SYMBOLS");
 		return 0;
 	}
 	nksyms = nsyms = ret;
@@ -2295,7 +2295,7 @@
 
 	ret = new_sys_init_module(m_name, (struct new_module *) image);
 	if (ret)
-		error_msg("init_module: %s: %s\n", m_name, strerror(errno));
+		perror_msg("init_module: %s", m_name);
 
 	free(image);
 
@@ -2680,7 +2680,7 @@
 
 	fseek(fp, 0, SEEK_SET);
 	if (fread(&f->header, sizeof(f->header), 1, fp) != 1) {
-		error_msg("error reading ELF header: %s\n", strerror(errno));
+		perror_msg("error reading ELF header");
 		return NULL;
 	}
 
@@ -2719,7 +2719,7 @@
 	section_headers = alloca(sizeof(ElfW(Shdr)) * shnum);
 	fseek(fp, f->header.e_shoff, SEEK_SET);
 	if (fread(section_headers, sizeof(ElfW(Shdr)), shnum, fp) != shnum) {
-		error_msg("error reading ELF section headers: %s\n", strerror(errno));
+		perror_msg("error reading ELF section headers");
 		return NULL;
 	}
 
@@ -2749,7 +2749,7 @@
 				sec->contents = xmalloc(sec->header.sh_size);
 				fseek(fp, sec->header.sh_offset, SEEK_SET);
 				if (fread(sec->contents, sec->header.sh_size, 1, fp) != 1) {
-					error_msg("error reading ELF section data: %s\n", strerror(errno));
+					perror_msg("error reading ELF section data");
 					return NULL;
 				}
 			} else {
@@ -3075,7 +3075,7 @@
 				m_size);
 		goto out;
 	default:
-		error_msg("create_module: %s: %s\n", m_name, strerror(errno));
+		perror_msg("create_module: %s", m_name);
 		goto out;
 	}
 
diff --git a/mount.c b/mount.c
index 06673f9..8240b99 100644
--- a/mount.c
+++ b/mount.c
@@ -271,18 +271,18 @@
 		/* open device */ 
 		fd = open(device, O_RDONLY);
 		if (fd < 0)
-			error_msg_and_die("open failed for `%s': %s\n", device, strerror (errno));
+			perror_msg_and_die("open failed for `%s'", device);
 
 		/* How many filesystems?  We need to know to allocate enough space */
 		numfilesystems = ioctl (fd, DEVMTAB_COUNT_FILESYSTEMS);
 		if (numfilesystems<0)
-			error_msg_and_die("\nDEVMTAB_COUNT_FILESYSTEMS: %s\n", strerror (errno));
+			perror_msg_and_die("\nDEVMTAB_COUNT_FILESYSTEMS");
 		fslist = (struct k_fstype *) xcalloc ( numfilesystems, sizeof(struct k_fstype));
 
 		/* Grab the list of available filesystems */
 		status = ioctl (fd, DEVMTAB_GET_FILESYSTEMS, fslist);
 		if (status<0)
-			error_msg_and_die("\nDEVMTAB_GET_FILESYSTEMS: %s\n", strerror (errno));
+			perror_msg_and_die("\nDEVMTAB_GET_FILESYSTEMS");
 
 		/* Walk the list trying to mount filesystems 
 		 * that do not claim to be nodev filesystems */
@@ -307,8 +307,7 @@
 
 	if (status == FALSE) {
 		if (whineOnErrors == TRUE) {
-			error_msg("Mounting %s on %s failed: %s\n",
-					blockDevice, directory, strerror(errno));
+			perror_msg("Mounting %s on %s failed", blockDevice, directory);
 		}
 		return (FALSE);
 	}
@@ -340,18 +339,18 @@
 		/* open device */ 
 		fd = open(device, O_RDONLY);
 		if (fd < 0)
-			error_msg_and_die("open failed for `%s': %s\n", device, strerror (errno));
+			perror_msg_and_die("open failed for `%s'", device);
 
 		/* How many mounted filesystems?  We need to know to 
 		 * allocate enough space for later... */
 		numfilesystems = ioctl (fd, DEVMTAB_COUNT_MOUNTS);
 		if (numfilesystems<0)
-			error_msg_and_die( "\nDEVMTAB_COUNT_MOUNTS: %s\n", strerror (errno));
+			perror_msg_and_die( "\nDEVMTAB_COUNT_MOUNTS");
 		mntentlist = (struct k_mntent *) xcalloc ( numfilesystems, sizeof(struct k_mntent));
 		
 		/* Grab the list of mounted filesystems */
 		if (ioctl (fd, DEVMTAB_GET_MOUNTS, mntentlist)<0)
-			error_msg_and_die( "\nDEVMTAB_GET_MOUNTS: %s\n", strerror (errno));
+			perror_msg_and_die( "\nDEVMTAB_GET_MOUNTS");
 
 		for( i = 0 ; i < numfilesystems ; i++) {
 			fprintf( stdout, "%s %s %s %s %d %d\n", mntentlist[i].mnt_fsname,
@@ -453,7 +452,7 @@
 		fstabmount = TRUE;
 
 		if (f == NULL)
-			error_msg_and_die( "\nCannot read /etc/fstab: %s\n", strerror (errno));
+			perror_msg_and_die( "\nCannot read /etc/fstab");
 
 		while ((m = getmntent(f)) != NULL) {
 			if (all == FALSE && directory == NULL && (
@@ -487,7 +486,7 @@
 				rc = nfsmount (device, directory, &flags,
 					&extra_opts, &string_flags, 1);
 				if ( rc != 0) {
-					error_msg_and_die("nfsmount failed: %s\n", strerror(errno));	
+					perror_msg_and_die("nfsmount failed");	
 					rc = EXIT_FAILURE;
 				}
 			}
diff --git a/networking/ping.c b/networking/ping.c
index ccc535b..4be2120 100644
--- a/networking/ping.c
+++ b/networking/ping.c
@@ -1,6 +1,6 @@
 /* vi: set sw=4 ts=4: */
 /*
- * $Id: ping.c,v 1.28 2000/12/07 19:56:48 markw Exp $
+ * $Id: ping.c,v 1.29 2000/12/18 03:57:16 kraai Exp $
  * Mini ping implementation for busybox
  *
  * Copyright (C) 1999 by Randolph Chung <tausq@debian.org>
@@ -325,7 +325,7 @@
 			   (struct sockaddr *) &pingaddr, sizeof(struct sockaddr_in));
 
 	if (i < 0)
-		error_msg_and_die("sendto: %s\n", strerror(errno));
+		perror_msg_and_die("sendto");
 	else if ((size_t)i != sizeof(packet))
 		error_msg_and_die("ping wrote %d chars; %d expected\n", i,
 			   (int)sizeof(packet));
diff --git a/networking/telnet.c b/networking/telnet.c
index 7a7bcfb..fff8c06 100644
--- a/networking/telnet.c
+++ b/networking/telnet.c
@@ -650,7 +650,7 @@
 
 	if (connect(s, (struct sockaddr *)&s_addr, sizeof s_addr) < 0)
 	{
-		error_msg_and_die("Unable to connect to remote host: %s\n", strerror(errno));
+		perror_msg_and_die("Unable to connect to remote host");
 	}
 	return s;
 }
diff --git a/ping.c b/ping.c
index ccc535b..4be2120 100644
--- a/ping.c
+++ b/ping.c
@@ -1,6 +1,6 @@
 /* vi: set sw=4 ts=4: */
 /*
- * $Id: ping.c,v 1.28 2000/12/07 19:56:48 markw Exp $
+ * $Id: ping.c,v 1.29 2000/12/18 03:57:16 kraai Exp $
  * Mini ping implementation for busybox
  *
  * Copyright (C) 1999 by Randolph Chung <tausq@debian.org>
@@ -325,7 +325,7 @@
 			   (struct sockaddr *) &pingaddr, sizeof(struct sockaddr_in));
 
 	if (i < 0)
-		error_msg_and_die("sendto: %s\n", strerror(errno));
+		perror_msg_and_die("sendto");
 	else if ((size_t)i != sizeof(packet))
 		error_msg_and_die("ping wrote %d chars; %d expected\n", i,
 			   (int)sizeof(packet));
diff --git a/procps/kill.c b/procps/kill.c
index caaa52a..8fa9da7 100644
--- a/procps/kill.c
+++ b/procps/kill.c
@@ -204,10 +204,10 @@
 			int pid;
 
 			if (!isdigit(**argv))
-				error_msg_and_die( "Bad PID: %s\n", strerror(errno));
+				perror_msg_and_die( "Bad PID");
 			pid = strtol(*argv, NULL, 0);
 			if (kill(pid, sig) != 0) 
-				error_msg_and_die( "Could not kill pid '%d': %s\n", pid, strerror(errno));
+				perror_msg_and_die( "Could not kill pid '%d'", pid);
 			argv++;
 		}
 	} 
@@ -229,7 +229,7 @@
 				if (*pidList==myPid)
 					continue;
 				if (kill(*pidList, sig) != 0) 
-					error_msg_and_die( "Could not kill pid '%d': %s\n", *pidList, strerror(errno));
+					perror_msg_and_die( "Could not kill pid '%d'", *pidList);
 			}
 			/* Note that we don't bother to free the memory
 			 * allocated in find_pid_by_name().  It will be freed
diff --git a/procps/ps.c b/procps/ps.c
index 357ece3..2b41a49 100644
--- a/procps/ps.c
+++ b/procps/ps.c
@@ -216,11 +216,11 @@
 	/* open device */ 
 	fd = open(device, O_RDONLY);
 	if (fd < 0) 
-		error_msg_and_die( "open failed for `%s': %s\n", device, strerror (errno));
+		perror_msg_and_die( "open failed for `%s'", device);
 
 	/* Find out how many processes there are */
 	if (ioctl (fd, DEVPS_GET_NUM_PIDS, &num_pids)<0) 
-		error_msg_and_die( "\nDEVPS_GET_PID_LIST: %s\n", strerror (errno));
+		perror_msg_and_die( "\nDEVPS_GET_PID_LIST");
 	
 	/* Allocate some memory -- grab a few extras just in case 
 	 * some new processes start up while we wait. The kernel will
@@ -231,7 +231,7 @@
 
 	/* Now grab the pid list */
 	if (ioctl (fd, DEVPS_GET_PID_LIST, pid_array)<0) 
-		error_msg_and_die("\nDEVPS_GET_PID_LIST: %s\n", strerror (errno));
+		perror_msg_and_die("\nDEVPS_GET_PID_LIST");
 
 #ifdef BB_FEATURE_AUTOWIDTH
 		ioctl(fileno(stdout), TIOCGWINSZ, &win);
@@ -247,7 +247,7 @@
 	    info.pid = pid_array[i];
 
 	    if (ioctl (fd, DEVPS_GET_PID_INFO, &info)<0)
-			error_msg_and_die("\nDEVPS_GET_PID_INFO: %s\n", strerror (errno));
+			perror_msg_and_die("\nDEVPS_GET_PID_INFO");
 	    
 		/* Make some adjustments as needed */
 		my_getpwuid(uidName, info.euid);
@@ -277,7 +277,7 @@
 
 	/* close device */
 	if (close (fd) != 0) 
-		error_msg_and_die("close failed for `%s': %s\n", device, strerror (errno));
+		perror_msg_and_die("close failed for `%s'", device);
  
 	exit (0);
 }
diff --git a/ps.c b/ps.c
index 357ece3..2b41a49 100644
--- a/ps.c
+++ b/ps.c
@@ -216,11 +216,11 @@
 	/* open device */ 
 	fd = open(device, O_RDONLY);
 	if (fd < 0) 
-		error_msg_and_die( "open failed for `%s': %s\n", device, strerror (errno));
+		perror_msg_and_die( "open failed for `%s'", device);
 
 	/* Find out how many processes there are */
 	if (ioctl (fd, DEVPS_GET_NUM_PIDS, &num_pids)<0) 
-		error_msg_and_die( "\nDEVPS_GET_PID_LIST: %s\n", strerror (errno));
+		perror_msg_and_die( "\nDEVPS_GET_PID_LIST");
 	
 	/* Allocate some memory -- grab a few extras just in case 
 	 * some new processes start up while we wait. The kernel will
@@ -231,7 +231,7 @@
 
 	/* Now grab the pid list */
 	if (ioctl (fd, DEVPS_GET_PID_LIST, pid_array)<0) 
-		error_msg_and_die("\nDEVPS_GET_PID_LIST: %s\n", strerror (errno));
+		perror_msg_and_die("\nDEVPS_GET_PID_LIST");
 
 #ifdef BB_FEATURE_AUTOWIDTH
 		ioctl(fileno(stdout), TIOCGWINSZ, &win);
@@ -247,7 +247,7 @@
 	    info.pid = pid_array[i];
 
 	    if (ioctl (fd, DEVPS_GET_PID_INFO, &info)<0)
-			error_msg_and_die("\nDEVPS_GET_PID_INFO: %s\n", strerror (errno));
+			perror_msg_and_die("\nDEVPS_GET_PID_INFO");
 	    
 		/* Make some adjustments as needed */
 		my_getpwuid(uidName, info.euid);
@@ -277,7 +277,7 @@
 
 	/* close device */
 	if (close (fd) != 0) 
-		error_msg_and_die("close failed for `%s': %s\n", device, strerror (errno));
+		perror_msg_and_die("close failed for `%s'", device);
  
 	exit (0);
 }
diff --git a/pwd.c b/pwd.c
index 7173194..da089f3 100644
--- a/pwd.c
+++ b/pwd.c
@@ -31,8 +31,8 @@
 	char buf[BUFSIZ + 1];
 
 	if (getcwd(buf, sizeof(buf)) == NULL)
-		error_msg_and_die("%s\n", strerror(errno));
+		perror_msg_and_die("getcwd");
 
-	printf("%s\n", buf);
+	puts(buf);
 	return EXIT_SUCCESS;
 }
diff --git a/rdate.c b/rdate.c
index 87edecb..03f7f2d 100644
--- a/rdate.c
+++ b/rdate.c
@@ -47,15 +47,15 @@
 	int fd;
 
 	if (!(h = gethostbyname(host))) {	/* get the IP addr */
-		error_msg("%s: %s\n", host, strerror(errno));
+		perror_msg("%s", host);
 		return(-1);
 	}
 	if ((tserv = getservbyname("time", "tcp")) == NULL) { /* find port # */
-		error_msg("%s: %s\n", "time", strerror(errno));
+		perror_msg("%s", "time");
 		return(-1);
 	}
 	if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {  /* get net connection */
-		error_msg("%s: %s\n", "socket", strerror(errno));
+		perror_msg("%s", "socket");
 		return(-1);
 	}
 
@@ -64,7 +64,7 @@
 	sin.sin_family = AF_INET;
 
 	if (connect(fd, (struct sockaddr *)&sin, sizeof(sin)) < 0) {	/* connect to time server */
-		error_msg("%s: %s\n", host, strerror(errno));
+		perror_msg("%s", host);
 		close(fd);
 		return(-1);
 	}
@@ -123,7 +123,7 @@
 	}
 	if (setdate) {
 		if (stime(&time) < 0)
-			error_msg_and_die("Could not set time of day: %s\n", strerror(errno));
+			perror_msg_and_die("Could not set time of day");
 	}
 	if (printdate) {
 		fprintf(stdout, "%s", ctime(&time));
diff --git a/readlink.c b/readlink.c
index bb40b07..bb2056a 100644
--- a/readlink.c
+++ b/readlink.c
@@ -39,7 +39,7 @@
 		buf = xrealloc(buf, bufsize);
 		size = readlink(argv[1], buf, bufsize);
 		if (size == -1)
-			error_msg_and_die("%s: %s\n", argv[1], strerror(errno));
+			perror_msg_and_die("%s", argv[1]);
 	}
 
 	buf[size] = '\0';
diff --git a/sed.c b/sed.c
index 812f621..a7152e5 100644
--- a/sed.c
+++ b/sed.c
@@ -757,7 +757,7 @@
 		for (i = optind; i < argc; i++) {
 			file = fopen(argv[i], "r");
 			if (file == NULL) {
-				error_msg("%s: %s\n", argv[i], strerror(errno));
+				perror_msg("%s", argv[i]);
 			} else {
 				process_file(file);
 				fclose(file);
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c
index a599b21..4217c36 100644
--- a/sysklogd/syslogd.c
+++ b/sysklogd/syslogd.c
@@ -313,7 +313,7 @@
 	/* Create the syslog file so realpath() can work. */
 	close (open (_PATH_LOG, O_RDWR | O_CREAT, 0644));
 	if (realpath (_PATH_LOG, lfile) == NULL)
-		error_msg_and_die ("Could not resolve path to " _PATH_LOG ": %s\n", strerror (errno));
+		perror_msg_and_die ("Could not resolve path to " _PATH_LOG);
 
 	unlink (lfile);
 
@@ -321,14 +321,14 @@
 	sunx.sun_family = AF_UNIX;
 	strncpy (sunx.sun_path, lfile, sizeof (sunx.sun_path));
 	if ((sock_fd = socket (AF_UNIX, SOCK_STREAM, 0)) < 0)
-		error_msg_and_die ("Couldn't obtain descriptor for socket " _PATH_LOG ": %s\n", strerror (errno));
+		perror_msg_and_die ("Couldn't obtain descriptor for socket " _PATH_LOG);
 
 	addrLength = sizeof (sunx.sun_family) + strlen (sunx.sun_path);
 	if ((bind (sock_fd, (struct sockaddr *) &sunx, addrLength)) || (listen (sock_fd, 5)))
-		error_msg_and_die ("Could not connect to socket " _PATH_LOG ": %s\n", strerror (errno));
+		perror_msg_and_die ("Could not connect to socket " _PATH_LOG);
 
 	if (chmod (lfile, 0666) < 0)
-		error_msg_and_die ("Could not set permission on " _PATH_LOG ": %s\n", strerror (errno));
+		perror_msg_and_die ("Could not set permission on " _PATH_LOG);
 
 	FD_ZERO (&fds);
 	FD_SET (sock_fd, &fds);
@@ -351,7 +351,7 @@
 
 		if ((n_ready = select (FD_SETSIZE, &readfds, NULL, NULL, NULL)) < 0) {
 			if (errno == EINTR) continue; /* alarm may have happened. */
-			error_msg_and_die ("select error: %s\n", strerror (errno));
+			perror_msg_and_die ("select error");
 		}
 
 		for (fd = 0; (n_ready > 0) && (fd < FD_SETSIZE); fd++) {
@@ -365,7 +365,7 @@
 					pid_t pid;
 
 					if ((conn = accept (sock_fd, (struct sockaddr *) &sunx, &addrLength)) < 0) {
-						error_msg_and_die ("accept error: %s\n", strerror (errno));
+						perror_msg_and_die ("accept error");
 					}
 
 					pid = fork();
diff --git a/syslogd.c b/syslogd.c
index a599b21..4217c36 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -313,7 +313,7 @@
 	/* Create the syslog file so realpath() can work. */
 	close (open (_PATH_LOG, O_RDWR | O_CREAT, 0644));
 	if (realpath (_PATH_LOG, lfile) == NULL)
-		error_msg_and_die ("Could not resolve path to " _PATH_LOG ": %s\n", strerror (errno));
+		perror_msg_and_die ("Could not resolve path to " _PATH_LOG);
 
 	unlink (lfile);
 
@@ -321,14 +321,14 @@
 	sunx.sun_family = AF_UNIX;
 	strncpy (sunx.sun_path, lfile, sizeof (sunx.sun_path));
 	if ((sock_fd = socket (AF_UNIX, SOCK_STREAM, 0)) < 0)
-		error_msg_and_die ("Couldn't obtain descriptor for socket " _PATH_LOG ": %s\n", strerror (errno));
+		perror_msg_and_die ("Couldn't obtain descriptor for socket " _PATH_LOG);
 
 	addrLength = sizeof (sunx.sun_family) + strlen (sunx.sun_path);
 	if ((bind (sock_fd, (struct sockaddr *) &sunx, addrLength)) || (listen (sock_fd, 5)))
-		error_msg_and_die ("Could not connect to socket " _PATH_LOG ": %s\n", strerror (errno));
+		perror_msg_and_die ("Could not connect to socket " _PATH_LOG);
 
 	if (chmod (lfile, 0666) < 0)
-		error_msg_and_die ("Could not set permission on " _PATH_LOG ": %s\n", strerror (errno));
+		perror_msg_and_die ("Could not set permission on " _PATH_LOG);
 
 	FD_ZERO (&fds);
 	FD_SET (sock_fd, &fds);
@@ -351,7 +351,7 @@
 
 		if ((n_ready = select (FD_SETSIZE, &readfds, NULL, NULL, NULL)) < 0) {
 			if (errno == EINTR) continue; /* alarm may have happened. */
-			error_msg_and_die ("select error: %s\n", strerror (errno));
+			perror_msg_and_die ("select error");
 		}
 
 		for (fd = 0; (n_ready > 0) && (fd < FD_SETSIZE); fd++) {
@@ -365,7 +365,7 @@
 					pid_t pid;
 
 					if ((conn = accept (sock_fd, (struct sockaddr *) &sunx, &addrLength)) < 0) {
-						error_msg_and_die ("accept error: %s\n", strerror (errno));
+						perror_msg_and_die ("accept error");
 					}
 
 					pid = fork();
diff --git a/tar.c b/tar.c
index e1beee1..c6a2a66 100644
--- a/tar.c
+++ b/tar.c
@@ -317,7 +317,7 @@
 		else
 			tarFd = open(tarName, O_RDONLY);
 		if (tarFd < 0)
-			error_msg_and_die( "Error opening '%s': %s\n", tarName, strerror(errno));
+			perror_msg_and_die("Error opening '%s'", tarName);
 
 #ifdef BB_FEATURE_TAR_GZIP	
 		/* unzip tarFd in a seperate process */
@@ -425,8 +425,7 @@
 		return( TRUE);
 
 	if (create_path(header->name, header->mode) != TRUE) {
-		error_msg("%s: Cannot mkdir: %s\n", 
-				header->name, strerror(errno)); 
+		perror_msg("%s: Cannot mkdir", header->name); 
 		return( FALSE);
 	}
 	/* make the final component, just in case it was
@@ -445,8 +444,8 @@
 		return( TRUE);
 
 	if (link(header->linkname, header->name) < 0) {
-		error_msg("%s: Cannot create hard link to '%s': %s\n", 
-				header->name, header->linkname, strerror(errno)); 
+		perror_msg("%s: Cannot create hard link to '%s'", header->name,
+				header->linkname); 
 		return( FALSE);
 	}
 
@@ -463,8 +462,8 @@
 
 #ifdef	S_ISLNK
 	if (symlink(header->linkname, header->name) < 0) {
-		error_msg("%s: Cannot create symlink to '%s': %s\n", 
-				header->name, header->linkname, strerror(errno)); 
+		perror_msg("%s: Cannot create symlink to '%s'", header->name,
+				header->linkname); 
 		return( FALSE);
 	}
 	/* Try to change ownership of the symlink.
@@ -493,14 +492,12 @@
 
 	if (S_ISCHR(header->mode) || S_ISBLK(header->mode) || S_ISSOCK(header->mode)) {
 		if (mknod(header->name, header->mode, makedev(header->devmajor, header->devminor)) < 0) {
-			error_msg("%s: Cannot mknod: %s\n",
-				header->name, strerror(errno)); 
+			perror_msg("%s: Cannot mknod", header->name); 
 			return( FALSE);
 		}
 	} else if (S_ISFIFO(header->mode)) {
 		if (mkfifo(header->name, header->mode) < 0) {
-			error_msg("%s: Cannot mkfifo: %s\n",
-				header->name, strerror(errno)); 
+			perror_msg("%s: Cannot mkfifo", header->name); 
 			return( FALSE);
 		}
 	}
@@ -790,7 +787,7 @@
 	close(tarFd);
 	if (status > 0) {
 		/* Bummer - we read a partial header */
-		error_msg( "Error reading tar file: %s\n", strerror(errno));
+		perror_msg("Error reading tar file");
 		return ( FALSE);
 	}
 	else if (errorFlag==TRUE) {
@@ -1007,7 +1004,7 @@
 		header.typeflag  = SYMTYPE;
 		link_size = readlink(fileName, buffer, sizeof(buffer) - 1);
 		if ( link_size < 0) {
-			error_msg("Error reading symlink '%s': %s\n", header.name, strerror(errno));
+			perror_msg("Error reading symlink '%s'", header.name);
 			return ( FALSE);
 		}
 		buffer[link_size] = '\0';
@@ -1165,7 +1162,7 @@
 	else
 		tbInfo.tarFd = open (tarName, O_WRONLY | O_CREAT | O_TRUNC, 0644);
 	if (tbInfo.tarFd < 0) {
-		error_msg( "Error opening '%s': %s\n", tarName, strerror(errno));
+		perror_msg( "Error opening '%s'", tarName);
 		freeHardLinkInfo(&tbInfo.hlInfoHead);
 		return ( FALSE);
 	}
diff --git a/tee.c b/tee.c
index 347684a..f0eca07 100644
--- a/tee.c
+++ b/tee.c
@@ -47,7 +47,7 @@
 	while (optind < argc) {
 		if ((files[nfiles++] = fopen(argv[optind++], mode)) == NULL) {
 			nfiles--;
-			error_msg("%s: %s\n", argv[optind-1], strerror(errno));
+			perror_msg("%s", argv[optind-1]);
 			status = 1;
 		}
 	}
diff --git a/telnet.c b/telnet.c
index 7a7bcfb..fff8c06 100644
--- a/telnet.c
+++ b/telnet.c
@@ -650,7 +650,7 @@
 
 	if (connect(s, (struct sockaddr *)&s_addr, sizeof s_addr) < 0)
 	{
-		error_msg_and_die("Unable to connect to remote host: %s\n", strerror(errno));
+		perror_msg_and_die("Unable to connect to remote host");
 	}
 	return s;
 }
diff --git a/util-linux/freeramdisk.c b/util-linux/freeramdisk.c
index a568cc6..a2b17c6 100644
--- a/util-linux/freeramdisk.c
+++ b/util-linux/freeramdisk.c
@@ -43,10 +43,10 @@
 	}
 
 	if ((f = open(argv[1], O_RDWR)) == -1) {
-		error_msg_and_die( "cannot open %s: %s\n", argv[1], strerror(errno));
+		perror_msg_and_die("cannot open %s", argv[1]);
 	}
 	if (ioctl(f, BLKFLSBUF) < 0) {
-		error_msg_and_die( "failed ioctl on %s: %s\n", argv[1], strerror(errno));
+		perror_msg_and_die("failed ioctl on %s", argv[1]);
 	}
 	/* Don't bother closing.  Exit does
 	 * that, so we can save a few bytes */
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 06673f9..8240b99 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -271,18 +271,18 @@
 		/* open device */ 
 		fd = open(device, O_RDONLY);
 		if (fd < 0)
-			error_msg_and_die("open failed for `%s': %s\n", device, strerror (errno));
+			perror_msg_and_die("open failed for `%s'", device);
 
 		/* How many filesystems?  We need to know to allocate enough space */
 		numfilesystems = ioctl (fd, DEVMTAB_COUNT_FILESYSTEMS);
 		if (numfilesystems<0)
-			error_msg_and_die("\nDEVMTAB_COUNT_FILESYSTEMS: %s\n", strerror (errno));
+			perror_msg_and_die("\nDEVMTAB_COUNT_FILESYSTEMS");
 		fslist = (struct k_fstype *) xcalloc ( numfilesystems, sizeof(struct k_fstype));
 
 		/* Grab the list of available filesystems */
 		status = ioctl (fd, DEVMTAB_GET_FILESYSTEMS, fslist);
 		if (status<0)
-			error_msg_and_die("\nDEVMTAB_GET_FILESYSTEMS: %s\n", strerror (errno));
+			perror_msg_and_die("\nDEVMTAB_GET_FILESYSTEMS");
 
 		/* Walk the list trying to mount filesystems 
 		 * that do not claim to be nodev filesystems */
@@ -307,8 +307,7 @@
 
 	if (status == FALSE) {
 		if (whineOnErrors == TRUE) {
-			error_msg("Mounting %s on %s failed: %s\n",
-					blockDevice, directory, strerror(errno));
+			perror_msg("Mounting %s on %s failed", blockDevice, directory);
 		}
 		return (FALSE);
 	}
@@ -340,18 +339,18 @@
 		/* open device */ 
 		fd = open(device, O_RDONLY);
 		if (fd < 0)
-			error_msg_and_die("open failed for `%s': %s\n", device, strerror (errno));
+			perror_msg_and_die("open failed for `%s'", device);
 
 		/* How many mounted filesystems?  We need to know to 
 		 * allocate enough space for later... */
 		numfilesystems = ioctl (fd, DEVMTAB_COUNT_MOUNTS);
 		if (numfilesystems<0)
-			error_msg_and_die( "\nDEVMTAB_COUNT_MOUNTS: %s\n", strerror (errno));
+			perror_msg_and_die( "\nDEVMTAB_COUNT_MOUNTS");
 		mntentlist = (struct k_mntent *) xcalloc ( numfilesystems, sizeof(struct k_mntent));
 		
 		/* Grab the list of mounted filesystems */
 		if (ioctl (fd, DEVMTAB_GET_MOUNTS, mntentlist)<0)
-			error_msg_and_die( "\nDEVMTAB_GET_MOUNTS: %s\n", strerror (errno));
+			perror_msg_and_die( "\nDEVMTAB_GET_MOUNTS");
 
 		for( i = 0 ; i < numfilesystems ; i++) {
 			fprintf( stdout, "%s %s %s %s %d %d\n", mntentlist[i].mnt_fsname,
@@ -453,7 +452,7 @@
 		fstabmount = TRUE;
 
 		if (f == NULL)
-			error_msg_and_die( "\nCannot read /etc/fstab: %s\n", strerror (errno));
+			perror_msg_and_die( "\nCannot read /etc/fstab");
 
 		while ((m = getmntent(f)) != NULL) {
 			if (all == FALSE && directory == NULL && (
@@ -487,7 +486,7 @@
 				rc = nfsmount (device, directory, &flags,
 					&extra_opts, &string_flags, 1);
 				if ( rc != 0) {
-					error_msg_and_die("nfsmount failed: %s\n", strerror(errno));	
+					perror_msg_and_die("nfsmount failed");	
 					rc = EXIT_FAILURE;
 				}
 			}
diff --git a/util-linux/rdate.c b/util-linux/rdate.c
index 87edecb..03f7f2d 100644
--- a/util-linux/rdate.c
+++ b/util-linux/rdate.c
@@ -47,15 +47,15 @@
 	int fd;
 
 	if (!(h = gethostbyname(host))) {	/* get the IP addr */
-		error_msg("%s: %s\n", host, strerror(errno));
+		perror_msg("%s", host);
 		return(-1);
 	}
 	if ((tserv = getservbyname("time", "tcp")) == NULL) { /* find port # */
-		error_msg("%s: %s\n", "time", strerror(errno));
+		perror_msg("%s", "time");
 		return(-1);
 	}
 	if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {  /* get net connection */
-		error_msg("%s: %s\n", "socket", strerror(errno));
+		perror_msg("%s", "socket");
 		return(-1);
 	}
 
@@ -64,7 +64,7 @@
 	sin.sin_family = AF_INET;
 
 	if (connect(fd, (struct sockaddr *)&sin, sizeof(sin)) < 0) {	/* connect to time server */
-		error_msg("%s: %s\n", host, strerror(errno));
+		perror_msg("%s", host);
 		close(fd);
 		return(-1);
 	}
@@ -123,7 +123,7 @@
 	}
 	if (setdate) {
 		if (stime(&time) < 0)
-			error_msg_and_die("Could not set time of day: %s\n", strerror(errno));
+			perror_msg_and_die("Could not set time of day");
 	}
 	if (printdate) {
 		fprintf(stdout, "%s", ctime(&time));
diff --git a/utility.c b/utility.c
index 9b805ae..794a928 100644
--- a/utility.c
+++ b/utility.c
@@ -1313,11 +1313,11 @@
 	/* open device */ 
 	fd = open(device, O_RDONLY);
 	if (fd < 0)
-		error_msg_and_die( "open failed for `%s': %s\n", device, strerror (errno));
+		perror_msg_and_die( "open failed for `%s'", device);
 
 	/* Find out how many processes there are */
 	if (ioctl (fd, DEVPS_GET_NUM_PIDS, &num_pids)<0) 
-		error_msg_and_die( "\nDEVPS_GET_PID_LIST: %s\n", strerror (errno));
+		perror_msg_and_die( "\nDEVPS_GET_PID_LIST");
 	
 	/* Allocate some memory -- grab a few extras just in case 
 	 * some new processes start up while we wait. The kernel will
@@ -1328,7 +1328,7 @@
 
 	/* Now grab the pid list */
 	if (ioctl (fd, DEVPS_GET_PID_LIST, pid_array)<0) 
-		error_msg_and_die( "\nDEVPS_GET_PID_LIST: %s\n", strerror (errno));
+		perror_msg_and_die( "\nDEVPS_GET_PID_LIST");
 
 	/* Now search for a match */
 	for (i=1, j=0; i<pid_array[0] ; i++) {
@@ -1337,7 +1337,7 @@
 
 	    info.pid = pid_array[i];
 	    if (ioctl (fd, DEVPS_GET_PID_INFO, &info)<0)
-			error_msg_and_die( "\nDEVPS_GET_PID_INFO: %s\n", strerror (errno));
+			perror_msg_and_die( "\nDEVPS_GET_PID_INFO");
 
 		/* Make sure we only match on the process name */
 		p=info.command_line+1;
@@ -1361,7 +1361,7 @@
 
 	/* close device */
 	if (close (fd) != 0) 
-		error_msg_and_die( "close failed for `%s': %s\n",device, strerror (errno));
+		perror_msg_and_die( "close failed for `%s'", device);
 
 	return pidList;
 }
@@ -1387,7 +1387,7 @@
 
 	dir = opendir("/proc");
 	if (!dir)
-		error_msg_and_die( "Cannot open /proc: %s\n", strerror (errno));
+		perror_msg_and_die( "Cannot open /proc");
 	
 	while ((next = readdir(dir)) != NULL) {
 		FILE *status;
@@ -1764,7 +1764,7 @@
 {
 	FILE *fp;
 	if ((fp = fopen(path, mode)) == NULL) {
-		error_msg("%s: %s\n", path, strerror(errno));
+		perror_msg("%s", path);
 		errno = 0;
 	}
 	return fp;
@@ -1778,7 +1778,7 @@
 {
 	FILE *fp;
 	if ((fp = fopen(path, mode)) == NULL)
-		error_msg_and_die("%s: %s\n", path, strerror(errno));
+		perror_msg_and_die("%s", path);
 	return fp;
 }
 #endif
diff --git a/uudecode.c b/uudecode.c
index ff4a9d9..279b9d6 100644
--- a/uudecode.c
+++ b/uudecode.c
@@ -257,7 +257,7 @@
       && (freopen (outname, "w", stdout) == NULL
 	  || chmod (outname, mode & (S_IRWXU | S_IRWXG | S_IRWXO))
          )) {
-    error_msg("%s: %s %s\n", outname, inname, strerror(errno)); /* */
+    perror_msg("%s", outname); /* */
     return FALSE;
   }
 
@@ -302,7 +302,7 @@
         if (decode (argv[optind], outname) != 0)
           exit_status = FALSE;
       } else {
-        error_msg("%s: %s\n", argv[optind], strerror(errno));
+        perror_msg("%s", argv[optind]);
         exit_status = EXIT_FAILURE;
       }
       optind++;
diff --git a/uuencode.c b/uuencode.c
index 41e6590..36bc497 100644
--- a/uuencode.c
+++ b/uuencode.c
@@ -160,15 +160,12 @@
   trans_ptr = uu_std;      /* Standard encoding is old uu format */
 
   /* Parse any options */
-  while ((opt = getopt (argc, argv, "m")) != EOF) {
+  while ((opt = getopt (argc, argv, "m")) > 0) {
     switch (opt) {
      case 'm':
       trans_ptr = uu_base64;
       break;
 
-     case 0:
-      break;
-
      default:
       usage(uuencode_usage);
     }
@@ -178,7 +175,7 @@
    case 2:
     /* Optional first argument is input file.  */
     if (!freopen (argv[optind], "r", stdin) || fstat (fileno (stdin), &sb)) {
-      error_msg("%s: %s\n", argv[optind], strerror(errno));
+      perror_msg("%s", argv[optind]);
       return EXIT_FAILURE;
     }
     mode = sb.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO);