Fix quiet usage

EINFO_QUIET will always been unset when we first do unsetenv("EINFO_QUIET") and
later query it again anyway..
This commit is contained in:
Christian Ruppert 2012-08-18 23:21:40 +02:00
parent aa7e2cd1fe
commit 8dc06e3259

View File

@ -393,8 +393,7 @@ mountinfo(int argc, char **argv)
bool quiet; bool quiet;
char *this_path; char *this_path;
/* Ensure that we are only quiet when explicitly told to be */ quiet = rc_yesno(getenv("EINFO_QUIET"));
unsetenv("EINFO_QUIET");
#define DO_REG(_var) \ #define DO_REG(_var) \
if (_var) free(_var); \ if (_var) free(_var); \
@ -475,7 +474,6 @@ mountinfo(int argc, char **argv)
REG_FREE(args.skip_options_regex); REG_FREE(args.skip_options_regex);
result = EXIT_FAILURE; result = EXIT_FAILURE;
quiet = rc_yesno(getenv("EINFO_QUIET"));
/* We should report the mounts in reverse order to ease unmounting */ /* We should report the mounts in reverse order to ease unmounting */
TAILQ_FOREACH_REVERSE(s, nodes, rc_stringlist, entries) { TAILQ_FOREACH_REVERSE(s, nodes, rc_stringlist, entries) {