svn commit: trunk/busybox/shell
landley at busybox.net
landley at busybox.net
Tue Jun 20 21:35:29 UTC 2006
Author: landley
Date: 2006-06-20 14:35:26 -0700 (Tue, 20 Jun 2006)
New Revision: 15445
Log:
Cleanup patch from Shaun Jackman converting %m to perror.
Modified:
trunk/busybox/shell/hush.c
trunk/busybox/shell/lash.c
Changeset:
Modified: trunk/busybox/shell/hush.c
===================================================================
--- trunk/busybox/shell/hush.c 2006-06-20 21:13:29 UTC (rev 15444)
+++ trunk/busybox/shell/hush.c 2006-06-20 21:35:26 UTC (rev 15445)
@@ -665,7 +665,7 @@
} 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 {
Modified: trunk/busybox/shell/lash.c
===================================================================
--- trunk/busybox/shell/lash.c 2006-06-20 21:13:29 UTC (rev 15444)
+++ trunk/busybox/shell/lash.c 2006-06-20 21:35:26 UTC (rev 15445)
@@ -228,7 +228,7 @@
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 @@
}
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 @@
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 @@
/* 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);
}
More information about the busybox-cvs
mailing list