aboutsummaryrefslogtreecommitdiff
path: root/coreutils/cat.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-10-08 17:54:47 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-10-08 17:54:47 +0000
commit7039a66b58706457c7423de60556e04545432943 (patch)
treea512daebc3674c819766664c8ea17d41ef7fef02 /coreutils/cat.c
parent1385899416a4396385ad421ae1f532be7103738a (diff)
downloadbusybox-w32-7039a66b58706457c7423de60556e04545432943.tar.gz
busybox-w32-7039a66b58706457c7423de60556e04545432943.tar.bz2
busybox-w32-7039a66b58706457c7423de60556e04545432943.zip
correct largefile support, add comments about it.
Diffstat (limited to 'coreutils/cat.c')
-rw-r--r--coreutils/cat.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/coreutils/cat.c b/coreutils/cat.c
index f3baf0a2d..10eb29c4d 100644
--- a/coreutils/cat.c
+++ b/coreutils/cat.c
@@ -4,7 +4,7 @@
4 * 4 *
5 * Copyright (C) 2003 Manuel Novoa III <mjn3@codepoet.org> 5 * Copyright (C) 2003 Manuel Novoa III <mjn3@codepoet.org>
6 * 6 *
7 * Licensed under GPLv2 or later, see file License in this tarball for details. 7 * Licensed under GPLv2, see file License in this tarball for details.
8 */ 8 */
9 9
10/* BB_AUDIT SUSv3 compliant */ 10/* BB_AUDIT SUSv3 compliant */
@@ -26,8 +26,9 @@ int cat_main(int argc, char **argv)
26 } 26 }
27 27
28 do { 28 do {
29 if ((f = bb_wfopen_input(*argv)) != NULL) { 29 f = bb_wfopen_input(*argv);
30 int r = bb_copyfd_eof(fileno(f), STDOUT_FILENO); 30 if (f) {
31 off_t r = bb_copyfd_eof(fileno(f), STDOUT_FILENO);
31 bb_fclose_nonstdin(f); 32 bb_fclose_nonstdin(f);
32 if (r >= 0) { 33 if (r >= 0) {
33 continue; 34 continue;