aboutsummaryrefslogtreecommitdiff
path: root/cat.c
diff options
context:
space:
mode:
authorkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-09-27 03:01:40 +0000
committerkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2000-09-27 03:01:40 +0000
commit9408814b5c5f0c9368d466160da32b1b4049f03f (patch)
tree181768dee00666d560354b921d72a0f2217cb179 /cat.c
parent883ad0f7f5341134101a74d230445d6ed704a914 (diff)
downloadbusybox-w32-9408814b5c5f0c9368d466160da32b1b4049f03f.tar.gz
busybox-w32-9408814b5c5f0c9368d466160da32b1b4049f03f.tar.bz2
busybox-w32-9408814b5c5f0c9368d466160da32b1b4049f03f.zip
Continue concatenating files even if we can't open one.
git-svn-id: svn://busybox.net/trunk/busybox@1137 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'cat.c')
-rw-r--r--cat.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/cat.c b/cat.c
index 51f1d27a6..151ce4e61 100644
--- a/cat.c
+++ b/cat.c
@@ -26,20 +26,21 @@
26 26
27extern int cat_main(int argc, char **argv) 27extern int cat_main(int argc, char **argv)
28{ 28{
29 int status = EXIT_SUCCESS;
30
29 if (argc == 1) { 31 if (argc == 1) {
30 print_file(stdin); 32 print_file(stdin);
31 exit(TRUE); 33 return status;
32 } 34 }
33 35
34 while (--argc > 0) { 36 while (--argc > 0) {
35 if(!(strcmp(*++argv, "-"))) { 37 if(!(strcmp(*++argv, "-"))) {
36 print_file(stdin); 38 print_file(stdin);
37 } else if (print_file_by_name(*argv) == FALSE) { 39 } else if (print_file_by_name(*argv) == FALSE) {
38 perror(*argv); 40 status = EXIT_FAILURE;
39 exit(FALSE);
40 } 41 }
41 } 42 }
42 return(TRUE); 43 return status;
43} 44}
44 45
45/* 46/*