2 * GRUB -- GRand Unified Bootloader
3 * Copyright (C) 2005,2006,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_HFS_HEADER
20 #define GRUB_HFS_HEADER 1
22 #include <grub/types.h>
24 #define GRUB_HFS_MAGIC 0x4244
26 /* A single extent. A file consists of one or more extents. */
27 struct grub_hfs_extent
29 /* The first physical block. */
30 grub_uint16_t first_block
;
34 /* HFS stores extents in groups of 3. */
35 typedef struct grub_hfs_extent grub_hfs_datarecord_t
[3];
37 /* The HFS superblock (The official name is `Master Directory
39 struct grub_hfs_sblock
44 grub_uint8_t unused
[10];
46 grub_uint8_t unused2
[4];
47 grub_uint16_t first_block
;
48 grub_uint8_t unused4
[6];
50 /* A pascal style string that holds the volumename. */
51 grub_uint8_t volname
[28];
53 grub_uint8_t unused5
[28];
55 grub_uint32_t ppc_bootdir
;
56 grub_uint32_t intel_bootfile
;
57 /* Folder opened when disk is mounted. Unused by GRUB. */
58 grub_uint32_t showfolder
;
59 grub_uint32_t os9folder
;
60 grub_uint8_t unused6
[4];
61 grub_uint32_t osxfolder
;
63 grub_uint64_t num_serial
;
64 grub_uint16_t embed_sig
;
65 struct grub_hfs_extent embed_extent
;
66 grub_uint8_t unused7
[4];
67 grub_hfs_datarecord_t extent_recs
;
68 grub_uint32_t catalog_size
;
69 grub_hfs_datarecord_t catalog_recs
;
72 #endif /* ! GRUB_HFS_HEADER */