linux-rt-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] rt-tests: oslat: print version string
@ 2021-02-11  4:26 John Kacur
  0 siblings, 0 replies; only message in thread
From: John Kacur @ 2021-02-11  4:26 UTC (permalink / raw)
  To: RT
  Cc: Daniel Wagner, Clark Williams, John Kacur, Pradipta Kumar Sahoo,
	Reported-by : Peter Xu

During the streamlining of the command line options something went awry
with the version. The author of oslat wishes to always print the version
string. This allows us to just exit in the case of -v

Fixes e411219d27b1

Reported-by: Pradipta Kumar Sahoo <psahoo@redhat.com>
Reported-by: Reported-by: Peter Xu <peterx@redhat.com>

Signed-off-by: John Kacur <jkacur@redhat.com>
---
 src/oslat/oslat.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/oslat/oslat.c b/src/oslat/oslat.c
index 5b7e0d5b5d5c..639381e75bc6 100644
--- a/src/oslat/oslat.c
+++ b/src/oslat/oslat.c
@@ -657,8 +657,8 @@ static void parse_options(int argc, char *argv[])
 			break;
 		case 'v':
 			/*
-			 * Because we always dump the version even before parsing options,
-			 * what we need to do is to quit..
+			 * We always print the version before parsing options
+			 * so just exit
 			 */
 			exit(0);
 			break;
@@ -736,7 +736,7 @@ int main(int argc, char *argv[])
 	g.workload_mem_size = WORKLOAD_MEM_SIZE;
 	/* Run the main thread on cpu0 by default */
 	g.cpu_main_thread = 0;
-
+	printf("oslat V %1.2f\n", VERSION);
 	parse_options(argc, argv);
 
 	TEST(mlockall(MCL_CURRENT | MCL_FUTURE) == 0);
-- 
2.26.2


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

only message in thread, other threads:[~2021-02-11  4:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-11  4:26 [PATCH 1/2] rt-tests: oslat: print version string John Kacur

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 NNTP newsgroup(s).