diff options
author | William Hubbs <w.d.hubbs@gmail.com> | 2014-01-18 13:50:05 -0600 |
---|---|---|
committer | William Hubbs <w.d.hubbs@gmail.com> | 2014-01-18 13:50:05 -0600 |
commit | de186401e5843e376cc12545c2ea35212f5e0490 (patch) | |
tree | 931f6cb37e777cd1efe5a19847e1bf18bccfda00 | |
parent | cdc0dd061bed38be298e714e45cd0faa7cf77bf6 (diff) |
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
-rw-r--r-- | src/rc/fstabinfo.c | 19 |
1 files 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", |