diff options
author | Rob Landley <rob@landley.net> | 2006-06-20 21:35:26 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2006-06-20 21:35:26 +0000 |
commit | 5483de1cb71b9cac095e4f6b65196b5390c06560 (patch) | |
tree | ae6cb0aeb5a2324920be39df80fcd0284ad1aac3 | |
parent | 9fe801e0d2a3a30855481d125980f7bbcd857920 (diff) | |
download | busybox-w32-5483de1cb71b9cac095e4f6b65196b5390c06560.tar.gz busybox-w32-5483de1cb71b9cac095e4f6b65196b5390c06560.tar.bz2 busybox-w32-5483de1cb71b9cac095e4f6b65196b5390c06560.zip |
Cleanup patch from Shaun Jackman converting %m to perror.
-rw-r--r-- | shell/hush.c | 2 | ||||
-rw-r--r-- | shell/lash.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/shell/hush.c b/shell/hush.c index e3707380d..1f4e2e833 100644 --- a/shell/hush.c +++ b/shell/hush.c | |||
@@ -665,7 +665,7 @@ static int builtin_read(struct child_prog *child) | |||
665 | } else | 665 | } else |
666 | res = -1; | 666 | res = -1; |
667 | if (res) | 667 | if (res) |
668 | fprintf(stderr, "read: %m\n"); | 668 | bb_perror_msg("read"); |
669 | free(var); /* So not move up to avoid breaking errno */ | 669 | free(var); /* So not move up to avoid breaking errno */ |
670 | return res; | 670 | return res; |
671 | } else { | 671 | } else { |
diff --git a/shell/lash.c b/shell/lash.c index 27eb8ec29..a20934834 100644 --- a/shell/lash.c +++ b/shell/lash.c | |||
@@ -228,7 +228,7 @@ static int builtin_cd(struct child_prog *child) | |||
228 | else | 228 | else |
229 | newdir = child->argv[1]; | 229 | newdir = child->argv[1]; |
230 | if (chdir(newdir)) { | 230 | if (chdir(newdir)) { |
231 | printf("cd: %s: %m\n", newdir); | 231 | bb_perror_msg("cd: %s", newdir); |
232 | return EXIT_FAILURE; | 232 | return EXIT_FAILURE; |
233 | } | 233 | } |
234 | cwd = xgetcwd((char *)cwd); | 234 | cwd = xgetcwd((char *)cwd); |
@@ -378,7 +378,7 @@ static int builtin_export(struct child_prog *child) | |||
378 | } | 378 | } |
379 | res = putenv(v); | 379 | res = putenv(v); |
380 | if (res) | 380 | if (res) |
381 | fprintf(stderr, "export: %m\n"); | 381 | bb_perror_msg("export"); |
382 | #ifdef CONFIG_FEATURE_SH_FANCY_PROMPT | 382 | #ifdef CONFIG_FEATURE_SH_FANCY_PROMPT |
383 | if (strncmp(v, "PS1=", 4)==0) | 383 | if (strncmp(v, "PS1=", 4)==0) |
384 | PS1 = getenv("PS1"); | 384 | PS1 = getenv("PS1"); |
@@ -420,7 +420,7 @@ static int builtin_read(struct child_prog *child) | |||
420 | if((s = strdup(string))) | 420 | if((s = strdup(string))) |
421 | res = putenv(s); | 421 | res = putenv(s); |
422 | if (res) | 422 | if (res) |
423 | fprintf(stderr, "read: %m\n"); | 423 | bb_perror_msg("read"); |
424 | } | 424 | } |
425 | else | 425 | else |
426 | fgets(string, sizeof(string), stdin); | 426 | fgets(string, sizeof(string), stdin); |
@@ -1231,7 +1231,7 @@ static int pseudo_exec(struct child_prog *child) | |||
1231 | 1231 | ||
1232 | /* Do not use bb_perror_msg_and_die() here, since we must not | 1232 | /* Do not use bb_perror_msg_and_die() here, since we must not |
1233 | * call exit() but should call _exit() instead */ | 1233 | * call exit() but should call _exit() instead */ |
1234 | fprintf(stderr, "%s: %m\n", child->argv[0]); | 1234 | bb_perror_msg("%s", child->argv[0]); |
1235 | _exit(EXIT_FAILURE); | 1235 | _exit(EXIT_FAILURE); |
1236 | } | 1236 | } |
1237 | 1237 | ||