| 1 |
/* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 2 |
#pragma once |
| 3 |
|
| 4 |
#include_next <linux/magic.h> /* IWYU pragma: export */ |
| 5 |
|
| 6 |
#include <assert.h> |
| 7 |
|
| 8 |
/* Not exposed yet (4.20). Defined at ipc/mqueue.c */ |
| 9 |
#ifndef MQUEUE_MAGIC |
| 10 |
# define MQUEUE_MAGIC 0x19800202 |
| 11 |
#else |
| 12 |
static_assert(MQUEUE_MAGIC == 0x19800202, ""); |
| 13 |
#endif |
| 14 |
|
| 15 |
/* b1123ea6d3b3da25af5c8a9d843bd07ab63213f4 (4.8), dropped by 68f2736a858324c3ec852f6c2cddd9d1c777357d (v6.0) */ |
| 16 |
#ifndef BALLOON_KVM_MAGIC |
| 17 |
# define BALLOON_KVM_MAGIC 0x13661366 |
| 18 |
#else |
| 19 |
static_assert(BALLOON_KVM_MAGIC == 0x13661366, ""); |
| 20 |
#endif |
| 21 |
|
| 22 |
/* 48b4800a1c6af2cdda344ea4e2c843dcc1f6afc9 (4.8), dropped by 68f2736a858324c3ec852f6c2cddd9d1c777357d (v6.0) */ |
| 23 |
#ifndef ZSMALLOC_MAGIC |
| 24 |
# define ZSMALLOC_MAGIC 0x58295829 |
| 25 |
#else |
| 26 |
static_assert(ZSMALLOC_MAGIC == 0x58295829, ""); |
| 27 |
#endif |
| 28 |
|
| 29 |
/* ea8157ab2ae5e914dd427e5cfab533b6da3819cd (5.3), dropped by 68f2736a858324c3ec852f6c2cddd9d1c777357d (v6.0) */ |
| 30 |
#ifndef Z3FOLD_MAGIC |
| 31 |
# define Z3FOLD_MAGIC 0x33 |
| 32 |
#else |
| 33 |
static_assert(Z3FOLD_MAGIC == 0x33, ""); |
| 34 |
#endif |
| 35 |
|
| 36 |
/* fe030c9b85e6783bc52fe86449c0a4b8aa16c753 (5.5), dropped by 68f2736a858324c3ec852f6c2cddd9d1c777357d (v6.0) */ |
| 37 |
#ifndef PPC_CMM_MAGIC |
| 38 |
# define PPC_CMM_MAGIC 0xc7571590 |
| 39 |
#else |
| 40 |
static_assert(PPC_CMM_MAGIC == 0xc7571590, ""); |
| 41 |
#endif |
| 42 |
|
| 43 |
/* Not in mainline but included in Ubuntu */ |
| 44 |
#ifndef SHIFTFS_MAGIC |
| 45 |
# define SHIFTFS_MAGIC 0x6a656a62 |
| 46 |
#else |
| 47 |
static_assert(SHIFTFS_MAGIC == 0x6a656a62, ""); |
| 48 |
#endif |
| 49 |
|
| 50 |
/* Not exposed yet. Defined at fs/fuse/control.c */ |
| 51 |
#ifndef FUSE_CTL_SUPER_MAGIC |
| 52 |
# define FUSE_CTL_SUPER_MAGIC 0x65735543 |
| 53 |
#else |
| 54 |
static_assert(FUSE_CTL_SUPER_MAGIC == 0x65735543, ""); |
| 55 |
#endif |
| 56 |
|
| 57 |
/* Not exposed yet. Defined at fs/orangefs/orangefs-kernel.h */ |
| 58 |
#ifndef ORANGEFS_DEVREQ_MAGIC |
| 59 |
# define ORANGEFS_DEVREQ_MAGIC 0x20030529 |
| 60 |
#else |
| 61 |
static_assert(ORANGEFS_DEVREQ_MAGIC == 0x20030529, ""); |
| 62 |
#endif |
| 63 |
|
| 64 |
/* linux/gfs2_ondisk.h */ |
| 65 |
#ifndef GFS2_MAGIC |
| 66 |
# define GFS2_MAGIC 0x01161970 |
| 67 |
#else |
| 68 |
static_assert(GFS2_MAGIC == 0x01161970, ""); |
| 69 |
#endif |
| 70 |
|
| 71 |
/* Not exposed yet. Defined at fs/configfs/mount.c */ |
| 72 |
#ifndef CONFIGFS_MAGIC |
| 73 |
# define CONFIGFS_MAGIC 0x62656570 |
| 74 |
#else |
| 75 |
static_assert(CONFIGFS_MAGIC == 0x62656570, ""); |
| 76 |
#endif |
| 77 |
|
| 78 |
/* Not exposed yet. Defined at fs/vboxsf/super.c */ |
| 79 |
#ifndef VBOXSF_SUPER_MAGIC |
| 80 |
# define VBOXSF_SUPER_MAGIC 0x786f4256 |
| 81 |
#else |
| 82 |
static_assert(VBOXSF_SUPER_MAGIC == 0x786f4256, ""); |
| 83 |
#endif |
| 84 |
|
| 85 |
/* Not exposed yet, internally actually called RPCAUTH_GSSMAGIC. Defined in net/sunrpc/rpc_pipe.c */ |
| 86 |
#ifndef RPC_PIPEFS_SUPER_MAGIC |
| 87 |
# define RPC_PIPEFS_SUPER_MAGIC 0x67596969 |
| 88 |
#else |
| 89 |
static_assert(RPC_PIPEFS_SUPER_MAGIC == 0x67596969, ""); |
| 90 |
#endif |
| 91 |
|
| 92 |
/* Not exposed yet, defined at fs/ntfs/ntfs.h */ |
| 93 |
#ifndef NTFS_SB_MAGIC |
| 94 |
# define NTFS_SB_MAGIC 0x5346544e |
| 95 |
#else |
| 96 |
static_assert(NTFS_SB_MAGIC == 0x5346544e, ""); |
| 97 |
#endif |
| 98 |
|
| 99 |
/* Not exposed yet, encoded literally in fs/ntfs3/super.c. */ |
| 100 |
#ifndef NTFS3_SUPER_MAGIC |
| 101 |
# define NTFS3_SUPER_MAGIC 0x7366746e |
| 102 |
#else |
| 103 |
static_assert(NTFS3_SUPER_MAGIC == 0x7366746e, ""); |
| 104 |
#endif |