This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit a104fb804791cb4b948488358c29d68ea321b5b2
Author: Marco Casaroli <[email protected]>
AuthorDate: Sat Jul 25 15:43:42 2026 +0200

    fs/mount: Name xipfs in statfs and fs_gettype.
    
    A file system that answers statfs with a magic nothing maps to shows up as
    "Unrecognized" in df.  Give xipfs its constant alongside the others in
    sys/statfs.h and the case in fs_gettype that turns it into a name.
    
    Assisted-by: Claude Code:claude-opus-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 fs/mount/fs_gettype.c | 6 ++++++
 include/sys/statfs.h  | 1 +
 2 files changed, 7 insertions(+)

diff --git a/fs/mount/fs_gettype.c b/fs/mount/fs_gettype.c
index ff01f781830..1b97aca7d32 100644
--- a/fs/mount/fs_gettype.c
+++ b/fs/mount/fs_gettype.c
@@ -149,6 +149,12 @@ FAR const char *fs_gettype(FAR struct statfs *statbuf)
         break;
 #endif
 
+#ifdef CONFIG_FS_XIPFS
+      case XIPFS_MAGIC:
+        fstype = "xipfs";
+        break;
+#endif
+
 #ifdef CONFIG_FS_ZIPFS
       case ZIPFS_MAGIC:
         fstype = "zipfs";
diff --git a/include/sys/statfs.h b/include/sys/statfs.h
index a47a7be2970..95450706987 100644
--- a/include/sys/statfs.h
+++ b/include/sys/statfs.h
@@ -98,6 +98,7 @@
 #define CROMFS_MAGIC          0x4d4f5243
 #define RPMSGFS_MAGIC         0x54534f47
 #define ZIPFS_MAGIC           0x504b
+#define XIPFS_MAGIC           0x58495046
 #define V9FS_MAGIC            0x01021997
 
 #if defined(CONFIG_FS_LARGEFILE)

Reply via email to