[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 3/6] mount: ignore mounted filesystems if --all is given
From: |
Justus Winter |
Subject: |
[PATCH 3/6] mount: ignore mounted filesystems if --all is given |
Date: |
Thu, 4 Jul 2013 18:45:38 +0200 |
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.
---
utils/mount.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/utils/mount.c b/utils/mount.c
index 73a7539..77b2138 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);
}
--
1.7.10.4
- Updated patches for mount, add umount, Justus Winter, 2013/07/04
- [PATCH 3/6] mount: ignore mounted filesystems if --all is given,
Justus Winter <=
- [PATCH 1/6] sutils: fix the semantic of -t, --types in fstab.c, Justus Winter, 2013/07/04
- [PATCH 4/6] mount: handle -t auto, Justus Winter, 2013/07/04
- [PATCH 5/6] sutils: allow multiple entries for the device "none", Justus Winter, 2013/07/04
- [PATCH 2/6] mount: implement -O, --test-opts, Justus Winter, 2013/07/04
- [PATCH 6/6] umount: add a umount utility, Justus Winter, 2013/07/04
- Re: Updated patches for mount, add umount, Samuel Thibault, 2013/07/04