aboutsummaryrefslogtreecommitdiff
path: root/coreutils/tail.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2016-11-23 14:46:56 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2016-11-23 14:46:56 +0100
commitaf3f42011628585cd5c8f5c1fd4b43f2e370a23d (patch)
tree125ee16d5080008fcf459ad55d91af1dcd488ef9 /coreutils/tail.c
parent5b966c6180c139fba6846d632fd9bc0c34a8e1bc (diff)
downloadbusybox-af3f42011628585cd5c8f5c1fd4b43f2e370a23d.tar.gz
Convert all coreutils/* applets to "new style" applet definitions
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'coreutils/tail.c')
-rw-r--r--coreutils/tail.c30
1 files changed, 25 insertions, 5 deletions
diff --git a/coreutils/tail.c b/coreutils/tail.c
index 57ad0f3b7..99f58ddd8 100644
--- a/coreutils/tail.c
+++ b/coreutils/tail.c
@@ -6,11 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
-
-/* BB_AUDIT SUSv3 compliant (need fancy for -c) */
-/* BB_AUDIT GNU compatible -c, -q, and -v options in 'fancy' configuration. */
-/* http://www.opengroup.org/onlinepubs/007904975/utilities/tail.html */
-
/* Mar 16, 2003 Manuel Novoa III (mjn3@codepoet.org)
*
* Pretty much rewritten to fix numerous bugs and reduce realloc() calls.
@@ -23,9 +18,34 @@
* 6) no check for lseek error
* 7) lseek attempted when count==0 even if arg was +0 (from top)
*/
+//config:config TAIL
+//config: bool "tail"
+//config: default y
+//config: help
+//config: tail is used to print the last specified number of lines
+//config: from files.
+//config:
+//config:config FEATURE_FANCY_TAIL
+//config: bool "Enable extra tail options (-q, -s, -v, and -F)"
+//config: default y
+//config: depends on TAIL
+//config: help
+//config: The options (-q, -s, -v and -F) are provided by GNU tail, but
+//config: are not specific in the SUSv3 standard.
+//config:
+//config: -q Never output headers giving file names
+//config: -s SEC Wait SEC seconds between reads with -f
+//config: -v Always output headers giving file names
+//config: -F Same as -f, but keep retrying
+
+//applet:IF_TAIL(APPLET(tail, BB_DIR_USR_BIN, BB_SUID_DROP))
//kbuild:lib-$(CONFIG_TAIL) += tail.o
+/* BB_AUDIT SUSv3 compliant (need fancy for -c) */
+/* BB_AUDIT GNU compatible -c, -q, and -v options in 'fancy' configuration. */
+/* http://www.opengroup.org/onlinepubs/007904975/utilities/tail.html */
+
//usage:#define tail_trivial_usage
//usage: "[OPTIONS] [FILE]..."
//usage:#define tail_full_usage "\n\n"