lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aWksWtNyxUlcVvso@fedora>
Date: Thu, 15 Jan 2026 15:06:17 -0300
From: Wander Lairson Costa <wander@...hat.com>
To: Costa Shulyupin <costa.shul@...hat.com>
Cc: Steven Rostedt <rostedt@...dmis.org>, 
	Tomas Glozar <tglozar@...hat.com>, Crystal Wood <crwood@...hat.com>, John Kacur <jkacur@...hat.com>, 
	Ivan Pravdin <ipravdin.official@...il.com>, linux-trace-kernel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1] tools/rtla: Generate optstring from long options

On Thu, Jan 08, 2026 at 11:49:55AM +0200, Costa Shulyupin wrote:
> getopt_long() processes short and long options independently.
> RTLA, like the majority of applications, uses both short and long
> variants for each logical option.
> 
> Since the val member of struct option holds the letter of the short
> variant, the string of short options can be reconstructed from the
> array of long options.
> 
> Add getopt_auto() to generate optstring from an array of long options,
> eliminating the need to maintain separate short option strings.
> 
> Signed-off-by: Costa Shulyupin <costa.shul@...hat.com>
...

That's very clever.

Reviewed-by: Wander Lairson Costa <wander@...hat.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ