GNU bug report logs - #13582
[PATCH] stat: add ext4 to the ext2/ext3 list

Previous Next

Package: coreutils;

Reported by: Mike Frysinger <vapier <at> gentoo.org>

Date: Tue, 29 Jan 2013 06:15:01 UTC

Severity: wishlist

Tags: patch

Merged with 18264

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Mike Frysinger <vapier <at> gentoo.org>
To: bug-coreutils <at> gnu.org
Subject: [PATCH] stat: add ext4 to the ext2/ext3 list
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





This bug report was last modified 10 years and 308 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.