diff options
| author | Matt Kraai <kraai@debian.org> | 2000-12-18 03:57:16 +0000 |
|---|---|---|
| committer | Matt Kraai <kraai@debian.org> | 2000-12-18 03:57:16 +0000 |
| commit | 1fa1adea2ae16d4f4c82d7466905dce4c6edd5f5 (patch) | |
| tree | b85a425c19b299f5d8635599e11c78c96f12a4c2 /coreutils/uuencode.c | |
| parent | 0dab82997777bffb95d01d68e1628ee79207a03d (diff) | |
| download | busybox-w32-1fa1adea2ae16d4f4c82d7466905dce4c6edd5f5.tar.gz busybox-w32-1fa1adea2ae16d4f4c82d7466905dce4c6edd5f5.tar.bz2 busybox-w32-1fa1adea2ae16d4f4c82d7466905dce4c6edd5f5.zip | |
Change calls to error_msg.* and strerror to use perror_msg.*.
Diffstat (limited to 'coreutils/uuencode.c')
| -rw-r--r-- | coreutils/uuencode.c | 7 |
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, | |||
| 160 | trans_ptr = uu_std; /* Standard encoding is old uu format */ | 160 | trans_ptr = uu_std; /* Standard encoding is old uu format */ |
| 161 | 161 | ||
| 162 | /* Parse any options */ | 162 | /* Parse any options */ |
| 163 | while ((opt = getopt (argc, argv, "m")) != EOF) { | 163 | while ((opt = getopt (argc, argv, "m")) > 0) { |
| 164 | switch (opt) { | 164 | switch (opt) { |
| 165 | case 'm': | 165 | case 'm': |
| 166 | trans_ptr = uu_base64; | 166 | trans_ptr = uu_base64; |
| 167 | break; | 167 | break; |
| 168 | 168 | ||
| 169 | case 0: | ||
| 170 | break; | ||
| 171 | |||
| 172 | default: | 169 | default: |
| 173 | usage(uuencode_usage); | 170 | usage(uuencode_usage); |
| 174 | } | 171 | } |
| @@ -178,7 +175,7 @@ int uuencode_main (int argc, | |||
| 178 | case 2: | 175 | case 2: |
| 179 | /* Optional first argument is input file. */ | 176 | /* Optional first argument is input file. */ |
| 180 | if (!freopen (argv[optind], "r", stdin) || fstat (fileno (stdin), &sb)) { | 177 | if (!freopen (argv[optind], "r", stdin) || fstat (fileno (stdin), &sb)) { |
| 181 | error_msg("%s: %s\n", argv[optind], strerror(errno)); | 178 | perror_msg("%s", argv[optind]); |
| 182 | return EXIT_FAILURE; | 179 | return EXIT_FAILURE; |
| 183 | } | 180 | } |
| 184 | mode = sb.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO); | 181 | mode = sb.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO); |
