Fix cross compilation (e.g. on Darwin). Following changes to make.tmpl,
[AROS.git] / arch / all-pc / boot / grub2-aros / include / grub / bsdlabel.h
blob83e7b8b5a81807d39f3017a9e6cbcd5eb513c6fa
1 /*
2 * GRUB -- GRand Unified Bootloader
3 * Copyright (C) 1999,2000,2001,2002,2004,2007 Free Software Foundation, Inc.
5 * GRUB is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * GRUB is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef GRUB_BSDLABEL_PARTITION_HEADER
20 #define GRUB_BSDLABEL_PARTITION_HEADER 1
22 /* Constants for BSD disk label. */
23 #define GRUB_PC_PARTITION_BSD_LABEL_SECTOR 1
24 #define GRUB_PC_PARTITION_BSD_LABEL_MAGIC 0x82564557
26 /* BSD partition types. */
27 enum
29 GRUB_PC_PARTITION_BSD_TYPE_UNUSED = 0,
30 GRUB_PC_PARTITION_BSD_TYPE_SWAP = 1,
31 GRUB_PC_PARTITION_BSD_TYPE_V6 = 2,
32 GRUB_PC_PARTITION_BSD_TYPE_V7 = 3,
33 GRUB_PC_PARTITION_BSD_TYPE_SYSV = 4,
34 GRUB_PC_PARTITION_BSD_TYPE_V71K = 5,
35 GRUB_PC_PARTITION_BSD_TYPE_V8 = 6,
36 GRUB_PC_PARTITION_BSD_TYPE_BSDFFS = 7,
37 GRUB_PC_PARTITION_BSD_TYPE_MSDOS = 8,
38 GRUB_PC_PARTITION_BSD_TYPE_BSDLFS = 9,
39 GRUB_PC_PARTITION_BSD_TYPE_OTHER = 10,
40 GRUB_PC_PARTITION_BSD_TYPE_HPFS = 11,
41 GRUB_PC_PARTITION_BSD_TYPE_ISO9660 = 12,
42 GRUB_PC_PARTITION_BSD_TYPE_BOOT = 13
45 /* FreeBSD-specific types. */
46 enum
48 GRUB_PC_PARTITION_FREEBSD_TYPE_VINUM = 14,
49 GRUB_PC_PARTITION_FREEBSD_TYPE_RAID = 15,
50 GRUB_PC_PARTITION_FREEBSD_TYPE_JFS2 = 21
53 /* NetBSD-specific types. */
54 enum
56 GRUB_PC_PARTITION_NETBSD_TYPE_ADOS = 14,
57 GRUB_PC_PARTITION_NETBSD_TYPE_HFS = 15,
58 GRUB_PC_PARTITION_NETBSD_TYPE_FILECORE = 16,
59 GRUB_PC_PARTITION_NETBSD_TYPE_EXT2FS = 17,
60 GRUB_PC_PARTITION_NETBSD_TYPE_NTFS = 18,
61 GRUB_PC_PARTITION_NETBSD_TYPE_RAID = 19,
62 GRUB_PC_PARTITION_NETBSD_TYPE_CCD = 20,
63 GRUB_PC_PARTITION_NETBSD_TYPE_JFS2 = 21,
64 GRUB_PC_PARTITION_NETBSD_TYPE_APPLEUFS = 22
67 /* OpenBSD-specific types. */
68 enum
70 GRUB_PC_PARTITION_OPENBSD_TYPE_ADOS = 14,
71 GRUB_PC_PARTITION_OPENBSD_TYPE_HFS = 15,
72 GRUB_PC_PARTITION_OPENBSD_TYPE_FILECORE = 16,
73 GRUB_PC_PARTITION_OPENBSD_TYPE_EXT2FS = 17,
74 GRUB_PC_PARTITION_OPENBSD_TYPE_NTFS = 18,
75 GRUB_PC_PARTITION_OPENBSD_TYPE_RAID = 19
78 #define GRUB_PC_PARTITION_BSD_LABEL_WHOLE_DISK_PARTITION 2
80 /* The BSD partition entry. */
81 struct grub_partition_bsd_entry
83 grub_uint32_t size;
84 grub_uint32_t offset;
85 grub_uint32_t fragment_size;
86 grub_uint8_t fs_type;
87 grub_uint8_t fs_fragments;
88 grub_uint16_t fs_cylinders;
89 } GRUB_PACKED;
91 /* The BSD disk label. Only define members useful for GRUB. */
92 struct grub_partition_bsd_disk_label
94 grub_uint32_t magic;
95 grub_uint16_t type;
96 grub_uint8_t unused1[18];
97 grub_uint8_t packname[16];
98 grub_uint8_t unused2[92];
99 grub_uint32_t magic2;
100 grub_uint16_t checksum;
101 grub_uint16_t num_partitions;
102 grub_uint32_t boot_size;
103 grub_uint32_t superblock_size;
104 } GRUB_PACKED;
106 #endif /* ! GRUB_PC_PARTITION_HEADER */