From 1ce3f3cca5c2ff07c9b666b58d0913376badc0c4 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 1 Jul 2000 13:35:28 +0000 Subject: [PATCH] Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV, per change in ../m4/ls-mntd-fs.m4. (read_filesystem_list): Ignore symbolic links. --- lib/mountlist.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/mountlist.c b/lib/mountlist.c index 4784140..6f7d07c 100644 --- a/lib/mountlist.c +++ b/lib/mountlist.c @@ -84,7 +84,7 @@ extern int errno; # include #endif -#ifdef MOUNTED_NEXT_DEV /* BeOS. */ +#ifdef MOUNTED_FS_STAT_DEV /* BeOS. */ # include # include #endif @@ -417,7 +417,7 @@ read_filesystem_list (int need_fs_type) } #endif /* MOUNTED_GETMNT. */ -#if defined (MOUNTED_NEXT_DEV) /* BeOS */ +#if defined (MOUNTED_FS_STAT_DEV) /* BeOS */ { /* The next_dev() and fs_stat_dev() system calls give the list of all filesystems, including the information returned by statvfs() @@ -468,7 +468,7 @@ read_filesystem_list (int need_fs_type) strcpy (name + 1, d->d_name); } - if (stat (name, &statbuf) >= 0 && S_ISDIR (statbuf.st_mode)) + if (lstat (name, &statbuf) >= 0 && S_ISDIR (statbuf.st_mode)) { struct rootdir_entry *re; @@ -520,7 +520,7 @@ read_filesystem_list (int need_fs_type) free (re); } } -#endif /* MOUNTED_NEXT_DEV */ +#endif /* MOUNTED_FS_STAT_DEV */ #if defined (MOUNTED_GETFSSTAT) /* __alpha running OSF_1 */ { -- 2.7.4