From: Dodji Seketeli <dodji@redhat.com>
To: libabigail@sourceware.org
Subject: [PATCH, applying to mainline] abidw: Add a -o short option for --out-file
Date: Fri, 08 Mar 2024 18:38:20 +0100 [thread overview]
Message-ID: <87o7bo4oab.fsf@redhat.com> (raw)
Hello,
This patch adds a shortcut -o shortcut option for the --out-file option
of abidw.
* doc/manuals/abidw.rst: Document the -o option.
* tools/abidw.cc (display_usage): Update doc string for the
--out-file|-o option.
(parse_command): Support the -o short option.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
---
doc/manuals/abidw.rst | 2 +-
tools/abidw.cc | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/doc/manuals/abidw.rst b/doc/manuals/abidw.rst
index 1e308e66..13db912f 100644
--- a/doc/manuals/abidw.rst
+++ b/doc/manuals/abidw.rst
@@ -107,7 +107,7 @@ Options
installed by your system's package manager because then
``abidw`` knows where to find it.
- * ``--out-file`` <*file-path*>
+ * ``--out-file | -o`` <*file-path*>
This option instructs ``abidw`` to emit the XML representation of
*path-to-elf-file* into the file *file-path*, rather than emitting
diff --git a/tools/abidw.cc b/tools/abidw.cc
index c8a44dda..fe977b1d 100644
--- a/tools/abidw.cc
+++ b/tools/abidw.cc
@@ -208,7 +208,7 @@ display_usage(const string& prog_name, ostream& out)
<< " --debug-info-dir|-d <dir-path> look for debug info under 'dir-path'\n"
<< " --headers-dir|--hd <path> the path to headers of the elf file\n"
<< " --header-file|--hf <path> the path one header of the elf file\n"
- << " --out-file <file-path> write the output to 'file-path'\n"
+ << " --out-file|-o <file-path> write the output to 'file-path'\n"
<< " --noout do not emit anything after reading the binary\n"
<< " --suppressions|--suppr <path> specify a suppression file\n"
<< " --no-architecture do not emit architecture info in the output\n"
@@ -331,7 +331,8 @@ parse_command_line(int argc, char* argv[], options& opts)
opts.header_files.push_back(argv[j]);
++i;
}
- else if (!strcmp(argv[i], "--out-file"))
+ else if (!strcmp(argv[i], "--out-file")
+ || !strcmp(argv[i], "-o"))
{
if (argc <= i + 1
|| argv[i + 1][0] == '-'
--
2.39.3
--
Dodji
reply other threads:[~2024-03-08 17:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=87o7bo4oab.fsf@redhat.com \
--to=dodji@redhat.com \
--cc=libabigail@sourceware.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).