From 3cacbe8178316e0c98c12231b18e032818178497 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Fri, 7 Mar 2008 14:36:15 +0000 Subject: [PATCH] Use struct statfs.f_fstypename if availible (e.g. on OpenBSD) Patch from 2008-03-07 Alexander Larsson * glocalfile.c: (g_local_file_query_filesystem_info): Use struct statfs.f_fstypename if availible (e.g. on OpenBSD) Patch from Jasper Lievisse Adriaanse svn path=/trunk/; revision=6638 --- ChangeLog | 5 +++++ configure.in | 2 +- gio/ChangeLog | 7 +++++++ gio/glocalfile.c | 4 ++++ 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f3dc73e20..eae5c98b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-03-07 Alexander Larsson + + * configure.in: + Look for struct statfs.f_fstypename + 2008-03-07 Tor Lillqvist * README.win32: Updates. diff --git a/configure.in b/configure.in index 3db7b9c74..204ec4892 100644 --- a/configure.in +++ b/configure.in @@ -839,7 +839,7 @@ AC_CHECK_HEADERS([mntent.h sys/mnttab.h sys/vfstab.h sys/mntctl.h sys/sysctl.h f # check for structure fields AC_CHECK_MEMBERS([struct stat.st_mtimensec, struct stat.st_mtim.tv_nsec, struct stat.st_atimensec, struct stat.st_atim.tv_nsec, struct stat.st_ctimensec, struct stat.st_ctim.tv_nsec]) -AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_blocks]) +AC_CHECK_MEMBERS([struct stat.st_blksize, struct stat.st_blocks, struct statfs.f_fstypename]) # Checks for libcharset jm_LANGINFO_CODESET diff --git a/gio/ChangeLog b/gio/ChangeLog index c4098236f..39be63ffd 100644 --- a/gio/ChangeLog +++ b/gio/ChangeLog @@ -1,3 +1,10 @@ +2008-03-07 Alexander Larsson + + * glocalfile.c: + (g_local_file_query_filesystem_info): + Use struct statfs.f_fstypename if availible (e.g. on OpenBSD) + Patch from Jasper Lievisse Adriaanse + 2008-03-06 Tor Lillqvist * gfileinfo.h: Correct milliseconds to microseconds in the doc diff --git a/gio/glocalfile.c b/gio/glocalfile.c index 326685e64..e718e406a 100644 --- a/gio/glocalfile.c +++ b/gio/glocalfile.c @@ -997,7 +997,11 @@ g_local_file_query_filesystem_info (GFile *file, #endif } #ifdef USE_STATFS +#if defined(HAVE_STRUCT_STATFS_FS_TYPENAME) + fstype = g_strdup(statfs_buffer.f_fstypename); +#else fstype = get_fs_type (statfs_buffer.f_type); +#endif if (fstype && g_file_attribute_matcher_matches (attribute_matcher, G_FILE_ATTRIBUTE_FILESYSTEM_TYPE)) -- 2.34.1