This commit is contained in:
Heinz Mauelshagen 2013-07-29 12:29:05 +02:00
parent d8017b361c
commit e16b7c8ea0
2 changed files with 16 additions and 15 deletions

View File

@ -43,7 +43,7 @@ namespace {
: out_(out),
step_(step),
beginning_of_line_(true),
enabled(true),
enabled_(true),
indent_(0) {
}
@ -54,7 +54,7 @@ namespace {
indent();
}
if (enabled)
if (enabled_)
out_ << t;
return *this;
@ -63,7 +63,7 @@ namespace {
nested_output &operator <<(end_message const &m) {
beginning_of_line_ = true;
if (enabled)
if (enabled_)
out_ << endl;
return *this;
@ -95,16 +95,16 @@ namespace {
}
void enable() {
enabled = true;
enabled_ = true;
}
void disable() {
enabled = false;
enabled_ = false;
}
private:
void indent() {
if (enabled)
if (enabled_)
for (unsigned i = 0; i < indent_; i++)
out_ << ' ';
}
@ -113,7 +113,7 @@ namespace {
unsigned step_;
bool beginning_of_line_;
bool enabled;
bool enabled_;
unsigned indent_;
};
@ -344,7 +344,14 @@ namespace {
int main(int argc, char **argv)
{
int c;
flags fs;
flags fs = {
.check_device_tree = true,
.check_mapping_tree_level1 = true,
.check_mapping_tree_level2 = true,
.ignore_non_fatal_errors = false,
.quiet = false
};
char const shortopts[] = "qhV";
option const longopts[] = {
{ "quiet", no_argument, NULL, 'q'},
@ -356,12 +363,6 @@ int main(int argc, char **argv)
{ NULL, no_argument, NULL, 0 }
};
fs.check_device_tree = true;
fs.check_mapping_tree_level1 = true;
fs.check_mapping_tree_level2 = true;
fs.ignore_non_fatal_errors = false;
fs.quiet = false;
while ((c = getopt_long(argc, argv, shortopts, longopts, NULL)) != -1) {
switch(c) {
case 'h':

View File

@ -42,7 +42,7 @@ namespace {
try {
metadata::ptr md(new metadata(path, metadata_snap));
emitter::ptr e;
uint64_t metadata_snap_root = md->sb_.metadata_snap_;
uint64_t metadata_snap_root = md->sb_.metadata_snap_; /* FIXME: use thin_pool method? */
if (metadata_snap_root) {
md.reset();