summaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/internal_statvfs.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2010-03-06 15:40:50 -0800
committerUlrich Drepper <drepper@redhat.com>2010-03-06 15:40:50 -0800
commit6e0a06fa40320187544d8daccd87dca728192253 (patch)
tree11c141a6ef0b04e1ddc6c75cbcce53c71a4733d4 /sysdeps/unix/sysv/linux/internal_statvfs.c
parenta092b645f84c2af4a302f00e242be595ed1a2117 (diff)
downloadglibc-6e0a06fa40320187544d8daccd87dca728192253.tar.gz
Handle ext4 and logfs in statvfs functions.
Diffstat (limited to 'sysdeps/unix/sysv/linux/internal_statvfs.c')
-rw-r--r--sysdeps/unix/sysv/linux/internal_statvfs.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/internal_statvfs.c b/sysdeps/unix/sysv/linux/internal_statvfs.c
index 28c1cb691f..9a6f4edac1 100644
--- a/sysdeps/unix/sysv/linux/internal_statvfs.c
+++ b/sysdeps/unix/sysv/linux/internal_statvfs.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2006, 2010 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -45,13 +45,15 @@ __statvfs_getflags (const char *name, int fstype, struct stat64 *st)
const char *fsname = NULL;
const char *fsname2 = NULL;
+ const char *fsname3 = NULL;
/* Map the filesystem type we got from the statfs call to a string. */
switch (fstype)
{
case EXT2_SUPER_MAGIC:
- fsname = "ext3";
- fsname2 = "ext2";
+ fsname = "ext4";
+ fsname2 = "ext3";
+ fsname3 = "ext2";
break;
case DEVPTS_SUPER_MAGIC:
fsname= "devpts";
@@ -98,6 +100,9 @@ __statvfs_getflags (const char *name, int fstype, struct stat64 *st)
case NTFS_SUPER_MAGIC:
fsname = "ntfs";
break;
+ case LOGFS_MAGIC_U32:
+ fsname = "logfs";
+ break;
}
FILE *mtab = __setmntent ("/proc/mounts", "r");
@@ -126,7 +131,9 @@ __statvfs_getflags (const char *name, int fstype, struct stat64 *st)
else if (fsname != NULL
&& strcmp (fsname, mntbuf.mnt_type) != 0
&& (fsname2 == NULL
- || strcmp (fsname2, mntbuf.mnt_type) != 0))
+ || strcmp (fsname2, mntbuf.mnt_type) != 0)
+ && (fsname3 == NULL
+ || strcmp (fsname3, mntbuf.mnt_type) != 0))
continue;
/* Find out about the device the current entry is for. */