summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2005-12-07 13:54:11 +0100
committerJens Axboe <axboe@suse.de>2005-12-07 13:54:11 +0100
commit19ec784771d707cde23b6f494b36cc84e673cf63 (patch)
treeb1c3033b6cb19dd40d180bbbf9100caa3515a24d
parent9849336064f8c48ae17f1e7f1cc7ef3c0610ea4e (diff)
[PATCH] fio: Add version info print
-rw-r--r--README.fio1
-rw-r--r--fio-ini.c7
2 files changed, 7 insertions, 1 deletions
diff --git a/README.fio b/README.fio
index f138fb1..c93a22d 100644
--- a/README.fio
+++ b/README.fio
@@ -19,6 +19,7 @@ $ fio
-l Generate per-job latency logs
-w Generate per-job bandwidth logs
-f <file> Read <file> for job descriptions
+ -v Print version information and exit
The <jobs> format is as follows:
diff --git a/fio-ini.c b/fio-ini.c
index ab0c0d3..748a29c 100644
--- a/fio-ini.c
+++ b/fio-ini.c
@@ -35,6 +35,8 @@
#define DEF_USE_THREAD (0)
#define DEF_FILE_SIZE (1024 * 1024 * 1024UL)
+static char fio_version_string[] = "fio 1.0";
+
static int repeatable = DEF_RAND_REPEAT;
static char *ini_file;
static int max_jobs = MAX_JOBS;
@@ -818,7 +820,7 @@ static void parse_cmd_line(int argc, char *argv[])
{
int c;
- while ((c = getopt(argc, argv, "s:b:t:r:R:o:f:lw")) != EOF) {
+ while ((c = getopt(argc, argv, "s:b:t:r:R:o:f:lwv")) != EOF) {
switch (c) {
case 's':
def_thread.sequential = !!atoi(optarg);
@@ -852,6 +854,9 @@ static void parse_cmd_line(int argc, char *argv[])
case 'w':
write_bw_log = 1;
break;
+ case 'v':
+ printf("%s\n", fio_version_string);
+ exit(0);
}
}
}