aboutsummaryrefslogtreecommitdiff
path: root/sh.c
diff options
context:
space:
mode:
authorkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-09-27 02:43:35 +0000
committerkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-09-27 02:43:35 +0000
commit883ad0f7f5341134101a74d230445d6ed704a914 (patch)
tree3838db4158e8e05a753fffd6e87cbbc7946425ad /sh.c
parent8a0593d4ba17298f272ffeaa00c70e4a67355c74 (diff)
downloadbusybox-w32-883ad0f7f5341134101a74d230445d6ed704a914.tar.gz
busybox-w32-883ad0f7f5341134101a74d230445d6ed704a914.tar.bz2
busybox-w32-883ad0f7f5341134101a74d230445d6ed704a914.zip
Consolidate handling of some fopen failures.
git-svn-id: svn://busybox.net/trunk/busybox@1136 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'sh.c')
-rw-r--r--sh.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/sh.c b/sh.c
index 77efc6aac..b10614259 100644
--- a/sh.c
+++ b/sh.c
@@ -1447,10 +1447,7 @@ int shell_main(int argc_l, char **argv_l)
1447 fprintf(stdout, "Enter 'help' for a list of built-in commands.\n\n"); 1447 fprintf(stdout, "Enter 'help' for a list of built-in commands.\n\n");
1448 } else if (local_pending_command==NULL) { 1448 } else if (local_pending_command==NULL) {
1449 //fprintf(stdout, "optind=%d argv[optind]='%s'\n", optind, argv[optind]); 1449 //fprintf(stdout, "optind=%d argv[optind]='%s'\n", optind, argv[optind]);
1450 input = fopen(argv[optind], "r"); 1450 input = xfopen(argv[optind], "r");
1451 if (!input) {
1452 fatalError("%s: %s\n", argv[optind], strerror(errno));
1453 }
1454 } 1451 }
1455 1452
1456 /* initialize the cwd -- this is never freed...*/ 1453 /* initialize the cwd -- this is never freed...*/