summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-08-18 18:36:04 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2006-08-18 18:36:04 +0000
commit5f57935678613334bfa18ee547cb1f22a3a0a7dd (patch)
treee102859dc4d733d8423f0aaf91e26a8c3f9c0d2e /src
parent47c8512a6ff9a6df52f6848ff7881e5c55b719c2 (diff)
downloadcoreutils-5f57935678613334bfa18ee547cb1f22a3a0a7dd.tar.xz
Add support for NetBSD 3.0.
* src/stat.c (USE_STATVFS): Set to 1 if 'struct statvfs' has a field f_fstypename. (STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME): Define also if 'struct statvfs' has a field f_fstypename. This undoes the 2006-08-15 to src/stat.c. * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h. (ME_DUMMY): Treat "kernfs" as a dummy. (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement. * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for sys/statvfs.h. When getmntinfo was found, check its declaration and set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it. * m4/stat-prog.m4 (cu_PREREQ_STAT_PROG): Test also for f_fstypename in struct statvfs.
Diffstat (limited to 'src')
-rw-r--r--src/stat.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/stat.c b/src/stat.c
index 481096d27..4ea66fde7 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -20,8 +20,8 @@
#include <config.h>
#if (STAT_STATVFS \
- && (HAVE_STRUCT_STATVFS_F_BASETYPE \
- || (! HAVE_STRUCT_STATFS_F_FSTYPENAME && HAVE_STRUCT_STATVFS_F_TYPE)))
+ && (HAVE_STRUCT_STATVFS_F_BASETYPE || HAVE_STRUCT_STATVFS_F_FSTYPENAME \
+ || ! HAVE_STRUCT_STATFS_F_FSTYPENAME))
# define USE_STATVFS 1
#else
# define USE_STATVFS 0
@@ -93,7 +93,7 @@
#if HAVE_STRUCT_STATVFS_F_BASETYPE
# define STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME f_basetype
#else
-# if HAVE_STRUCT_STATFS_F_FSTYPENAME
+# if HAVE_STRUCT_STATVFS_F_FSTYPENAME || HAVE_STRUCT_STATFS_F_FSTYPENAME
# define STATXFS_FILE_SYSTEM_TYPE_MEMBER_NAME f_fstypename
# endif
#endif
@@ -136,8 +136,9 @@ static bool interpret_backslash_escapes;
static char const *trailing_delim = "";
/* Return the type of the specified file system.
- Some systems have statfvs.f_basetype[FSTYPSZ]. (AIX, HP-UX, and Solaris)
- Others have statfs.f_fstypename[MFSNAMELEN]. (NetBSD 1.5.2)
+ Some systems have statfvs.f_basetype[FSTYPSZ] (AIX, HP-UX, and Solaris).
+ Others have statvfs.f_fstypename[_VFS_NAMELEN] (NetBSD 3.0).
+ Others have statfs.f_fstypename[MFSNAMELEN] (NetBSD 1.5.2).
Still others have neither and have to get by with f_type (Linux). */
static char const *
human_fstype (STRUCT_STATVFS const *statfsbuf)