From: Wander Lairson Costa <wander@redhat.com>
To: Costa Shulyupin <costa.shul@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Tomas Glozar <tglozar@redhat.com>,
Crystal Wood <crwood@redhat.com>, John Kacur <jkacur@redhat.com>,
Ivan Pravdin <ipravdin.official@gmail.com>,
linux-trace-kernel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] tools/rtla: Generate optstring from long options
Date: Thu, 15 Jan 2026 15:06:17 -0300 [thread overview]
Message-ID: <aWksWtNyxUlcVvso@fedora> (raw)
In-Reply-To: <20260108095011.2115719-1-costa.shul@redhat.com>
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@redhat.com>
...
That's very clever.
Reviewed-by: Wander Lairson Costa <wander@redhat.com>
prev parent reply other threads:[~2026-01-15 18:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-08 9:49 [PATCH v1] tools/rtla: Generate optstring from long options Costa Shulyupin
2026-01-15 18:06 ` Wander Lairson Costa [this message]
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=aWksWtNyxUlcVvso@fedora \
--to=wander@redhat.com \
--cc=costa.shul@redhat.com \
--cc=crwood@redhat.com \
--cc=ipravdin.official@gmail.com \
--cc=jkacur@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglozar@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox