mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-09 19:06:15 +01:00
glocalfile: Support statvfs.f_type
This is another way to get the file system type from `statvfs()`, newly added in glibc 2.39 (https://lwn.net/ml/libc-alpha/38790850.J2Yia2DhmK@pinacolada/). This hasn’t been tested with glibc 2.39 as I don’t have it, but the change seems fairly straightforward. Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
parent
20c7479cc8
commit
9eeb8a87d3
@ -1089,6 +1089,8 @@ g_local_file_query_filesystem_info (GFile *file,
|
||||
fstype = statfs_buffer.f_fstypename;
|
||||
#elif defined(HAVE_STRUCT_STATVFS_F_BASETYPE)
|
||||
fstype = statfs_buffer.f_basetype;
|
||||
#elif defined(HAVE_STRUCT_STATVFS_F_TYPE)
|
||||
fstype = get_fs_type (statfs_buffer.f_type);
|
||||
#else
|
||||
fstype = NULL;
|
||||
#endif
|
||||
|
@ -507,6 +507,7 @@ struct_members = [
|
||||
#include <dirent.h>''' ],
|
||||
[ 'statvfs', 'f_basetype', '#include <sys/statvfs.h>' ],
|
||||
[ 'statvfs', 'f_fstypename', '#include <sys/statvfs.h>' ],
|
||||
[ 'statvfs', 'f_type', '#include <sys/statvfs.h>' ],
|
||||
[ 'tm', 'tm_gmtoff', '#include <time.h>' ],
|
||||
[ 'tm', '__tm_gmtoff', '#include <time.h>' ],
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user