blob: 01c2b9457394c081283f3ad64bc51f4838174157 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Linus Torvalds1da177e2005-04-16 15:20:36 -07002/*
3 * fs/partitions/atari.h
4 * Moved by Russell King from:
5 *
6 * linux/include/linux/atari_rootsec.h
7 * definitions for Atari Rootsector layout
8 * by Andreas Schwab (schwab@ls5.informatik.uni-dortmund.de)
9 *
10 * modified for ICD/Supra partitioning scheme restricted to at most 12
11 * partitions
12 * by Guenther Kelleter (guenther@pool.informatik.rwth-aachen.de)
13 */
14
Gideon Israel Dsouzae3ebf0d2014-02-17 21:17:16 +053015#include <linux/compiler.h>
16
Linus Torvalds1da177e2005-04-16 15:20:36 -070017struct partition_info
18{
19 u8 flg; /* bit 0: active; bit 7: bootable */
20 char id[3]; /* "GEM", "BGM", "XGM", or other */
21 __be32 st; /* start of partition */
22 __be32 siz; /* length of partition */
23};
24
25struct rootsector
26{
27 char unused[0x156]; /* room for boot code */
28 struct partition_info icdpart[8]; /* info for ICD-partitions 5..12 */
29 char unused2[0xc];
30 u32 hd_siz; /* size of disk in blocks */
31 struct partition_info part[4];
32 u32 bsl_st; /* start of bad sector list */
33 u32 bsl_cnt; /* length of bad sector list */
34 u16 checksum; /* checksum for bootable disks */
Gideon Israel Dsouzae3ebf0d2014-02-17 21:17:16 +053035} __packed;
Linus Torvalds1da177e2005-04-16 15:20:36 -070036
Tejun Heo1493bf22010-05-15 20:09:30 +020037int atari_partition(struct parsed_partitions *state);