From 8dc06e325943de7f3e04ddfe42da9143db7046cd Mon Sep 17 00:00:00 2001 From: Christian Ruppert Date: Sat, 18 Aug 2012 23:21:40 +0200 Subject: Fix quiet usage EINFO_QUIET will always been unset when we first do unsetenv("EINFO_QUIET") and later query it again anyway.. --- src/rc/mountinfo.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/rc/mountinfo.c b/src/rc/mountinfo.c index e5d1d3f2..eaace13f 100644 --- a/src/rc/mountinfo.c +++ b/src/rc/mountinfo.c @@ -393,8 +393,7 @@ mountinfo(int argc, char **argv) bool quiet; char *this_path; - /* Ensure that we are only quiet when explicitly told to be */ - unsetenv("EINFO_QUIET"); + quiet = rc_yesno(getenv("EINFO_QUIET")); #define DO_REG(_var) \ if (_var) free(_var); \ @@ -475,7 +474,6 @@ mountinfo(int argc, char **argv) REG_FREE(args.skip_options_regex); result = EXIT_FAILURE; - quiet = rc_yesno(getenv("EINFO_QUIET")); /* We should report the mounts in reverse order to ease unmounting */ TAILQ_FOREACH_REVERSE(s, nodes, rc_stringlist, entries) { -- cgit v1.2.3