aboutsummaryrefslogtreecommitdiff
path: root/sh.c
diff options
context:
space:
mode:
Diffstat (limited to 'sh.c')
-rw-r--r--sh.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sh.c b/sh.c
index 98d6b65a6..9e6d09565 100644
--- a/sh.c
+++ b/sh.c
@@ -290,7 +290,7 @@ static int builtin_env(struct child_prog *dummy)
290 char **e; 290 char **e;
291 291
292 for (e = environ; *e; e++) { 292 for (e = environ; *e; e++) {
293 fprintf(stdout, "%s\n", *e); 293 printf( "%s\n", *e);
294 } 294 }
295 return (0); 295 return (0);
296} 296}
@@ -406,7 +406,7 @@ static int builtin_jobs(struct child_prog *child)
406static int builtin_pwd(struct child_prog *dummy) 406static int builtin_pwd(struct child_prog *dummy)
407{ 407{
408 getcwd(cwd, MAX_LINE); 408 getcwd(cwd, MAX_LINE);
409 fprintf(stdout, "%s\n", cwd); 409 printf( "%s\n", cwd);
410 return EXIT_SUCCESS; 410 return EXIT_SUCCESS;
411} 411}
412 412
@@ -566,7 +566,7 @@ static int builtin_source(struct child_prog *child)
566 566
567 input = fopen(child->argv[1], "r"); 567 input = fopen(child->argv[1], "r");
568 if (!input) { 568 if (!input) {
569 fprintf(stdout, "Couldn't open file '%s'\n", child->argv[1]); 569 printf( "Couldn't open file '%s'\n", child->argv[1]);
570 return EXIT_FAILURE; 570 return EXIT_FAILURE;
571 } 571 }
572 572
@@ -583,7 +583,7 @@ static int builtin_source(struct child_prog *child)
583static int builtin_unset(struct child_prog *child) 583static int builtin_unset(struct child_prog *child)
584{ 584{
585 if (child->argv[1] == NULL) { 585 if (child->argv[1] == NULL) {
586 fprintf(stdout, "unset: parameter required.\n"); 586 printf( "unset: parameter required.\n");
587 return EXIT_FAILURE; 587 return EXIT_FAILURE;
588 } 588 }
589 unsetenv(child->argv[1]); 589 unsetenv(child->argv[1]);
@@ -1704,7 +1704,7 @@ int shell_main(int argc_l, char **argv_l)
1704 FILE *prof_input; 1704 FILE *prof_input;
1705 prof_input = fopen("/etc/profile", "r"); 1705 prof_input = fopen("/etc/profile", "r");
1706 if (!prof_input) { 1706 if (!prof_input) {
1707 fprintf(stdout, "Couldn't open file '/etc/profile'\n"); 1707 printf( "Couldn't open file '/etc/profile'\n");
1708 } else { 1708 } else {
1709 int tmp_fd = fileno(prof_input); 1709 int tmp_fd = fileno(prof_input);
1710 mark_open(tmp_fd); 1710 mark_open(tmp_fd);
@@ -1749,12 +1749,12 @@ int shell_main(int argc_l, char **argv_l)
1749 interactive=TRUE; 1749 interactive=TRUE;
1750 } 1750 }
1751 if (interactive==TRUE) { 1751 if (interactive==TRUE) {
1752 //fprintf(stdout, "optind=%d argv[optind]='%s'\n", optind, argv[optind]); 1752 //printf( "optind=%d argv[optind]='%s'\n", optind, argv[optind]);
1753 /* Looks like they want an interactive shell */ 1753 /* Looks like they want an interactive shell */
1754 fprintf(stdout, "\n\nBusyBox v%s (%s) Built-in shell (lash)\n", BB_VER, BB_BT); 1754 printf( "\n\nBusyBox v%s (%s) Built-in shell (lash)\n", BB_VER, BB_BT);
1755 fprintf(stdout, "Enter 'help' for a list of built-in commands.\n\n"); 1755 printf( "Enter 'help' for a list of built-in commands.\n\n");
1756 } else if (local_pending_command==NULL) { 1756 } else if (local_pending_command==NULL) {
1757 //fprintf(stdout, "optind=%d argv[optind]='%s'\n", optind, argv[optind]); 1757 //printf( "optind=%d argv[optind]='%s'\n", optind, argv[optind]);
1758 input = xfopen(argv[optind], "r"); 1758 input = xfopen(argv[optind], "r");
1759 mark_open(fileno(input)); /* be lazy, never mark this closed */ 1759 mark_open(fileno(input)); /* be lazy, never mark this closed */
1760 } 1760 }