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