git: 58e2ad53b989 - stable/15 - tail: Allow repetitive or contraditory options
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 25 Jul 2026 17:09:32 UTC
The branch stable/15 has been updated by des:
URL: https://cgit.FreeBSD.org/src/commit/?id=58e2ad53b989267bceabfd4ef928bf16e4ee3fe2
commit 58e2ad53b989267bceabfd4ef928bf16e4ee3fe2
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:23 +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 a92eee3881b4..1d76cc59ad61 100644
--- a/usr.bin/tail/tail.c
+++ b/usr.bin/tail/tail.c
@@ -96,8 +96,6 @@ main(int argc, char *argv[])
*/
#define ARG(units, forward, backward) { \
int64_t num; \
- if (style) \
- usage(); \
if (expand_number(optarg, &num)) \
err(1, "illegal offset -- %s", optarg); \
if (num > INT64_MAX / units || num < INT64_MIN / units) \