1 /* SPDX-License-Identifier: GPL-2.0 */
2 #include <linux/pagemap.h>
3 #include <linux/blkdev.h>
4 #include <linux/genhd.h>
8 * add_gd_partition adds a partitions details to the devices partition
11 struct parsed_partitions {
12 struct block_device *bdev;
13 char name[BDEVNAME_SIZE];
19 struct partition_meta_info info;
23 bool access_beyond_eod;
31 void *read_part_sector(struct parsed_partitions *state, sector_t n, Sector *p);
32 static inline void put_dev_sector(Sector p)
38 put_partition(struct parsed_partitions *p, int n, sector_t from, sector_t size)
41 char tmp[1 + BDEVNAME_SIZE + 10 + 1];
43 p->parts[n].from = from;
44 p->parts[n].size = size;
45 snprintf(tmp, sizeof(tmp), " %s%d", p->name, n);
46 strlcat(p->pp_buf, tmp, PAGE_SIZE);
50 /* detection routines go here in alphabetical order: */
51 int adfspart_check_ADFS(struct parsed_partitions *state);
52 int adfspart_check_CUMANA(struct parsed_partitions *state);
53 int adfspart_check_EESOX(struct parsed_partitions *state);
54 int adfspart_check_ICS(struct parsed_partitions *state);
55 int adfspart_check_POWERTEC(struct parsed_partitions *state);
56 int aix_partition(struct parsed_partitions *state);
57 int amiga_partition(struct parsed_partitions *state);
58 int atari_partition(struct parsed_partitions *state);
59 int cmdline_partition(struct parsed_partitions *state);
60 int efi_partition(struct parsed_partitions *state);
61 int ibm_partition(struct parsed_partitions *);
62 int karma_partition(struct parsed_partitions *state);
63 int ldm_partition(struct parsed_partitions *state);
64 int mac_partition(struct parsed_partitions *state);
65 int msdos_partition(struct parsed_partitions *state);
66 int osf_partition(struct parsed_partitions *state);
67 int sgi_partition(struct parsed_partitions *state);
68 int sun_partition(struct parsed_partitions *state);
69 int sysv68_partition(struct parsed_partitions *state);
70 int ultrix_partition(struct parsed_partitions *state);