* mountlist.c: use a better feature test for distinguishing
old-style 4.4BSD getmntinfo from new-style 4.4BSD getmntinfo. (NetBSD defines MOUNT_UFS, etc, but as strings rather than integers.)
Этот коммит содержится в:
родитель
f391406b17
Коммит
221bc1cb83
@ -43,6 +43,7 @@
|
||||
#undef STAT_STATFS3_OSF1
|
||||
#undef STAT_STATFS4
|
||||
#undef STAT_STATVFS
|
||||
#undef HAVE_F_FSTYPENAME
|
||||
|
||||
/* Define umode_t if your system does not provide it */
|
||||
#undef umode_t
|
||||
|
@ -69,13 +69,6 @@ void free (void *ptr);
|
||||
#include <sys/vfs.h>
|
||||
#endif
|
||||
|
||||
/* 4.4BSD2 derived systems */
|
||||
#if defined(__bsdi__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
|
||||
# ifndef MOUNT_UFS
|
||||
# define xBSD
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* void error (void); FIXME -- needed? */
|
||||
|
||||
#ifdef DOLPHIN
|
||||
|
@ -727,11 +727,21 @@ AC_DEFUN(AC_GET_FS_INFO, [
|
||||
if test $fu_cv_sys_mounted_getmntinfo = yes; then
|
||||
list_mounted_fs=found
|
||||
AC_DEFINE(MOUNTED_GETMNTINFO)
|
||||
AC_MSG_CHECKING([if struct statfs has f_fstypename])
|
||||
AC_CACHE_VAL(fu_cv_sys_mounted_f_fstypename,
|
||||
[
|
||||
AC_EGREP_HEADER(f_type;, sys/mount.h, ok=yes, ok=)
|
||||
test -n "$ok" \
|
||||
&& fu_cv_sys_mounted_f_fstypename=yes \
|
||||
|| fu_cv_sys_mounted_f_fstypename=no
|
||||
])
|
||||
AC_MSG_RESULT($fu_cv_sys_mounted_f_fstypename)
|
||||
if test $fu_cv_sys_mounted_f_fstypename = yes; then
|
||||
AC_DEFINE(HAVE_F_FSTYPENAME)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# FIXME: add a test for netbsd-1.1 here
|
||||
|
||||
if test -z "$list_mounted_fs"; then
|
||||
# Ultrix
|
||||
AC_MSG_CHECKING([for getmnt function])
|
||||
|
@ -1,3 +1,10 @@
|
||||
Mon Feb 7 11:44:23 2000 Dan Winship <danw@helixcode.com>
|
||||
|
||||
* mountlist.c: use a better feature test for distinguishing
|
||||
old-style 4.4BSD getmntinfo from new-style 4.4BSD getmntinfo.
|
||||
(NetBSD defines MOUNT_UFS, etc, but as strings rather than
|
||||
integers.)
|
||||
|
||||
2000-02-04 "David H.Martin" <dmartina@usa.net>
|
||||
|
||||
* src/widget.c (input_new): Change NULL to empty strings and avoid
|
||||
|
@ -84,13 +84,6 @@ void free (void *ptr);
|
||||
#include <sys/vfs.h>
|
||||
#endif
|
||||
|
||||
/* 4.4BSD2 derived systems */
|
||||
#if defined(__bsdi__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD__)
|
||||
# ifndef MOUNT_UFS
|
||||
# define xBSD
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* void error (void); FIXME -- needed? */
|
||||
|
||||
#ifdef DOLPHIN
|
||||
@ -124,7 +117,7 @@ static int xatoi (char *cp)
|
||||
}
|
||||
#endif /* MOUNTED_GETMNTENT1. */
|
||||
|
||||
#if defined (MOUNTED_GETMNTINFO) && !defined (xBSD)
|
||||
#if defined (MOUNTED_GETMNTINFO) && !defined (HAVE_F_FSTYPENAME)
|
||||
static char *fstype_to_string (short t)
|
||||
{
|
||||
switch (t) {
|
||||
@ -241,7 +234,7 @@ struct mount_entry *read_filesystem_list (int need_fs_type, int all_fs)
|
||||
me = (struct mount_entry *) malloc (sizeof (struct mount_entry));
|
||||
me->me_devname = strdup (fsp->f_mntfromname);
|
||||
me->me_mountdir = strdup (fsp->f_mntonname);
|
||||
#ifdef xBSD
|
||||
#ifdef HAVE_F_FSTYPENAME
|
||||
me->me_type = strdup (fsp->f_fstypename);
|
||||
#else
|
||||
me->me_type = fstype_to_string (fsp->f_type);
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user