> On 22 Oct 2025, at 23:23, Nathan Bossart <nathandbossart@gmail.com> wrote:
>
> On Wed, Sep 10, 2025 at 11:24:36AM +0200, Daniel Gustafsson wrote:
>> I am writing up a patch to move it into long option processing to see
>> what it would look like, will share soon.
>
> Are you still planning to work on this one?
Attached is a v1 which converts all the apps in the tree to allow version and
help arguments at any position.
There was quite the variety of how the help/version arguments were handled,
some apps had partial support in the longopts, some had full support and some
had none. The idea was to make handling consistent across the binaries without
introducing any dependencies or build time changes.
While hacking on this it seemed like a good idea to move to using progname
consistently, and reduce scope in some places from global variables, but
looking at it now I'm less convinced. At the very least it should be ripped
out into its own patch but for now those changes are left in there.
It's far from an exciting patchset but it would be nice to get it done once and
for all. 0002 is a small change to make sure all apps exit with the same code,
I was unable to find a documented rationale for exit(2) so I think it's an
oversight.
--
Daniel Gustafsson