diff options
| author | gkostka <kostka.grzegorz@gmail.com> | 2015-12-31 01:11:23 +0100 |
|---|---|---|
| committer | gkostka <kostka.grzegorz@gmail.com> | 2015-12-31 01:11:23 +0100 |
| commit | 58a418061b26a07e335a237af3882aba29d7ad4b (patch) | |
| tree | 38511c58d64af00b4195cff2745c2ec693c48d42 | |
| parent | ba407e042e22ed6ed567aa8dd4365da84bff0449 (diff) | |
lwext4_generic: add verbose mode to generic application
| -rw-r--r-- | fs_test/lwext4_generic.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/fs_test/lwext4_generic.c b/fs_test/lwext4_generic.c index dc6023a..34f9b1b 100644 --- a/fs_test/lwext4_generic.c +++ b/fs_test/lwext4_generic.c @@ -73,6 +73,9 @@ static bool sbstat = false; /**@brief Indicates that input is windows partition.*/ static bool winpart = false; +/**@brief Verbose mode*/ +static bool verbose = 0; + /**@brief Block device handle.*/ static struct ext4_blockdev *bd; @@ -168,9 +171,10 @@ static bool parse_opt(int argc, char **argv) {"bstat", no_argument, 0, 'b'}, {"sbstat", no_argument, 0, 't'}, {"wpart", no_argument, 0, 'w'}, + {"verbose", no_argument, 0, 'v'}, {0, 0, 0, 0}}; - while (-1 != (c = getopt_long(argc, argv, "i:s:c:q:d:lbtw", + while (-1 != (c = getopt_long(argc, argv, "i:s:c:q:d:lbtwv", long_options, &option_index))) { switch (c) { @@ -201,6 +205,9 @@ static bool parse_opt(int argc, char **argv) case 'w': winpart = true; break; + case 'v': + verbose = true; + break; default: printf("%s", usage); return false; @@ -214,6 +221,7 @@ int main(int argc, char **argv) if (!parse_opt(argc, argv)) return EXIT_FAILURE; + printf("ext4_generic\n"); printf("test conditions:\n"); printf("\timput name: %s\n", input_name); printf("\trw size: %d\n", rw_szie); @@ -225,6 +233,8 @@ int main(int argc, char **argv) return EXIT_FAILURE; } + if (verbose) + ext4_dmask_set(DEBUG_ALL); if (cache_mode) bc = NULL; |
