dovecot-2.0: mountpoint_get(): Skip rootfs mounts with Linux.
dovecot at dovecot.org
dovecot at dovecot.org
Mon Aug 9 19:35:14 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/3f5c53f84d0a
changeset: 11966:3f5c53f84d0a
user: Timo Sirainen <tss at iki.fi>
date: Mon Aug 09 17:35:08 2010 +0100
description:
mountpoint_get(): Skip rootfs mounts with Linux.
Fixes fs quota for such systems. Patch by Patrick McLean.
diffstat:
src/lib/mountpoint.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diffs (25 lines):
diff -r 18d95a2d0aba -r 3f5c53f84d0a src/lib/mountpoint.c
--- a/src/lib/mountpoint.c Mon Aug 09 16:58:33 2010 +0100
+++ b/src/lib/mountpoint.c Mon Aug 09 17:35:08 2010 +0100
@@ -47,6 +47,11 @@
# define MNTTYPE_NFS "nfs"
#endif
+/* Linux sometimes has mtab entry for "rootfs" as well as the real root
+ entry. Skip the rootfs. */
+#ifndef MNTTYPE_ROOTFS
+# define MNTTYPE_ROOTFS "rootfs"
+#endif
int mountpoint_get(const char *path, pool_t pool, struct mountpoint *point_r)
{
@@ -191,7 +196,8 @@
}
while ((ent = getmntent(f)) != NULL) {
if (strcmp(ent->mnt_type, MNTTYPE_SWAP) == 0 ||
- strcmp(ent->mnt_type, MNTTYPE_IGNORE) == 0)
+ strcmp(ent->mnt_type, MNTTYPE_IGNORE) == 0 ||
+ strcmp(ent->mnt_type, MNTTYPE_ROOTFS) == 0)
continue;
if (stat(ent->mnt_dir, &st2) == 0 &&
More information about the dovecot-cvs
mailing list