From: Petri Latvala <petri.latvala@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>,
Petri Latvala <petri.latvala@intel.com>
Subject: [igt-dev] [PATCH i-g-t] igt_core: Add --version
Date: Mon, 6 Apr 2020 16:15:40 +0300 [thread overview]
Message-ID: <20200406131540.14404-1-petri.latvala@intel.com> (raw)
To help verify correct deployment, add a --version flag that just
prints the IGT-Version text.
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
lib/igt_core.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lib/igt_core.c b/lib/igt_core.c
index 77862498..3f7b9f68 100644
--- a/lib/igt_core.c
+++ b/lib/igt_core.c
@@ -320,6 +320,7 @@ enum {
OPT_SKIP_CRC,
OPT_TRACE_OOPS,
OPT_DEVICE,
+ OPT_VERSION,
OPT_HELP = 'h'
};
@@ -685,6 +686,7 @@ static void print_usage(const char *help_str, bool output_on_stderr)
" --help-description\n"
" --describe\n"
" --device filter\n"
+ " --version\n"
" --help|-h\n");
if (help_str)
fprintf(f, "%s\n", help_str);
@@ -859,6 +861,7 @@ static int common_init(int *argc, char **argv,
{"skip-crc-compare", no_argument, NULL, OPT_SKIP_CRC},
{"trace-on-oops", no_argument, NULL, OPT_TRACE_OOPS},
{"device", required_argument, NULL, OPT_DEVICE},
+ {"version", no_argument, NULL, OPT_VERSION},
{"help", no_argument, NULL, OPT_HELP},
{0, 0, 0, 0}
};
@@ -998,6 +1001,10 @@ static int common_init(int *argc, char **argv,
}
igt_device_filter_set(optarg);
break;
+ case OPT_VERSION:
+ print_version();
+ ret = -1;
+ goto out;
case OPT_HELP:
print_usage(help_str, false);
ret = -1;
--
2.20.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2020-04-06 13:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-06 13:15 Petri Latvala [this message]
2020-04-06 13:18 ` [igt-dev] [PATCH i-g-t] igt_core: Add --version Arkadiusz Hiler
2020-04-06 16:52 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2020-04-06 23:00 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
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=20200406131540.14404-1-petri.latvala@intel.com \
--to=petri.latvala@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=tomi.p.sarvela@intel.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