From: Jim Meyering Date: Sat, 1 Jul 2000 13:35:28 +0000 (+0000) Subject: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV, X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9576a0ca580522ea2a9e9f2947b0b187669a3bc9;p=pspp Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV, per change in ../m4/ls-mntd-fs.m4. (read_filesystem_list): Ignore symbolic links. --- diff --git a/lib/mountlist.c b/lib/mountlist.c index 4784140a14..6f7d07cbc1 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 */ {