From decde3ed5ef3767bf65f3ac31b3df3cef7b18637 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 8 Oct 1994 16:45:32 +0000 Subject: [PATCH] GNU file utilities --- lib/Makefile.in | 1 + lib/fsusage.c | 2 +- lib/mountlist.c | 11 +++++++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/Makefile.in b/lib/Makefile.in index c9d9450b2..e1388ff90 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -29,6 +29,7 @@ YACC = @YACC@ exec_prefix = @exec_prefix@ libdir = $(exec_prefix)/lib + SOURCES = getdate.y posixtm.y \ argmatch.c backupfile.c basename.c dirname.c eaccess.c \ error.c filemode.c fsusage.c full-write.c getopt.c getopt1.c \ diff --git a/lib/fsusage.c b/lib/fsusage.c index 503b3875e..f326c3759 100644 --- a/lib/fsusage.c +++ b/lib/fsusage.c @@ -170,7 +170,7 @@ get_fs_usage (path, disk, fsp) #endif #endif -#ifdef HAVE_SYS_STATVFS_H /* SVR4. */ +#ifdef STAT_STATVFS /* SVR4. */ struct statvfs fsd; if (statvfs (path, &fsd) < 0) diff --git a/lib/mountlist.c b/lib/mountlist.c index a39461d87..91d18b8c3 100644 --- a/lib/mountlist.c +++ b/lib/mountlist.c @@ -40,6 +40,10 @@ char *xrealloc (); char *xstrdup (); void error (); +#ifdef HAVE_SYS_PARAM_H +#include +#endif + #if defined (MOUNTED_GETFSSTAT) /* __alpha running OSF_1 */ # include # include @@ -62,7 +66,6 @@ void error (); #endif #ifdef MOUNTED_GETMNT /* Ultrix. */ -#include #include #include #endif @@ -120,7 +123,7 @@ xatoi (cp) } #endif /* MOUNTED_GETMNTENT1. */ -#ifdef MOUNTED_GETMNTINFO /* 4.4BSD. */ +#if defined (MOUNTED_GETMNTINFO) && !defined (__NetBSD__) static char * fstype_to_string (t) short t; @@ -248,7 +251,11 @@ read_filesystem_list (need_fs_type, all_fs) me = (struct mount_entry *) xmalloc (sizeof (struct mount_entry)); me->me_devname = xstrdup (fsp->f_mntfromname); me->me_mountdir = xstrdup (fsp->f_mntonname); +#ifdef __NetBSD__ + me->me_type = fsp->f_fstypename; +#else me->me_type = fstype_to_string (fsp->f_type); +#endif me->me_dev = -1; /* Magic; means not known yet. */ me->me_next = NULL; -- 2.11.0