Linux recently added NULL_FS_MAGIC (0x4E554C4C) for nullfs.
Teach human_fstype about it, following the guest-memfd addition.

* NEWS: Mention the improvement.
* src/stat.c (human_fstype): Add "nullfs".

Signed-off-by: Iván Ezequiel Rodriguez <[email protected]>
---
 NEWS       | 6 ++++++
 src/stat.c | 2 ++
 2 files changed, 8 insertions(+)

diff --git a/NEWS b/NEWS
index 67ffc1bf2..2a9a13d97 100644
--- a/NEWS
+++ b/NEWS
@@ -69,6 +69,12 @@ GNU coreutils NEWS                                    -*- 
outline -*-
   locales like SHIFT-JIS where a single byte can decode to a wide character.
   [bug introduced in coreutils-9.5]
 
+** New Features
+
+  'stat' and 'tail' now know about the "nullfs" file system type.
+  stat -f -c%T now reports the file system type,
+  and tail -f uses inotify for this file system.
+
 ** Changes in behavior
 
   'env' and 'printenv' now quote printed environment variables honoring the
diff --git a/src/stat.c b/src/stat.c
index ff149a76a..d3674294a 100644
--- a/src/stat.c
+++ b/src/stat.c
@@ -451,6 +451,8 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
       return "nsfs";
     case S_MAGIC_NTFS: /* 0x5346544E local */
       return "ntfs";
+    case S_MAGIC_NULL_FS: /* 0x4E554C4C local */
+      return "nullfs";
     case S_MAGIC_OPENPROM: /* 0x9FA1 local */
       return "openprom";
     case S_MAGIC_OCFS2: /* 0x7461636F remote */
-- 
2.43.0




Reply via email to