Use struct statfs.f_fstypename if availible (e.g. on OpenBSD) Patch from
authorAlexander Larsson <alexl@redhat.com>
Fri, 7 Mar 2008 14:36:15 +0000 (14:36 +0000)
committerAlexander Larsson <alexl@src.gnome.org>
Fri, 7 Mar 2008 14:36:15 +0000 (14:36 +0000)
2008-03-07  Alexander Larsson  <alexl@redhat.com>

        * 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
configure.in
gio/ChangeLog
gio/glocalfile.c

index f3dc73e20464bf2def04df50c57de6d9f7e5ae04..eae5c98b81b4627bd197e1296c3bd8d6b5b6d464 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2008-03-07  Alexander Larsson  <alexl@redhat.com>
+
+        * configure.in:
+       Look for struct statfs.f_fstypename
+
 2008-03-07  Tor Lillqvist  <tml@novell.com>
 
        * README.win32: Updates.
index 3db7b9c7424a96bcb46f7cc32144b97d3677be29..204ec48923c7d3a7936685095d993ce1b76711d2 100644 (file)
@@ -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
index c4098236f731c43a1c6474255a64b7d532293440..39be63ffd58d9d0be245a31dd7d5a7e10869fb2e 100644 (file)
@@ -1,3 +1,10 @@
+2008-03-07  Alexander Larsson  <alexl@redhat.com>
+
+        * 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  <tml@novell.com>
 
        * gfileinfo.h: Correct milliseconds to microseconds in the doc
index 326685e644ad37c558b42787bf14e857837dfd35..e718e406a6b59091a7a1d02c962a9d5e76544e52 100644 (file)
@@ -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))