diff options
author | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-09-27 03:01:40 +0000 |
---|---|---|
committer | kraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-09-27 03:01:40 +0000 |
commit | 9408814b5c5f0c9368d466160da32b1b4049f03f (patch) | |
tree | 181768dee00666d560354b921d72a0f2217cb179 /cat.c | |
parent | 883ad0f7f5341134101a74d230445d6ed704a914 (diff) | |
download | busybox-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.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -26,20 +26,21 @@ | |||
26 | 26 | ||
27 | extern int cat_main(int argc, char **argv) | 27 | extern 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 | /* |