X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=utils%2Fmount%2Fmount.c;h=4da900240e249eda79c54de0291ea42c11c5d1ab;hb=390e67de5d9fe919d1894359536f0c5527fa2331;hp=45428b0c0662cc60400b5935d8d7cb0c1604bdb5;hpb=cb2342b123ded9f074345e15e5ffc0dbfeb095e0;p=nfs-utils.git diff --git a/utils/mount/mount.c b/utils/mount/mount.c index 45428b0..4da9002 100644 --- a/utils/mount/mount.c +++ b/utils/mount/mount.c @@ -179,6 +179,11 @@ int add_mtab(char *fsname, char *mount_point, char *fstype, int flags, char *opt ment.mnt_freq = 0; ment.mnt_passno= 0; + if(flags & MS_REMOUNT) { + update_mtab(ment.mnt_dir, &ment); + return 0; + } + lock_mtab(); if ((mtab = setmntent(MOUNTED, "a+")) == NULL) { @@ -443,18 +448,18 @@ int main(int argc, char *argv[]) start_statd(); } - if (fake) - return 0; if (mnt_err) exit(EX_FAIL); - mnt_err = do_mount_syscall(spec, mount_point, - nfs_mount_vers == 4 ? "nfs4" : "nfs", - flags, mount_opts); - - if (mnt_err) { - mount_error(mount_point); - exit(EX_FAIL); + if (!fake) { + mnt_err = do_mount_syscall(spec, mount_point, + nfs_mount_vers == 4 ? "nfs4" : "nfs", + flags, mount_opts); + + if (mnt_err) { + mount_error(mount_point); + exit(EX_FAIL); + } } if (!nomtab)