git: 9af47fc3a369 - stable/14 - tail: Allow repetitive or contraditory options

Dag-Erling Smørgrav <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.src
Message-ID <6a64edd3.1fda7.cc60260__25621.2198337138$1784999419$gmane$org@gitrepo.freebsd.org>
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 <[email protected]>
AuthorDate: 2026-07-13 06:42:40 +0000
Commit:     Dag-Erling Smørgrav <[email protected]>
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 )	\
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.