btrfs-progs: property: use pr_verbose for messages
Replace printf by the level-aware helper. No change for commands that don't have the global -q/-v options, otherwise the output can be quieted. Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
a2ab9a56ce
commit
c98f9d0392
|
@ -141,7 +141,7 @@ static int prop_read_only(enum prop_object_type type,
|
||||||
return -errno;
|
return -errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("ro=%s\n", read_only ? "true" : "false");
|
pr_verbose(LOG_DEFAULT, "ro=%s\n", read_only ? "true" : "false");
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -162,7 +162,7 @@ static int prop_label(enum prop_object_type type,
|
||||||
|
|
||||||
ret = get_label((char *) object, label);
|
ret = get_label((char *) object, label);
|
||||||
if (!ret)
|
if (!ret)
|
||||||
fprintf(stdout, "label=%s\n", label);
|
pr_verbose(LOG_DEFAULT, "label=%s\n", label);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -226,7 +226,7 @@ static int prop_compression(enum prop_object_type type,
|
||||||
error("failed to get compression for %s: %m", object);
|
error("failed to get compression for %s: %m", object);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
fprintf(stdout, "compression=%.*s\n", (int)len, buf);
|
pr_verbose(LOG_DEFAULT, "compression=%.*s\n", (int)len, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
@ -420,7 +420,7 @@ static int dump_prop(const struct prop_handler *prop,
|
||||||
if (!name_and_help)
|
if (!name_and_help)
|
||||||
ret = prop->handler(type, object, prop->name, NULL, false);
|
ret = prop->handler(type, object, prop->name, NULL, false);
|
||||||
else
|
else
|
||||||
printf("%-20s%s\n", prop->name, prop->desc);
|
pr_verbose(LOG_DEFAULT, "%-20s%s\n", prop->name, prop->desc);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue