@@ -52,13 +52,13 @@ static int cur_index;
static xfs_ino_t cur_ino;
-static int show_progress = 0;
-static int stop_on_read_error = 0;
+static bool show_progress = false;
+static bool stop_on_read_error = false;
static int max_extent_size = DEFAULT_MAX_EXT_SIZE;
-static int obfuscate = 1;
-static int zero_stale_data = 1;
-static int show_warnings = 0;
-static int progress_since_warning = 0;
+static bool obfuscate = true;
+static bool zero_stale_data = true;
+static bool show_warnings = false;
+static bool progress_since_warning = false;
static bool stdout_metadump;
void
@@ -101,7 +101,7 @@ print_warning(const char *fmt, ...)
fprintf(stderr, "%s%s: %s\n", progress_since_warning ? "\n" : "",
progname, buf);
- progress_since_warning = 0;
+ progress_since_warning = false;
}
static void
@@ -122,7 +122,7 @@ print_progress(const char *fmt, ...)
f = stdout_metadump ? stderr : stdout;
fprintf(f, "\r%-59s", buf);
fflush(f);
- progress_since_warning = 1;
+ progress_since_warning = true;
}
/*
@@ -2659,9 +2659,9 @@ metadump_f(
char *p;
exitcode = 1;
- show_progress = 0;
- show_warnings = 0;
- stop_on_read_error = 0;
+ show_progress = false;
+ show_warnings = false;
+ stop_on_read_error = false;
if (mp->m_sb.sb_magicnum != XFS_SB_MAGIC) {
print_warning("bad superblock magic number %x, giving up",
@@ -2682,13 +2682,13 @@ metadump_f(
while ((c = getopt(argc, argv, "aegm:ow")) != EOF) {
switch (c) {
case 'a':
- zero_stale_data = 0;
+ zero_stale_data = false;
break;
case 'e':
- stop_on_read_error = 1;
+ stop_on_read_error = true;
break;
case 'g':
- show_progress = 1;
+ show_progress = true;
break;
case 'm':
max_extent_size = (int)strtol(optarg, &p, 0);
@@ -2699,10 +2699,10 @@ metadump_f(
}
break;
case 'o':
- obfuscate = 0;
+ obfuscate = false;
break;
case 'w':
- show_warnings = 1;
+ show_warnings = true;
break;
default:
print_warning("bad option for metadump command");