xref: /haiku/src/system/boot/loader/file_systems/hfs_plus/hfs_plus.h (revision 83b1a68c52ba3e0e8796282759f694b7fdddf06d)
1 /*
2  * Copyright 2005, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef HFS_PLUS_H
6 #define HFS_PLUS_H
7 
8 
9 #include <SupportDefs.h>
10 
11 
12 namespace HFSPlus {
13 
14 struct hfs_extent_descriptor {
15 	uint32				start_block;
16 	uint32				block_count;
17 };
18 
19 typedef hfs_extent_descriptor hfs_extent_record[8];
20 
21 struct hfs_fork_data {
22 	uint64				logical_size;
23 	uint32				clump_size;
24 	uint32				total_blocks;
25     hfs_extent_record	extents;
26 };
27 
28 
29 #define HFS_VOLUME_SIGNATURE 'H+'
30 
31 struct hfs_volume_header {
32 	uint16				signature;
33 	uint16				version;
34 	uint32				attributes;
35 	uint32				last_mounted_version;
36 	uint32				journal_info_block;
37 
38 	uint32				creation_date;
39 	uint32				modification_date;
40 	uint32				backup_date;
41 	uint32				checked_date;
42 
43 	uint32				file_count;
44 	uint32				folder_count;
45 
46 	uint32				block_size;
47 	uint32				total_blocks;
48 	uint32				free_blocks;
49 
50 	uint32				next_allocation;
51 	uint32				resource_clump_size;
52 	uint32				data_clump_size;
53 	uint32				next_catalog_id;
54 
55 	uint32				write_count;
56 	uint64				encodings_bitmap;
57 
58 	uint32				finder_info[8];
59 
60 	hfs_fork_data		allocation_file;
61 	hfs_fork_data		extents_file;
62 	hfs_fork_data		catalog_file;
63 	hfs_fork_data		attributes_file;
64 	hfs_fork_data		startup_file;
65 };
66 
67 }	// namespace HFSPlus
68 
69 #endif	/* HFS_PLUS_H */
70