Mercurial > dovecot > core-2.2
changeset 6039:3887591e7a54 HEAD
Skip over autofs entries. Patch by Mike Brudenell
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Tue, 17 Jul 2007 20:39:27 +0300 |
parents | cadb5b7cd919 |
children | fef4aad133dd |
files | src/lib/mountpoint.c |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib/mountpoint.c Mon Jul 16 10:21:56 2007 +0300 +++ b/src/lib/mountpoint.c Tue Jul 17 20:39:27 2007 +0300 @@ -37,6 +37,12 @@ # define MNTTYPE_IGNORE "ignore" #endif +/* autofs mounts will show two entries. First for autofs and second for the + actual filesystem type. We want the second one. */ +#ifndef MNTTYPE_AUTOFS +# define MNTTYPE_AUTOFS "autofs" +#endif + int mountpoint_get(const char *path, pool_t pool, struct mountpoint *point_r) { #ifdef MOUNTPOINT_UNKNOWN @@ -96,6 +102,7 @@ } while ((getmntent(f, &ent)) == 0) { if (strcmp(ent.mnt_fstype, MNTTYPE_SWAP) == 0 || + strcmp(ent.mnt_fstype, MNTTYPE_AUTOFS) == 0 || strcmp(ent.mnt_fstype, MNTTYPE_IGNORE) == 0) continue;