- reuse strings and messages. Saves about 600B

This commit is contained in:
Bernhard Reutner-Fischer
2006-06-07 20:17:41 +00:00
parent 4c5ad2fc90
commit 19008b8373
22 changed files with 77 additions and 86 deletions

View File

@@ -8762,7 +8762,7 @@ procargs(int argc, char **argv)
xminusc = minusc;
if (*xargv == NULL) {
if (xminusc)
sh_error("-c requires an argument");
sh_error(bb_msg_requires_arg, "-c");
sflag = 1;
}
if (iflag == 2 && sflag == 1 && isatty(0) && isatty(1))

View File

@@ -284,7 +284,7 @@ static int builtin_fg_bg(struct child_prog *child)
}
} else {
if (sscanf(child->argv[1], "%%%d", &jobnum) != 1) {
bb_error_msg("%s: bad argument '%s'", child->argv[0], child->argv[1]);
bb_error_msg(bb_msg_invalid_arg, child->argv[1], child->argv[0]);
return EXIT_FAILURE;
}
for (job = child->family->job_list->head; job; job = job->next) {
@@ -465,7 +465,7 @@ static int builtin_source(struct child_prog *child)
static int builtin_unset(struct child_prog *child)
{
if (child->argv[1] == NULL) {
printf( "unset: parameter required.\n");
printf(bb_msg_requires_arg, "unset");
return EXIT_FAILURE;
}
unsetenv(child->argv[1]);