diff options
author | Rob Landley | 2006-06-20 21:35:26 +0000 |
---|---|---|
committer | Rob Landley | 2006-06-20 21:35:26 +0000 |
commit | 5483de1cb71b9cac095e4f6b65196b5390c06560 (patch) | |
tree | ae6cb0aeb5a2324920be39df80fcd0284ad1aac3 | |
parent | 9fe801e0d2a3a30855481d125980f7bbcd857920 (diff) | |
download | busybox-5483de1cb71b9cac095e4f6b65196b5390c06560.zip busybox-5483de1cb71b9cac095e4f6b65196b5390c06560.tar.gz |
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 e370738..1f4e2e8 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -665,7 +665,7 @@ static int builtin_read(struct child_prog *child) } else res = -1; if (res) - fprintf(stderr, "read: %m\n"); + bb_perror_msg("read"); free(var); /* So not move up to avoid breaking errno */ return res; } else { diff --git a/shell/lash.c b/shell/lash.c index 27eb8ec..a209348 100644 --- a/shell/lash.c +++ b/shell/lash.c @@ -228,7 +228,7 @@ static int builtin_cd(struct child_prog *child) else newdir = child->argv[1]; if (chdir(newdir)) { - printf("cd: %s: %m\n", newdir); + bb_perror_msg("cd: %s", newdir); return EXIT_FAILURE; } cwd = xgetcwd((char *)cwd); @@ -378,7 +378,7 @@ static int builtin_export(struct child_prog *child) } res = putenv(v); if (res) - fprintf(stderr, "export: %m\n"); + bb_perror_msg("export"); #ifdef CONFIG_FEATURE_SH_FANCY_PROMPT if (strncmp(v, "PS1=", 4)==0) PS1 = getenv("PS1"); @@ -420,7 +420,7 @@ static int builtin_read(struct child_prog *child) if((s = strdup(string))) res = putenv(s); if (res) - fprintf(stderr, "read: %m\n"); + bb_perror_msg("read"); } else fgets(string, sizeof(string), stdin); @@ -1231,7 +1231,7 @@ static int pseudo_exec(struct child_prog *child) /* Do not use bb_perror_msg_and_die() here, since we must not * call exit() but should call _exit() instead */ - fprintf(stderr, "%s: %m\n", child->argv[0]); + bb_perror_msg("%s", child->argv[0]); _exit(EXIT_FAILURE); } |