* [PATCH] abilint: Add prompt message for abnormal operation
@ 2021-11-05 9:17 tangmeng
2021-11-09 10:00 ` Dodji Seketeli
0 siblings, 1 reply; 2+ messages in thread
From: tangmeng @ 2021-11-05 9:17 UTC (permalink / raw)
To: libabigail; +Cc: tangmeng
When using abilint, if the uses the --stdin option and also
provides a file path on the command line, the file path is silently
ignored.
This patch provides a warning to notify the user that the file path is
ignored in that case.
* tools/abilint.cc (parse_command_line): Notify the user when
the path to the file is ignored because the --stdin option
was provided.
Signed-off-by: tangmeng <tangmeng@uniontech.com>
---
tools/abilint.cc | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tools/abilint.cc b/tools/abilint.cc
index 88cf4589..ebf14a71 100644
--- a/tools/abilint.cc
+++ b/tools/abilint.cc
@@ -205,6 +205,14 @@ parse_command_line(int argc, char* argv[], options& opts)
if (opts.file_path.empty())
opts.read_from_stdin = true;
+
+ if (opts.read_from_stdin && !opts.file_path.empty())
+ {
+ emit_prefix(argv[0], cout)
+ << "WARNING: The \'--stdin\' option is used. The "
+ << opts.file_path << " will be ignored automatically\n";
+ }
+
return true;
}
--
2.20.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] abilint: Add prompt message for abnormal operation
2021-11-05 9:17 [PATCH] abilint: Add prompt message for abnormal operation tangmeng
@ 2021-11-09 10:00 ` Dodji Seketeli
0 siblings, 0 replies; 2+ messages in thread
From: Dodji Seketeli @ 2021-11-09 10:00 UTC (permalink / raw)
To: tangmeng; +Cc: libabigail
Hello,
tangmeng <tangmeng@uniontech.com> a écrit:
> When using abilint, if the uses the --stdin option and also
> provides a file path on the command line, the file path is silently
> ignored.
>
> This patch provides a warning to notify the user that the file path is
> ignored in that case.
>
> * tools/abilint.cc (parse_command_line): Notify the user when
> the path to the file is ignored because the --stdin option
> was provided.
>
> Signed-off-by: tangmeng <tangmeng@uniontech.com>
Applied to master, thanks!
Cheers,
--
Dodji
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-09 10:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-05 9:17 [PATCH] abilint: Add prompt message for abnormal operation tangmeng
2021-11-09 10:00 ` 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).