From de186401e5843e376cc12545c2ea35212f5e0490 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Sat, 18 Jan 2014 13:50:05 -0600 Subject: fstabinfo: fix mount and remount The mount and remount options should always be processed. They were only being processed if -q was not on the command line. X-Gentoo-Bug: 498206 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=498206 --- src/rc/fstabinfo.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/rc/fstabinfo.c b/src/rc/fstabinfo.c index 475212a3..99eb7bc0 100644 --- a/src/rc/fstabinfo.c +++ b/src/rc/fstabinfo.c @@ -298,15 +298,8 @@ fstabinfo(int argc, char **argv) continue; } - /* No point in outputting if quiet */ - if (rc_yesno(getenv("EINFO_QUIET"))) - continue; - + /* mount or remount? */ switch (output) { - case OUTPUT_BLOCKDEV: - printf("%s\n", ENT_BLOCKDEVICE(ent)); - break; - case OUTPUT_MOUNT: result += do_mount(ent, false); break; @@ -314,6 +307,16 @@ fstabinfo(int argc, char **argv) case OUTPUT_REMOUNT: result += do_mount(ent, true); break; + } + + /* No point in outputting if quiet */ + if (rc_yesno(getenv("EINFO_QUIET"))) + continue; + + switch (output) { + case OUTPUT_BLOCKDEV: + printf("%s\n", ENT_BLOCKDEVICE(ent)); + break; case OUTPUT_MOUNTARGS: printf("-o %s -t %s %s %s\n", -- cgit v1.2.3