diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2013-07-05 17:13:29 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-08-28 23:11:51 +0200 |
commit | bf827fd801c76175d268b688f3bf9c757fa9e189 (patch) | |
tree | 47ab1cb870ce34aed5f26d015f16bf72a6508635 /utils | |
parent | 61c5d308d97dec46f856085b0cd07dfbd5c76a16 (diff) |
mount: ignore mounted filesystems if --all is given
Linux' mount utility ignores mounted filesystems if mount --all is
invoked. This patch makes our mount do the same.
utils/mount.c (main): Ignore mounted filesystems if --all is given.
Diffstat (limited to 'utils')
-rw-r--r-- | utils/mount.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/utils/mount.c b/utils/mount.c index 73a75391..77b2138e 100644 --- a/utils/mount.c +++ b/utils/mount.c @@ -631,6 +631,15 @@ main (int argc, char **argv) if (! match_options (&fs->mntent)) continue; + + fsys_t mounted; + err = fs_fsys (fs, &mounted); + if (err) + error (0, err, "cannot determine if %s is already mounted", + fs->mntent.mnt_fsname); + + if (mounted != MACH_PORT_NULL) + continue; } err |= do_mount (fs, remount); } |