public inbox for libabigail@sourceware.org
 help / color / mirror / Atom feed
* [PATCH, applying to mainline] abidw: Add a -o short option for --out-file
@ 2024-03-08 17:38 Dodji Seketeli
  0 siblings, 0 replies; only message in thread
From: Dodji Seketeli @ 2024-03-08 17:38 UTC (permalink / raw)
  To: libabigail

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-03-08 17:38 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-08 17:38 [PATCH, applying to mainline] abidw: Add a -o short option for --out-file Dodji Seketeli

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).