Don't try to stat network mounts in parse_mount_entries, we can't

return a meaningful device for them anyway (suggested by Robert
Shearman).
This commit is contained in:
Alexandre Julliard 2004-09-13 18:14:15 +00:00
parent 68ddf16a1c
commit 8e1e835d11

View file

@ -212,6 +212,11 @@ static char *parse_mount_entries( FILE *f, dev_t dev, ino_t ino )
while ((entry = getmntent( f )))
{
/* don't even bother stat'ing network mounts, there's no meaningful device anyway */
if (!strcmp( entry->mnt_type, "nfs" ) ||
!strcmp( entry->mnt_type, "smbfs" ) ||
!strcmp( entry->mnt_type, "ncpfs" )) continue;
if (stat( entry->mnt_dir, &st ) == -1) continue;
if (st.st_dev != dev || st.st_ino != ino) continue;
if (!strcmp( entry->mnt_type, "supermount" ))