aboutsummaryrefslogtreecommitdiff
path: root/coreutils/uuencode.c
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2000-12-18 03:57:16 +0000
committerMatt Kraai <kraai@debian.org>2000-12-18 03:57:16 +0000
commit1fa1adea2ae16d4f4c82d7466905dce4c6edd5f5 (patch)
treeb85a425c19b299f5d8635599e11c78c96f12a4c2 /coreutils/uuencode.c
parent0dab82997777bffb95d01d68e1628ee79207a03d (diff)
downloadbusybox-1fa1adea2ae16d4f4c82d7466905dce4c6edd5f5.tar.gz
Change calls to error_msg.* and strerror to use perror_msg.*.
Diffstat (limited to 'coreutils/uuencode.c')
-rw-r--r--coreutils/uuencode.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c
index 41e659075..36bc4970f 100644
--- a/coreutils/uuencode.c
+++ b/coreutils/uuencode.c
@@ -160,15 +160,12 @@ int uuencode_main (int argc,
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 @@ int uuencode_main (int argc,
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);