From patchwork Sun May 21 15:42:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 9739159 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DD28060328 for ; Sun, 21 May 2017 15:43:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D3A6824151 for ; Sun, 21 May 2017 15:43:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C76FD28358; Sun, 21 May 2017 15:43:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6CEFA24151 for ; Sun, 21 May 2017 15:43:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756644AbdEUPnC (ORCPT ); Sun, 21 May 2017 11:43:02 -0400 Received: from mailrelay108.isp.belgacom.be ([195.238.20.135]:61778 "EHLO mailrelay108.isp.belgacom.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753298AbdEUPm7 (ORCPT ); Sun, 21 May 2017 11:42:59 -0400 X-Belgacom-Dynamic: yes IronPort-PHdr: =?us-ascii?q?9a23=3AFnlQmB1QOkmkBj5ismDT+DRfVm0co7zxezQtwd8Z?= =?us-ascii?q?seMfL/ad9pjvdHbS+e9qxAeQG96KtbQZ1KKW6/mmAj1fp87Z8TgrS99laVwssY?= =?us-ascii?q?Yso0QYGsmLCEn2frbBThcRO4B8bmJj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+eDh?= =?us-ascii?q?jXsilF8Dcqmmw4EXZGq7Hvt4OUWZZ2TjgtMbHWcNpAo+Q/TgiEeeXj5Le3ayQ6?= =?us-ascii?q?U86yk/CIKnC4fDW4+sjKWC3CilBJ1WYH5JClSXHHf2eIWLRe0MZDiRIsB/iDwE?= =?us-ascii?q?U6auS4s72RGprg/6xKJtLvDI9S0AqZLjyN916vXdlR4o7jN0Ad+Q03qOT2B0mG?= =?us-ascii?q?MHWSM20LpkrkNjmR+/1v1Rh/FIHNpf6ukBbAYgMtaI0e1gDPjgVwTAYJGNSVC7?= =?us-ascii?q?UpOhGz53U9FnkPEUZEMoNdyojxnFlwSwDrMYjb2AB9Rg/KvW0VDqJNd7xmqA3q?= =?us-ascii?q?R33ApueddGKWDz3v03zAPUHYOc1hzBz6s=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2DKAQCttCFZ//gsQldcHAELAQUBGAELA?= =?us-ascii?q?QUBgj9sKIFGjnqRJAGVSoIPIYYDhX9AGAEBAQEBAQEBAQEBaiiCMyQBgx0jgRo?= =?us-ascii?q?kE4oXEbV4hBGHK4ZfgV2LJ4JKBZ4WkxINkXCUSB84gQpPHxiEbQGCUD42iRkBA?= =?us-ascii?q?QE?= X-IPAS-Result: =?us-ascii?q?A2DKAQCttCFZ//gsQldcHAELAQUBGAELAQUBgj9sKIFGjnq?= =?us-ascii?q?RJAGVSoIPIYYDhX9AGAEBAQEBAQEBAQEBaiiCMyQBgx0jgRokE4oXEbV4hBGHK?= =?us-ascii?q?4ZfgV2LJ4JKBZ4WkxINkXCUSB84gQpPHxiEbQGCUD42iRkBAQE?= Received: from 248.44-66-87.adsl-dyn.isp.belgacom.be (HELO localhost.localdomain) ([87.66.44.248]) by relay.skynet.be with ESMTP; 21 May 2017 17:42:56 +0200 From: Fabian Frederick To: Alexander Viro Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, fabf@skynet.be Subject: [PATCH 10/11 linux-next] fs: define hfs super magic values globally Date: Sun, 21 May 2017 17:42:54 +0200 Message-Id: <20170521154254.28375-1-fabf@skynet.be> X-Mailer: git-send-email 2.9.3 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 --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 + /* 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 +#include /* 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 */