Subject: bug#13582: [PATCH] stat: add ext4 to the ext2/ext3 list

From: Mike Frysinger <[email-masked]>
Date: Tue, 29 Jan 2013 01:13:49 -0500

Since ext4 returns the same info as ext2/ext3, add it to the list.
This fixes the output of running `stat -f / -c %T` on my system that
has an ext4 rootfs.

* src/stat.c (human_fstype): Add "ext4" to the S_MAGIC_EXT2 and
FSTYPE_EXT2FS cases.
---
 src/stat.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/stat.c b/src/stat.c
index dd210d1..d3d7190 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -293,7 +293,7 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
     case S_MAGIC_EXT: /* 0x137D local */
       return "ext";
     case S_MAGIC_EXT2: /* 0xEF53 local */
-      return "ext2/ext3";
+      return "ext2/ext3/ext4";
     case S_MAGIC_EXT2_OLD: /* 0xEF51 local */
       return "ext2";
     case S_MAGIC_FAT: /* 0x4006 local */
@@ -480,7 +480,7 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
     case FSTYPE_MISC:
       return "misc";
     case FSTYPE_EXT2FS:
-      return "ext2/ext3";
+      return "ext2/ext3/ext4";
     case FSTYPE_HTTP:
       return "http";
     case FSTYPE_MEMFS:
-- 
1.8.0.2