diff options
author | Rob Landley <rob@landley.net> | 2019-06-03 18:37:27 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-06-03 18:37:27 -0500 |
commit | fee08385a219b309cf51a7679077e3e9a9a5b906 (patch) | |
tree | 72f56cdaeb636cdf434681a26e9ec44e415f7ebe /toys | |
parent | c8a52bd25fac5ccec883362cb7db92cf3a504af5 (diff) | |
download | toybox-fee08385a219b309cf51a7679077e3e9a9a5b906.tar.gz |
Remove TAIL_SEEK config option, just always include it.
Yeah, it's twice the size and two codepaths, but seekable is the common
case, it won't work in pipelines without a non-seek codepath, and the
performance penalty not using seek on large files is a enormous.
Diffstat (limited to 'toys')
-rw-r--r-- | toys/posix/tail.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/toys/posix/tail.c b/toys/posix/tail.c index d49a70c2..d7161249 100644 --- a/toys/posix/tail.c +++ b/toys/posix/tail.c @@ -20,13 +20,6 @@ config TAIL -n Output the last NUMBER lines (default 10), +X counts from start -c Output the last NUMBER bytes, +NUMBER counts from start -f Follow FILE(s), waiting for more data to be appended - -config TAIL_SEEK - bool "tail seek support" - default y - depends on TAIL - help - This version uses lseek, which is faster on large files. */ #define FOR_tail @@ -154,7 +147,7 @@ static void do_tail(int fd, char *name) // The slow codepath is always needed, and can handle all input, // so make lseek support optional. - if (CFG_TAIL_SEEK && try_lseek(fd, bytes, lines)) return; + if (try_lseek(fd, bytes, lines)) return; // Read data until we run out, keep a trailing buffer for (;;) { |