mirror of
https://github.com/torvalds/linux.git
synced 2024-11-08 05:01:48 +00:00
1493bf217f
Make the following changes to partition check code. * Add ->bdev to struct parsed_partitions. * Introduce read_part_sector() which is a simple wrapper around read_dev_sector() which takes struct parsed_partitions *state instead of @bdev. * For functions which used to take @state and @bdev, drop @bdev. For functions which used to take @bdev, replace it with @state. * While updating, drop superflous checks on NULL state/bdev in ldm.c. This cleans up the API a bit and enables better handling of IO errors during partition check as the generic partition check code now has much better visibility into what went wrong in the low level code paths. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Ben Hutchings <ben@decadent.org.uk> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
35 lines
1.0 KiB
C
35 lines
1.0 KiB
C
/*
|
|
* fs/partitions/atari.h
|
|
* Moved by Russell King from:
|
|
*
|
|
* linux/include/linux/atari_rootsec.h
|
|
* definitions for Atari Rootsector layout
|
|
* by Andreas Schwab (schwab@ls5.informatik.uni-dortmund.de)
|
|
*
|
|
* modified for ICD/Supra partitioning scheme restricted to at most 12
|
|
* partitions
|
|
* by Guenther Kelleter (guenther@pool.informatik.rwth-aachen.de)
|
|
*/
|
|
|
|
struct partition_info
|
|
{
|
|
u8 flg; /* bit 0: active; bit 7: bootable */
|
|
char id[3]; /* "GEM", "BGM", "XGM", or other */
|
|
__be32 st; /* start of partition */
|
|
__be32 siz; /* length of partition */
|
|
};
|
|
|
|
struct rootsector
|
|
{
|
|
char unused[0x156]; /* room for boot code */
|
|
struct partition_info icdpart[8]; /* info for ICD-partitions 5..12 */
|
|
char unused2[0xc];
|
|
u32 hd_siz; /* size of disk in blocks */
|
|
struct partition_info part[4];
|
|
u32 bsl_st; /* start of bad sector list */
|
|
u32 bsl_cnt; /* length of bad sector list */
|
|
u16 checksum; /* checksum for bootable disks */
|
|
} __attribute__((__packed__));
|
|
|
|
int atari_partition(struct parsed_partitions *state);
|