X-Git-Url: https://git.decadent.org.uk/gitweb/?p=nfs-utils.git;a=blobdiff_plain;f=utils%2Fmount%2Fmount.c;h=6b9e1642c43fa1087dada7d38db47ee4126f5906;hp=a668cd97c673f0aff792aaec3e5e99e415eec8d7;hb=e4719f90f77de2ea2c083cbc304b5cc7a7b516bd;hpb=d47f9baba71e92730e94d3361fa1098dc31b7627 diff --git a/utils/mount/mount.c b/utils/mount/mount.c index a668cd9..6b9e164 100644 --- a/utils/mount/mount.c +++ b/utils/mount/mount.c @@ -37,6 +37,7 @@ #include "xcommon.h" #include "nls.h" #include "mount_constants.h" +#include "mount_config.h" #include "nfs_paths.h" #include "nfs_mntent.h" @@ -474,6 +475,8 @@ int main(int argc, char *argv[]) spec = argv[1]; mount_point = argv[2]; + mount_config_init(progname); + argv[2] = argv[0]; /* so that getopt error messages are correct */ while ((c = getopt_long(argc - 2, argv + 2, "rvVwfno:hs", longopts, NULL)) != -1) { @@ -559,6 +562,10 @@ int main(int argc, char *argv[]) mnt_err = EX_USAGE; goto out; } + /* + * Concatenate mount options from the configuration file + */ + mount_opts = mount_config_opts(spec, mount_point, mount_opts); parse_opts(mount_opts, &flags, &extra_opts); @@ -586,6 +593,9 @@ int main(int argc, char *argv[]) if (mnt_err == EX_BG) { printf(_("%s: backgrounding \"%s\"\n"), progname, spec); + printf(_("%s: mount options: \"%s\"\n"), + progname, extra_opts); + fflush(stdout); /*