ref: 2dc690937c6a3d939e0b8d3b68240b7e3e3b6fff
parent: 471bfe94f6abb8f624d9dfb0baaef789e5083b4c
author: gkostka <kostka.grzegorz@gmail.com>
date: Wed Dec 30 20:42:07 EST 2015
fs_test: add version string printf in test apps
--- a/fs_test/lwext4_client.c
+++ b/fs_test/lwext4_client.c
@@ -110,9 +110,10 @@
{"call", required_argument, 0, 'c'},
{"port", required_argument, 0, 'p'},
{"addr", required_argument, 0, 'a'},
+ {"version", no_argument, 0, 'x'},
{0, 0, 0, 0}};
- while (-1 != (c = getopt_long(argc, argv, "c:p:a:", long_options,
+ while (-1 != (c = getopt_long(argc, argv, "c:p:a:x", long_options,
&option_index))) {
switch (c) {
@@ -124,6 +125,10 @@
break;
case 'c':
op_code = optarg;
+ break;
+ case 'x':
+ puts(VERSION);
+ exit(0);
break;
default:
printf("%s", usage);
--- a/fs_test/lwext4_generic.c
+++ b/fs_test/lwext4_generic.c
@@ -172,9 +172,10 @@
{"sbstat", no_argument, 0, 't'},
{"wpart", no_argument, 0, 'w'},
{"verbose", no_argument, 0, 'v'},
+ {"version", no_argument, 0, 'x'},
{0, 0, 0, 0}};
- while (-1 != (c = getopt_long(argc, argv, "i:s:c:q:d:lbtwv",
+ while (-1 != (c = getopt_long(argc, argv, "i:s:c:q:d:lbtwvx",
long_options, &option_index))) {
switch (c) {
@@ -207,6 +208,10 @@
break;
case 'v':
verbose = true;
+ break;
+ case 'x':
+ puts(VERSION);
+ exit(0);
break;
default:
printf("%s", usage);
--- a/fs_test/lwext4_mbr.c
+++ b/fs_test/lwext4_mbr.c
@@ -105,9 +105,10 @@
{"input", required_argument, 0, 'i'},
{"wpart", no_argument, 0, 'w'},
{"verbose", no_argument, 0, 'v'},
+ {"version", no_argument, 0, 'x'},
{0, 0, 0, 0}};
- while (-1 != (c = getopt_long(argc, argv, "i:wv",
+ while (-1 != (c = getopt_long(argc, argv, "i:wvx",
long_options, &option_index))) {
switch (c) {
@@ -119,6 +120,10 @@
break;
case 'v':
verbose = true;
+ break;
+ case 'x':
+ puts(VERSION);
+ exit(0);
break;
default:
printf("%s", usage);
--- a/fs_test/lwext4_mkfs.c
+++ b/fs_test/lwext4_mkfs.c
@@ -116,9 +116,10 @@
{"ext", required_argument, 0, 'e'},
{"wpart", no_argument, 0, 'w'},
{"verbose", no_argument, 0, 'v'},
+ {"version", no_argument, 0, 'x'},
{0, 0, 0, 0}};
- while (-1 != (c = getopt_long(argc, argv, "i:b:e:wv",
+ while (-1 != (c = getopt_long(argc, argv, "i:b:e:wvx",
long_options, &option_index))) {
switch (c) {
@@ -136,6 +137,10 @@
break;
case 'v':
verbose = true;
+ break;
+ case 'x':
+ puts(VERSION);
+ exit(0);
break;
default:
printf("%s", usage);
--- a/fs_test/lwext4_server.c
+++ b/fs_test/lwext4_server.c
@@ -302,9 +302,10 @@
{"verbose", no_argument, 0, 'v'},
{"winpart", no_argument, 0, 'w'},
{"cache_wb", no_argument, 0, 'c'},
+ {"version", no_argument, 0, 'x'},
{0, 0, 0, 0}};
- while (-1 != (c = getopt_long(argc, argv, "i:p:vcw", long_options,
+ while (-1 != (c = getopt_long(argc, argv, "i:p:vcwx", long_options,
&option_index))) {
switch (c) {
@@ -322,6 +323,10 @@
break;
case 'w':
winpart = true;
+ break;
+ case 'x':
+ puts(VERSION);
+ exit(0);
break;
default:
printf("%s", usage);