git: 9af47fc3a369 - stable/14 - tail: Allow repetitive or contraditory options
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 25 Jul 2026 17:09:39 UTC
The branch stable/14 has been updated by des:
URL: https://cgit.FreeBSD.org/src/commit/?id=9af47fc3a369792b7ed1633d5c8bc5d5bacf8a32
commit 9af47fc3a369792b7ed1633d5c8bc5d5bacf8a32
Author: Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2026-07-13 06:42:40 +0000
Commit: Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2026-07-25 17:09:29 +0000
tail: Allow repetitive or contraditory options
Unlike its GNU counterpart, our tail(1) has always errored out if given
repetitive or contradictory options, even prior to Keith Bostic's 1991
reimplementation. There is no good reason to continue to do so, not
even tradition, since many other commands (including head(1)) simply
apply the rightmost option in cases like this.
MFC after: 1 week
Reviewed by: allanjude, markj
Differential Revision: https://reviews.freebsd.org/D58192
(cherry picked from commit 9fc14dbe4897c4541113b9ba98236fbd7eb75380)
---
usr.bin/tail/tail.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/usr.bin/tail/tail.c b/usr.bin/tail/tail.c
index c206b11863a5..0cd1896ef276 100644
--- a/usr.bin/tail/tail.c
+++ b/usr.bin/tail/tail.c
@@ -105,8 +105,6 @@ main(int argc, char *argv[])
* -r is the entire file, not 10 lines.
*/
#define ARG(units, forward, backward) { \
- if (style) \
- usage(); \
if (expand_number(optarg, &off)) \
err(1, "illegal offset -- %s", optarg); \
if (off > INT64_MAX / units || off < INT64_MIN / units ) \