diff options
author | Matt Kraai | 2000-09-27 03:01:40 +0000 |
---|---|---|
committer | Matt Kraai | 2000-09-27 03:01:40 +0000 |
commit | e7c1af1e0dc1440483d7f195f15eb0df5cf70a04 (patch) | |
tree | 181768dee00666d560354b921d72a0f2217cb179 /cat.c | |
parent | bbaef66b3f99213f06adf04df6b3e5e61278d75b (diff) | |
download | busybox-e7c1af1e0dc1440483d7f195f15eb0df5cf70a04.zip busybox-e7c1af1e0dc1440483d7f195f15eb0df5cf70a04.tar.gz |
Continue concatenating files even if we can't open one.
Diffstat (limited to 'cat.c')
-rw-r--r-- | cat.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -26,20 +26,21 @@ extern int cat_main(int argc, char **argv) { + int status = EXIT_SUCCESS; + if (argc == 1) { print_file(stdin); - exit(TRUE); + return status; } while (--argc > 0) { if(!(strcmp(*++argv, "-"))) { print_file(stdin); } else if (print_file_by_name(*argv) == FALSE) { - perror(*argv); - exit(FALSE); + status = EXIT_FAILURE; } } - return(TRUE); + return status; } /* |