ref: 58a418061b26a07e335a237af3882aba29d7ad4b
parent: ba407e042e22ed6ed567aa8dd4365da84bff0449
author: gkostka <kostka.grzegorz@gmail.com>
date: Wed Dec 30 20:11:23 EST 2015
lwext4_generic: add verbose mode to generic application
--- a/fs_test/lwext4_generic.c
+++ b/fs_test/lwext4_generic.c
@@ -73,6 +73,9 @@
/**@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 @@
{"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 @@
case 'w':
winpart = true;
break;
+ case 'v':
+ verbose = true;
+ break;
default:
printf("%s", usage);
return false;
@@ -214,6 +221,7 @@
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 @@
return EXIT_FAILURE;
}
+ if (verbose)
+ ext4_dmask_set(DEBUG_ALL);
if (cache_mode)
bc = NULL;