dcavalca / rpms / systemd

Forked from rpms/systemd 4 months ago
Clone
9e3166
From bbe53713455be38c0a587626439fd171f28c77fc Mon Sep 17 00:00:00 2001
9e3166
From: Frantisek Sumsal <frantisek@sumsal.cz>
9e3166
Date: Sun, 30 Jan 2022 23:40:05 +0100
9e3166
Subject: [PATCH] basic: update CIFS magic
9e3166
9e3166
Kernel commit dea2903719283c156b53741126228c4a1b40440f exposed (and
9e3166
renamed) CIFS_MAGIC_NUMBER as CIFS_SUPER_MAGIC along with
9e3166
SMB2_SUPER_MAGIC.
9e3166
9e3166
This fixes the following build fail on current Fedora Rawhide:
9e3166
```
9e3166
../src/basic/meson.build:389:8: ERROR: Problem encountered: found unknown filesystem(s) defined in kernel headers:
9e3166
9e3166
Filesystem found in kernel header but not in filesystems-gperf.gperf: CIFS_SUPER_MAGIC
9e3166
Filesystem found in kernel header but not in filesystems-gperf.gperf: SMB2_SUPER_MAGIC
9e3166
```
9e3166
---
9e3166
 src/basic/filesystems-gperf.gperf |  4 ++--
9e3166
 src/basic/missing_magic.h         | 11 ++++++++---
9e3166
 2 files changed, 10 insertions(+), 5 deletions(-)
9e3166
9e3166
diff --git a/src/basic/filesystems-gperf.gperf b/src/basic/filesystems-gperf.gperf
9e3166
index 08c8c445105a..e8c5357f9146 100644
9e3166
--- a/src/basic/filesystems-gperf.gperf
9e3166
+++ b/src/basic/filesystems-gperf.gperf
9e3166
@@ -40,7 +40,7 @@ ceph,            {CEPH_SUPER_MAGIC}
9e3166
 cgroup2,         {CGROUP2_SUPER_MAGIC}
9e3166
 # note that the cgroupfs magic got reassigned from cpuset
9e3166
 cgroup,          {CGROUP_SUPER_MAGIC}
9e3166
-cifs,            {CIFS_MAGIC_NUMBER}
9e3166
+cifs,            {CIFS_SUPER_MAGIC, SMB2_SUPER_MAGIC}
9e3166
 coda,            {CODA_SUPER_MAGIC}
9e3166
 configfs,        {CONFIGFS_MAGIC}
9e3166
 cramfs,          {CRAMFS_MAGIC}
9e3166
@@ -109,7 +109,7 @@ selinuxfs,       {SELINUX_MAGIC}
9e3166
 shiftfs,         {SHIFTFS_MAGIC}
9e3166
 smackfs,         {SMACK_MAGIC}
9e3166
 # smb3 is an alias for cifs
9e3166
-smb3,            {CIFS_MAGIC_NUMBER}
9e3166
+smb3,            {CIFS_SUPER_MAGIC}
9e3166
 # smbfs was removed from the kernel in 2010, the magic remains
9e3166
 smbfs,           {SMB_SUPER_MAGIC}
9e3166
 sockfs,          {SOCKFS_MAGIC}
9e3166
diff --git a/src/basic/missing_magic.h b/src/basic/missing_magic.h
9e3166
index 7d9320bb6dc9..c104fcfba315 100644
9e3166
--- a/src/basic/missing_magic.h
9e3166
+++ b/src/basic/missing_magic.h
9e3166
@@ -38,9 +38,14 @@
9e3166
 #define XFS_SB_MAGIC 0x58465342
9e3166
 #endif
9e3166
 
9e3166
-/* Not exposed yet. Defined at fs/cifs/cifsglob.h */
9e3166
-#ifndef CIFS_MAGIC_NUMBER
9e3166
-#define CIFS_MAGIC_NUMBER 0xFF534D42
9e3166
+/* dea2903719283c156b53741126228c4a1b40440f (5.17) */
9e3166
+#ifndef CIFS_SUPER_MAGIC
9e3166
+#define CIFS_SUPER_MAGIC 0xFF534D42
9e3166
+#endif
9e3166
+
9e3166
+/* dea2903719283c156b53741126228c4a1b40440f (5.17) */
9e3166
+#ifndef SMB2_SUPER_MAGIC
9e3166
+#define SMB2_SUPER_MAGIC 0xFE534D42
9e3166
 #endif
9e3166
 
9e3166
 /* 257f871993474e2bde6c497b54022c362cf398e1 (4.5) */