All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Engelhardt <jengelh@inai.de>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Phil Sutter <phil@nwl.cc>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH nft] main: allow for getopt parser from top-level scope only
Date: Thu, 12 Dec 2019 21:35:49 +0100 (CET)	[thread overview]
Message-ID: <nycvar.YFH.7.76.1912122132300.29738@n3.vanv.qr> (raw)
In-Reply-To: <20191212183309.ecfvftcw3rxwm6ni@salvia>


On Thursday 2019-12-12 19:33, Pablo Neira Ayuso wrote:
>> 
>> Or simply stop taking options after the first-non option.
>> This is declared POSIX behavior, and, for glibc, it only needs the
>> POSIXLY_CORRECT environment variable, which can be set ahead of
>> getopt()/getopt_long() call and unset afterwards again.
>
>I think we tried that already, IIRC it breaks: nft list ruleset -a
>which is in the test scripts.

Yes, it will need to be rewritten as `nft -a list ruleset`.

But.. you seem to be just fine with that, based on:

>The most sane approach from programmer perspective is to force users
>to place options upfront.

  reply	other threads:[~2019-12-12 20:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-12 17:14 [PATCH nft] main: allow for getopt parser from top-level scope only Pablo Neira Ayuso
2019-12-12 17:45 ` Phil Sutter
2019-12-12 18:27   ` Jan Engelhardt
2019-12-12 18:33     ` Pablo Neira Ayuso
2019-12-12 20:35       ` Jan Engelhardt [this message]
2019-12-12 18:28   ` Pablo Neira Ayuso
2019-12-13 10:33     ` Phil Sutter
2019-12-13 10:36       ` Pablo Neira Ayuso
2019-12-13 10:40         ` Phil Sutter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=nycvar.YFH.7.76.1912122132300.29738@n3.vanv.qr \
    --to=jengelh@inai.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=phil@nwl.cc \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.