aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-01-20 01:10:07 +0000
committerEric Andersen <andersen@codepoet.org>2001-01-20 01:10:07 +0000
commit6f65a3a7e88a87bdd0f921884cd05ae593659dda (patch)
treeef5ae5dced5aaa9bffe7998fa49ec71bbd476eb1
parent1d269432b16b77e78544cf2b7aae04f0e4b8c06c (diff)
downloadbusybox-w32-6f65a3a7e88a87bdd0f921884cd05ae593659dda.tar.gz
busybox-w32-6f65a3a7e88a87bdd0f921884cd05ae593659dda.tar.bz2
busybox-w32-6f65a3a7e88a87bdd0f921884cd05ae593659dda.zip
More printf cleanups
-rw-r--r--lash.c18
-rw-r--r--mount.c2
-rw-r--r--sh.c18
-rw-r--r--shell/lash.c18
-rw-r--r--util-linux/mount.c2
5 files changed, 29 insertions, 29 deletions
diff --git a/lash.c b/lash.c
index 98d6b65a6..9e6d09565 100644
--- a/lash.c
+++ b/lash.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 }
diff --git a/mount.c b/mount.c
index 97b60abbd..88e45fc72 100644
--- a/mount.c
+++ b/mount.c
@@ -353,7 +353,7 @@ extern int mount_main(int argc, char **argv)
353 perror_msg_and_die( "\nDEVMTAB_GET_MOUNTS"); 353 perror_msg_and_die( "\nDEVMTAB_GET_MOUNTS");
354 354
355 for( i = 0 ; i < numfilesystems ; i++) { 355 for( i = 0 ; i < numfilesystems ; i++) {
356 fprintf( stdout, "%s %s %s %s %d %d\n", mntentlist[i].mnt_fsname, 356 printf( "%s %s %s %s %d %d\n", mntentlist[i].mnt_fsname,
357 mntentlist[i].mnt_dir, mntentlist[i].mnt_type, 357 mntentlist[i].mnt_dir, mntentlist[i].mnt_type,
358 mntentlist[i].mnt_opts, mntentlist[i].mnt_freq, 358 mntentlist[i].mnt_opts, mntentlist[i].mnt_freq,
359 mntentlist[i].mnt_passno); 359 mntentlist[i].mnt_passno);
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 }
diff --git a/shell/lash.c b/shell/lash.c
index 98d6b65a6..9e6d09565 100644
--- a/shell/lash.c
+++ b/shell/lash.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 }
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 97b60abbd..88e45fc72 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -353,7 +353,7 @@ extern int mount_main(int argc, char **argv)
353 perror_msg_and_die( "\nDEVMTAB_GET_MOUNTS"); 353 perror_msg_and_die( "\nDEVMTAB_GET_MOUNTS");
354 354
355 for( i = 0 ; i < numfilesystems ; i++) { 355 for( i = 0 ; i < numfilesystems ; i++) {
356 fprintf( stdout, "%s %s %s %s %d %d\n", mntentlist[i].mnt_fsname, 356 printf( "%s %s %s %s %d %d\n", mntentlist[i].mnt_fsname,
357 mntentlist[i].mnt_dir, mntentlist[i].mnt_type, 357 mntentlist[i].mnt_dir, mntentlist[i].mnt_type,
358 mntentlist[i].mnt_opts, mntentlist[i].mnt_freq, 358 mntentlist[i].mnt_opts, mntentlist[i].mnt_freq,
359 mntentlist[i].mnt_passno); 359 mntentlist[i].mnt_passno);