From: Karel Zak Date: Wed, 21 Sep 2016 12:32:47 +0000 (+0200) Subject: findmnt: (verify) add options verification X-Git-Tag: v2.29-rc1~33 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=67260dc4680f3b72c3a4cbd8d0ccb3ac38f60711;p=thirdparty%2Futil-linux.git findmnt: (verify) add options verification Signed-off-by: Karel Zak --- diff --git a/misc-utils/findmnt-verify.c b/misc-utils/findmnt-verify.c index 547703ca82..52bf8518b1 100644 --- a/misc-utils/findmnt-verify.c +++ b/misc-utils/findmnt-verify.c @@ -216,12 +216,34 @@ done: return 0; } +static int verify_options(struct verify_context *vfy) +{ + const char *opts; + + opts = mnt_fs_get_vfs_options(vfy->fs); + if (opts) + verify_ok(vfy, _("VFS options: %s"), opts); + + opts = mnt_fs_get_fs_options(vfy->fs); + if (opts) + verify_ok(vfy, _("FS options: %s"), opts); + + opts = mnt_fs_get_user_options(vfy->fs); + if (opts) + verify_ok(vfy, _("userspace options: %s"), opts); + + return 0; +} + static int verify_filesystem(struct verify_context *vfy) { int rc = 0; - if (!mnt_fs_is_swaparea(vfy->fs)) + if (!mnt_fs_is_swaparea(vfy->fs)) { rc = verify_target(vfy); + if (!rc) + rc = verify_options(vfy); + } if (!rc) verify_source(vfy);