Skip to contentSkip to conversation

fs: define hfs super magic values globally

PATCH In review Fabian Frederick 1 participant 1 message May 21, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 10/11 fs: define hfs super magic values globally

hfs values were defined twice (in hfs and hfsplus) This patch exports values globally and include magic.h in hfs.h and hfsplus_raw.h where other magic are going to be exported as well.

---
 fs/hfs/hfs.h               | 4 ++--
 fs/hfsplus/hfsplus_raw.h   | 1 +
 fs/hfsplus/part_tbl.c      | 2 --
 include/uapi/linux/magic.h | 2 ++
 4 files changed, 5 insertions(+), 4 deletions(-)
fs/hfs/hfs.h +2 -2
index 6f194d0..4a10a84 100644
@@ -9,6 +9,8 @@
 #ifndef _HFS_H
 #define _HFS_H
 
+#include <linux/magic.h>
+
 /* offsets to various blocks */
 #define HFS_DD_BLK		0 /* Driver Descriptor block */
 #define HFS_PMAP_BLK		1 /* First block of partition map */
@@ -18,8 +20,6 @@
 #define HFS_DRVR_DESC_MAGIC	0x4552 /* "ER": driver descriptor map */
 #define HFS_OLD_PMAP_MAGIC	0x5453 /* "TS": old-type partition map */
 #define HFS_NEW_PMAP_MAGIC	0x504D /* "PM": new-type partition map */
-#define HFS_SUPER_MAGIC		0x4244 /* "BD": HFS MDB (super block) */
-#define HFS_MFS_SUPER_MAGIC	0xD2D7 /* MFS MDB (super block) */
 
 /* various FIXED size parameters */
 #define HFS_SECTOR_SIZE		512    /* size of an HFS sector */
fs/hfsplus/hfsplus_raw.h +1 -0
index 8298d09..80554d4 100644
@@ -14,6 +14,7 @@
 #define _LINUX_HFSPLUS_RAW_H
 
 #include <linux/types.h>
+#include <linux/magic.h>
 
 /* Some constants */
 #define HFSPLUS_SECTOR_SIZE        512
fs/hfsplus/part_tbl.c +0 -2
index 63164eb..12d3e0b 100644
@@ -26,8 +26,6 @@
 #define HFS_DRVR_DESC_MAGIC	0x4552 /* "ER": driver descriptor map */
 #define HFS_OLD_PMAP_MAGIC	0x5453 /* "TS": old-type partition map */
 #define HFS_NEW_PMAP_MAGIC	0x504D /* "PM": new-type partition map */
-#define HFS_SUPER_MAGIC		0x4244 /* "BD": HFS MDB (super block) */
-#define HFS_MFS_SUPER_MAGIC	0xD2D7 /* MFS MDB (super block) */
 
 /*
  * The new style Mac partition map
include/uapi/linux/magic.h +2 -0
index e61d5af..8690964 100644
@@ -32,6 +32,8 @@
 #define FUSE_CTL_SUPER_MAGIC	0x65735543
 #define FUSE_SUPER_MAGIC	0x65735546
 #define FUTEXFS_SUPER_MAGIC	0xBAD1DEA
+#define HFS_SUPER_MAGIC		0x4244		/* "BD": HFS MDB (super block) */
+#define HFS_MFS_SUPER_MAGIC	0xD2D7		/* MFS MDB (super block) */
 #define HOSTFS_SUPER_MAGIC	0x00c0ffee
 #define HPFS_SUPER_MAGIC	0xf995e849
 #define HUGETLBFS_MAGIC		0x958458f6	/* some random number */
Signature · 1 line
2.9.3