From: Denys Vlasenko Date: Tue, 11 Oct 2016 13:29:38 +0000 (+0200) Subject: more: accept and ignore a bunch of options X-Git-Tag: 1_26_0~158 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=713b5133534d4bd4cfb49caba85eb3f655b6d8fd;p=oweals%2Fbusybox.git more: accept and ignore a bunch of options Alpine Linux stumbled over "more -s": http://bugs.alpinelinux.org/issues/5190 function old new delta more_main 857 872 +15 Signed-off-by: Denys Vlasenko --- diff --git a/util-linux/more.c b/util-linux/more.c index 95cbdd994..07836e29d 100644 --- a/util-linux/more.c +++ b/util-linux/more.c @@ -73,7 +73,16 @@ int more_main(int argc UNUSED_PARAM, char **argv) INIT_G(); - argv++; + /* Parse options */ + /* Accepted but ignored: */ + /* -d Display help instead of ringing bell is pressed */ + /* -f Count logical lines (IOW: long lines are not folded) */ + /* -l Do not pause after any line containing a ^L (form feed) */ + /* -s Squeeze blank lines into one */ + /* -u Suppress underlining */ + getopt32(argv, "dflsu"); + argv += optind; + /* Another popular pager, most, detects when stdout * is not a tty and turns into cat. This makes sense. */ if (!isatty(STDOUT_FILENO))