OSDN Git Service

block: declare all partition detection routines in check.h
authorChristoph Hellwig <hch@lst.de>
Tue, 24 Mar 2020 07:25:21 +0000 (08:25 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 24 Mar 2020 13:57:08 +0000 (07:57 -0600)
There is no good reason to include one header per partition type in
core.c.  Instead move the prototypes for the detection routins to
check.h, and remove all now empty headers in block/partitions/.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
26 files changed:
block/partitions/acorn.c
block/partitions/acorn.h [deleted file]
block/partitions/aix.c
block/partitions/aix.h [deleted file]
block/partitions/amiga.c
block/partitions/amiga.h [deleted file]
block/partitions/atari.h
block/partitions/check.c
block/partitions/check.h
block/partitions/cmdline.c
block/partitions/cmdline.h [deleted file]
block/partitions/efi.h
block/partitions/ibm.c
block/partitions/ibm.h [deleted file]
block/partitions/karma.h
block/partitions/ldm.h
block/partitions/mac.h
block/partitions/msdos.c
block/partitions/msdos.h
block/partitions/osf.h
block/partitions/sgi.h
block/partitions/sun.h
block/partitions/sysv68.c
block/partitions/sysv68.h [deleted file]
block/partitions/ultrix.c
block/partitions/ultrix.h [deleted file]

index 7587700..c64c57b 100644 (file)
@@ -11,7 +11,6 @@
 #include <linux/adfs_fs.h>
 
 #include "check.h"
-#include "acorn.h"
 
 /*
  * Partition types. (Oh for reusability)
diff --git a/block/partitions/acorn.h b/block/partitions/acorn.h
deleted file mode 100644 (file)
index 67b0660..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- * linux/fs/partitions/acorn.h
- *
- * Copyright (C) 1996-2001 Russell King.
- *
- *  I _hate_ this partitioning mess - why can't we have one defined
- *  format, and everyone stick to it?
- */
-
-int adfspart_check_CUMANA(struct parsed_partitions *state);
-int adfspart_check_ADFS(struct parsed_partitions *state);
-int adfspart_check_ICS(struct parsed_partitions *state);
-int adfspart_check_POWERTEC(struct parsed_partitions *state);
-int adfspart_check_EESOX(struct parsed_partitions *state);
index 903f3ed..c7b4fd1 100644 (file)
@@ -6,7 +6,6 @@
  */
 
 #include "check.h"
-#include "aix.h"
 
 struct lvm_rec {
        char lvm_id[4]; /* "_LVM" */
diff --git a/block/partitions/aix.h b/block/partitions/aix.h
deleted file mode 100644 (file)
index b4449f0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-extern int aix_partition(struct parsed_partitions *state);
index 7fecc76..9526491 100644 (file)
@@ -14,7 +14,6 @@
 #include <linux/affs_hardblocks.h>
 
 #include "check.h"
-#include "amiga.h"
 
 static __inline__ u32
 checksum_block(__be32 *m, int size)
diff --git a/block/partitions/amiga.h b/block/partitions/amiga.h
deleted file mode 100644 (file)
index 7e63f4d..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- *  fs/partitions/amiga.h
- */
-
-int amiga_partition(struct parsed_partitions *state);
-
index 01c2b94..6782024 100644 (file)
@@ -34,4 +34,3 @@ struct rootsector
   u16 checksum;                        /* checksum for bootable disks */
 } __packed;
 
-int atari_partition(struct parsed_partitions *state);
index 8fe4688..944c478 100644 (file)
 
 #include "check.h"
 
-#include "acorn.h"
-#include "amiga.h"
-#include "atari.h"
-#include "ldm.h"
-#include "mac.h"
-#include "msdos.h"
-#include "osf.h"
-#include "sgi.h"
-#include "sun.h"
-#include "ibm.h"
-#include "ultrix.h"
-#include "efi.h"
-#include "karma.h"
-#include "sysv68.h"
-#include "cmdline.h"
-
 static int (*check_part[])(struct parsed_partitions *) = {
        /*
         * Probe partition formats with tables at disk address 0
index 19852b4..23e7adb 100644 (file)
@@ -50,3 +50,25 @@ put_partition(struct parsed_partitions *p, int n, sector_t from, sector_t size)
                strlcat(p->pp_buf, tmp, PAGE_SIZE);
        }
 }
+
+/* detection routines go here in alphabetical order: */
+int adfspart_check_ADFS(struct parsed_partitions *state);
+int adfspart_check_CUMANA(struct parsed_partitions *state);
+int adfspart_check_EESOX(struct parsed_partitions *state);
+int adfspart_check_ICS(struct parsed_partitions *state);
+int adfspart_check_POWERTEC(struct parsed_partitions *state);
+int aix_partition(struct parsed_partitions *state);
+int amiga_partition(struct parsed_partitions *state);
+int atari_partition(struct parsed_partitions *state);
+int cmdline_partition(struct parsed_partitions *state);
+int efi_partition(struct parsed_partitions *state);
+int ibm_partition(struct parsed_partitions *);
+int karma_partition(struct parsed_partitions *state);
+int ldm_partition(struct parsed_partitions *state);
+int mac_partition(struct parsed_partitions *state);
+int msdos_partition(struct parsed_partitions *state);
+int osf_partition(struct parsed_partitions *state);
+int sgi_partition(struct parsed_partitions *state);
+int sun_partition(struct parsed_partitions *state);
+int sysv68_partition(struct parsed_partitions *state);
+int ultrix_partition(struct parsed_partitions *state);
index f1edd54..8f545c3 100644 (file)
@@ -18,7 +18,6 @@
 #include <linux/cmdline-parser.h>
 
 #include "check.h"
-#include "cmdline.h"
 
 static char *cmdline;
 static struct cmdline_parts *bdev_parts;
diff --git a/block/partitions/cmdline.h b/block/partitions/cmdline.h
deleted file mode 100644 (file)
index e64a316..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-
-int cmdline_partition(struct parsed_partitions *state);
index 3e85761..907bac5 100644 (file)
@@ -113,7 +113,4 @@ typedef struct _legacy_mbr {
        __le16 signature;
 } __packed legacy_mbr;
 
-/* Functions */
-extern int efi_partition(struct parsed_partitions *state);
-
 #endif
index a5d480f..073faa6 100644 (file)
@@ -15,7 +15,6 @@
 #include <asm/vtoc.h>
 
 #include "check.h"
-#include "ibm.h"
 
 
 union label_t {
diff --git a/block/partitions/ibm.h b/block/partitions/ibm.h
deleted file mode 100644 (file)
index 8bf13fe..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-int ibm_partition(struct parsed_partitions *);
index 48e074d..1b5eec5 100644 (file)
@@ -4,6 +4,3 @@
  */
 
 #define KARMA_LABEL_MAGIC              0xAB56
-
-int karma_partition(struct parsed_partitions *state);
-
index 1ca63e9..841580a 100644 (file)
@@ -193,7 +193,5 @@ struct ldmdb {                              /* Cache of the database */
        struct list_head v_part;
 };
 
-int ldm_partition(struct parsed_partitions *state);
-
 #endif /* _FS_PT_LDM_H_ */
 
index 453ed29..0e41c9d 100644 (file)
@@ -42,4 +42,3 @@ struct mac_driver_desc {
     /* ... more stuff */
 };
 
-int mac_partition(struct parsed_partitions *state);
index 82c44f7..c572022 100644 (file)
@@ -24,7 +24,6 @@
 #include "check.h"
 #include "msdos.h"
 #include "efi.h"
-#include "aix.h"
 
 /*
  * Many architectures don't like unaligned accesses, while
index fcacfc4..123e666 100644 (file)
@@ -5,5 +5,4 @@
 
 #define MSDOS_LABEL_MAGIC              0xAA55
 
-int msdos_partition(struct parsed_partitions *state);
 
index 4d8088e..80a58c3 100644 (file)
@@ -5,4 +5,3 @@
 
 #define DISKLABELMAGIC (0x82564557UL)
 
-int osf_partition(struct parsed_partitions *state);
index a5b77c3..372cdad 100644 (file)
@@ -3,7 +3,6 @@
  *  fs/partitions/sgi.h
  */
 
-extern int sgi_partition(struct parsed_partitions *state);
 
 #define SGI_LABEL_MAGIC 0x0be5a941
 
index ae1b9ee..4c8877a 100644 (file)
@@ -6,4 +6,3 @@
 #define SUN_LABEL_MAGIC          0xDABE
 #define SUN_VTOC_SANITY          0x600DDEEE
 
-int sun_partition(struct parsed_partitions *state);
index 92e8108..6f6257f 100644 (file)
@@ -6,7 +6,6 @@
  */
 
 #include "check.h"
-#include "sysv68.h"
 
 /*
  *     Volume ID structure: on first 256-bytes sector of disk
diff --git a/block/partitions/sysv68.h b/block/partitions/sysv68.h
deleted file mode 100644 (file)
index 4fb6b8e..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-extern int sysv68_partition(struct parsed_partitions *state);
index ecd0d73..4aaa810 100644 (file)
@@ -8,7 +8,6 @@
  */
 
 #include "check.h"
-#include "ultrix.h"
 
 int ultrix_partition(struct parsed_partitions *state)
 {
diff --git a/block/partitions/ultrix.h b/block/partitions/ultrix.h
deleted file mode 100644 (file)
index 9f676ce..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/*
- *  fs/partitions/ultrix.h
- */
-
-int ultrix_partition(struct parsed_partitions *state);