diff mbox

[10/11,linux-next] fs: define hfs super magic values globally

Message ID 20170521154254.28375-1-fabf@skynet.be (mailing list archive)
State New, archived
Headers show

Commit Message

Fabian Frederick May 21, 2017, 3:42 p.m. UTC
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.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 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(-)
diff mbox

Patch

diff --git a/fs/hfs/hfs.h b/fs/hfs/hfs.h
index 6f194d0..4a10a84 100644
--- a/fs/hfs/hfs.h
+++ b/fs/hfs/hfs.h
@@ -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 */
diff --git a/fs/hfsplus/hfsplus_raw.h b/fs/hfsplus/hfsplus_raw.h
index 8298d09..80554d4 100644
--- a/fs/hfsplus/hfsplus_raw.h
+++ b/fs/hfsplus/hfsplus_raw.h
@@ -14,6 +14,7 @@ 
 #define _LINUX_HFSPLUS_RAW_H
 
 #include <linux/types.h>
+#include <linux/magic.h>
 
 /* Some constants */
 #define HFSPLUS_SECTOR_SIZE        512
diff --git a/fs/hfsplus/part_tbl.c b/fs/hfsplus/part_tbl.c
index 63164eb..12d3e0b 100644
--- a/fs/hfsplus/part_tbl.c
+++ b/fs/hfsplus/part_tbl.c
@@ -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
diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h
index e61d5af..8690964 100644
--- a/include/uapi/linux/magic.h
+++ b/include/uapi/linux/magic.h
@@ -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 */