linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC] Large file support (LFS) for can-utils
@ 2014-02-21 20:21 Oliver Hartkopp
  2014-02-21 20:36 ` Oliver Hartkopp
  2014-02-21 21:37 ` Uwe Kleine-König
  0 siblings, 2 replies; 3+ messages in thread
From: Oliver Hartkopp @ 2014-02-21 20:21 UTC (permalink / raw)
  To: Uwe Kleine-König, linux-can@vger.kernel.org

Hi Uwe,

yesterday I tried to create a really big CAN logfile with

	candump -l any

logging 9 CAN interfaces.

But unfortunately the length of the log file on my 32 bit i686 machine was
limited to 2147483647 == 0x7FFFFFFF == int32 max ...

I did some investigation and there's some kind of large file support (LFS) in
recent gnu libraries that allow 32 bit applications to create large files with
file length values > 0x7FFFFFFF when the filesystem supports it.

When applying the patch below my candump was able to create a large log file.

Alternatively

	candump -L any > filename

did the job too as obviously 'cat' has large file support ;-)

What do you think about LFS?
Would this be the correct way to add the LFS support?

Regards,
Oliver

Not-really-signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>

---

diff --git a/Makefile b/Makefile
index ab99746..a926177 100644
--- a/Makefile
+++ b/Makefile
@@ -45,6 +45,7 @@ MAKEFLAGS = -k

 CFLAGS    = -O2 -Wall -Wno-parentheses -Iinclude \
 	    -fno-strict-aliasing \
+	    -D_FILE_OFFSET_BITS=64 \
 	    -DSO_RXQ_OVFL=40 \
 	    -DPF_CAN=29 \
 	    -DAF_CAN=PF_CAN


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-02-21 21:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-21 20:21 [PATCH RFC] Large file support (LFS) for can-utils Oliver Hartkopp
2014-02-21 20:36 ` Oliver Hartkopp
2014-02-21 21:37 ` Uwe Kleine-König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).