On Thu, 9 Apr 2026 10:13:26 +1000
David Gibson
On Wed, Apr 08, 2026 at 11:40:22PM +0200, Stefano Brivio wrote:
On Tue, 7 Apr 2026 13:16:25 +1000 David Gibson
wrote: Port specifier strings are made up of ',' separated chunks. Rework the logic we use to step through the chunks.
Specifically, maintain a pointer to the end of each chunk as well as the start. This is not really used yet, but will be useful in future.
This also has side effect on semantics. Previously an empty specifier (0 chunks) was not accepted. Now it is, and will be treated as an "exclude only" spec which excludes only ephemeral ports.
Not really, because getopt_long() wants an argument for those options anyway.
This allows an *empty* specifier, not a missing one. i.e. $ pasta -t '' -u ''
That's a kind of weird thing to do, but it does work after this patch.
Ah, oops, right, of course. -- Stefano