25#define TST_BLOC_OCCUPATION(tab,bn) \
26 (((tab)[(bn)/8]) & (1<<(7-((bn)&7))))
27#define SET_BLOC_OCCUPATION(tab,bn) \
28 (((tab)[(bn)/8]) |= (1<<(7-((bn)&7))))
29#define CLR_BLOC_OCCUPATION(tab,bn) \
30 (((tab)[(bn)/8]) &= ~(1<<(7-((bn)&7))))
33#define BLOCK_MAX_BUFF 256
35#define BYTES_MAX_BUFF 8388608
38#define HFSP_IMPL_Shnk 0x53686e6b
39#define HFSP_IMPL_Xpnd 0x58706e64
40#define HFSP_IMPL_Resz 0x5265737a
41#define HFSP_IMPL_PHpx 0x50482b78
42#define HFSP_IMPL_traP 0x74726150
43#define HFSP_IMPL_GnuP 0x476e7550
45#define HFS_SIGNATURE 0x4244
46#define HFSP_SIGNATURE 0x482B
47#define HFSX_SIGNATURE 0x4858
52#define HFS_HARD_LOCK 7
53#define HFS_UNMOUNTED 8
54#define HFS_BAD_SPARED 9
55#define HFS_SOFT_LOCK 15
56#define HFSP_NO_CACHE 10
57#define HFSP_INCONSISTENT 11
58#define HFSP_REUSE_CNID 12
59#define HFSP_JOURNALED 13
61#define HFS_IDX_NODE 0x00
62#define HFS_HDR_NODE 0x01
63#define HFS_MAP_NODE 0x02
64#define HFS_LEAF_NODE 0xFF
66#define HFS_FIRST_REC 0x0E
67#define HFS_NSD_HD_REC 0x78
68#define HFS_MAP_REC 0xF8
70#define HFS_DATA_FORK 0x00
71#define HFS_RES_FORK 0xFF
73#define HFS_CAT_DIR 0x01
74#define HFS_CAT_FILE 0x02
75#define HFS_CAT_DIR_TH 0x03
76#define HFS_CAT_FILE_TH 0x04
78#define HFSP_ATTR_INLINE 0x10
79#define HFSP_ATTR_FORK 0x20
80#define HFSP_ATTR_EXTENTS 0x30
82#define HFS_ROOT_PAR_ID 0x01
83#define HFS_ROOT_DIR_ID 0x02
84#define HFS_XTENT_ID 0x03
85#define HFS_CATALOG_ID 0x04
86#define HFS_BAD_BLOCK_ID 0x05
87#define HFSP_ALLOC_ID 0x06
88#define HFSP_STARTUP_ID 0x07
89#define HFSP_ATTRIB_ID 0x08
90#define HFSP_BOGUS_ID 0x0F
91#define HFSP_FIRST_AV_ID 0x10
93#define HFSJ_JOURN_IN_FS 0x00
94#define HFSJ_JOURN_OTHER_DEV 0x01
95#define HFSJ_JOURN_NEED_INIT 0x02
97#define HFSJ_HEADER_MAGIC 0x4a4e4c78
98#define HFSJ_ENDIAN_MAGIC 0x12345678
100#define HFSX_CASE_FOLDING 0xCF
101#define HFSX_BINARY_COMPARE 0xBC
109#define HFS_MDB_FILENAME "mdb.hfs"
110#define HFS_CATALOG_FILENAME "catalog.hfs"
111#define HFS_EXTENTS_FILENAME "extents.hfs"
112#define HFS_BITMAP_FILENAME "bitmap.hfs"
114#define HFSP_VH_FILENAME "vh.hfsplus"
115#define HFSP_CATALOG_FILENAME "catalog.hfsplus"
116#define HFSP_EXTENTS_FILENAME "extents.hfsplus"
117#define HFSP_BITMAP_FILENAME "bitmap.hfsplus"
118#define HFSP_ATTRIB_FILENAME "attributes.hfsplus"
119#define HFSP_STARTUP_FILENAME "startup.hfsplus"
131 uint16_t start_block;
140 uint32_t create_date;
141 uint32_t modify_date;
142 uint16_t volume_attributes;
143 uint16_t files_in_root;
144 uint16_t volume_bitmap_block;
145 uint16_t next_allocation;
146 uint16_t total_blocks;
148 uint32_t def_clump_size;
149 uint16_t start_block;
150 uint32_t next_free_node;
151 uint16_t free_blocks;
154 uint32_t backup_date;
155 uint16_t backup_number;
156 uint32_t write_count;
157 uint32_t extents_clump;
158 uint32_t catalog_clump;
159 uint16_t dirs_in_root;
162 uint32_t finder_info[8];
165 uint16_t volume_cache_size;
166 uint16_t bitmap_cache_size;
167 uint16_t common_cache_size;
174 uint32_t extents_file_size;
176 uint32_t catalog_file_size;
196 uint32_t leaf_records;
197 uint32_t first_leaf_node;
198 uint32_t last_leaf_node;
200 uint16_t max_key_len;
201 uint32_t total_nodes;
231 uint32_t create_date;
232 uint32_t modify_date;
233 uint32_t backup_date;
246 uint16_t data_start_block;
247 uint32_t data_sz_byte;
248 uint32_t data_sz_block;
249 uint16_t res_start_block;
250 uint32_t res_sz_byte;
251 uint32_t res_sz_block;
252 uint32_t create_date;
253 uint32_t modify_date;
254 uint32_t backup_date;
298 uint32_t permissions;
299 uint32_t special_devices;
305 uint32_t start_block;
313 uint64_t logical_size;
315 uint32_t total_blocks;
336 uint32_t last_mounted_version;
337 uint32_t journal_info_block;
339 uint32_t create_date;
340 uint32_t modify_date;
341 uint32_t backup_date;
342 uint32_t checked_date;
348 uint32_t total_blocks;
349 uint32_t free_blocks;
351 uint32_t next_allocation;
352 uint32_t res_clump_size;
353 uint32_t data_clump_size;
356 uint32_t write_count;
357 uint64_t encodings_bitmap;
359 uint8_t finder_info[32];
384 uint32_t leaf_records;
385 uint32_t first_leaf_node;
386 uint32_t last_leaf_node;
388 uint16_t max_key_len;
389 uint32_t total_nodes;
395 uint8_t key_compare_type;
416 uint32_t create_date;
417 uint32_t modify_date;
418 uint32_t attrib_mod_date;
419 uint32_t access_date;
420 uint32_t backup_date;
424 uint32_t text_encoding;
434 uint32_t create_date;
435 uint32_t modify_date;
436 uint32_t attrib_mod_date;
437 uint32_t access_date;
438 uint32_t backup_date;
442 uint32_t text_encoding;
485 uint32_t record_type;
500 uint32_t device_signature[8];
575 uint8_t key_content[1];
628 uint8_t key_content[1];
typedef __attribute__
Definition: vtoc.h:80
uint8_t type
Definition: dos.c:2
uint32_t start
Definition: dos.c:4
uint16_t magic
Definition: dos.c:4
uint32_t length
Definition: dos.c:5
uint64_t block_count
Definition: f2fs.h:10
unsigned char reserved3
Definition: fdasd.h:5
offset
Definition: fdasd.h:264
unsigned char reserved
Definition: fdasd.h:2
unsigned char reserved2
Definition: fdasd.h:4
unsigned char reserved1
Definition: fdasd.h:2
long long PedSector
We can address 2^63 sectors.
Definition: device.h:31
uint8_t * hfs_block
Definition: hfs.c:42
uint16_t unichar
Definition: hfs.h:324
struct _HfsExtDescriptor HfsExtDescriptor
Definition: hfs.h:134
struct _HfsPHeaderRecord HfsPHeaderRecord
Definition: hfs.h:401
struct _HfsFile HfsFile
Definition: hfs.h:261
struct _HfsMasterDirectoryBlock HfsMasterDirectoryBlock
Definition: hfs.h:179
unsigned hfsp_block_count
Definition: hfs.c:45
struct _HfsPUniStr255 HfsPUniStr255
Definition: hfs.h:329
struct _HfsPForkData HfsPForkData
Definition: hfs.h:318
#define HFS_EXT_NB
Definition: hfs.h:103
unsigned hfs_block_count
Definition: hfs.c:44
struct _HfsJBlockInfo HfsJBlockInfo
Definition: hfs.h:524
#define HFSP_EXT_NB
Definition: hfs.h:104
struct _HfsPNodeDescriptor HfsPNodeDescriptor
Definition: hfs.h:378
struct _HfsDirTh HfsDirTh
Definition: hfs.h:270
struct _HfsPrivateGenericKey HfsPrivateGenericKey
Definition: hfs.h:577
struct _HfsDirTh HfsFileTh
Definition: hfs.h:273
struct _HfsPExtDescriptor HfsPExtDescriptor
Definition: hfs.h:308
struct _HfsCatalogKey HfsCatalogKey
Definition: hfs.h:215
struct _HfsPThread HfsPDirTh
Definition: hfs.h:456
struct _HfsJJournalHeader HfsJJournalHeader
Definition: hfs.h:517
uint8_t * hfsp_block
Definition: hfs.c:43
struct _HfsPFile HfsPFile
Definition: hfs.h:448
struct _HfsCatalog HfsCatalog
Definition: hfs.h:286
struct _HfsDir HfsDir
Definition: hfs.h:238
struct _HfsPVolumeHeader HfsPVolumeHeader
Definition: hfs.h:367
struct _HfsJBlockListHeader HfsJBlockListHeader
Definition: hfs.h:534
uint32_t HfsPNodeID
Definition: hfs.h:321
struct _HfsPPrivateGenericKey HfsPPrivateGenericKey
Definition: hfs.h:630
struct _HfsPCatalog HfsPCatalog
Definition: hfs.h:469
struct _HfsPPerms HfsPPerms
Definition: hfs.h:301
struct _HfsPThread HfsPFileTh
Definition: hfs.h:457
struct _HfsNodeDescriptor HfsNodeDescriptor
Definition: hfs.h:190
HfsPExtDescriptor HfsPExtDataRec[HFSP_EXT_NB]
Definition: hfs.h:309
struct _HfsExtentKey HfsExtentKey
Definition: hfs.h:224
struct _HfsPExtentKey HfsPExtentKey
Definition: hfs.h:479
struct _HfsPDir HfsPDir
Definition: hfs.h:427
struct _HfsHeaderRecord HfsHeaderRecord
Definition: hfs.h:205
struct _HfsPForkDataAttr HfsPForkDataAttr
Definition: hfs.h:492
struct _HfsJJournalInfoBlock HfsJJournalInfoBlock
Definition: hfs.h:505
struct _HfsPCatalogKey HfsPCatalogKey
Definition: hfs.h:409
HfsExtDescriptor HfsExtDataRec[HFS_EXT_NB]
Definition: hfs.h:135
char name[16]
Definition: pc98.c:13
struct _HfsExtDescriptor HfsExtDescriptor
Definition: hfs.h:134
struct _HfsMasterDirectoryBlock HfsMasterDirectoryBlock
Definition: hfs.h:179
struct _HfsPExtDescriptor HfsPExtDescriptor
Definition: hfs.h:308
struct _HfsPVolumeHeader HfsPVolumeHeader
Definition: hfs.h:367
uint32_t HfsPNodeID
Definition: hfs.h:321
HfsPExtDescriptor HfsPExtDataRec[HFSP_EXT_NB]
Definition: hfs.h:309
HfsExtDescriptor HfsExtDataRec[HFS_EXT_NB]
Definition: hfs.h:135
unsigned int record_number
Definition: hfs.h:639
unsigned int node_size
Definition: hfs.h:636
unsigned int record_pos
Definition: hfs.h:638
unsigned int node_number
Definition: hfs.h:637
PedSector sector_count
Definition: hfs.h:594
PedSector start_sector
Definition: hfs.h:593
uint32_t jib_start_block
Definition: hfs.h:617
PedFileSystem * wrapper
Definition: hfs.h:607
HfsPPrivateFile * catalog_file
Definition: hfs.h:613
uint8_t * dirty_alloc_map
Definition: hfs.h:610
unsigned int bad_blocks_xtent_nb
Definition: hfs.h:619
uint8_t * alloc_map
Definition: hfs.h:609
char bad_blocks_loaded
Definition: hfs.h:620
HfsPPrivateFile * extents_file
Definition: hfs.h:612
uint32_t jl_start_block
Definition: hfs.h:618
HfsPVolumeHeader * vh
Definition: hfs.h:611
HfsPPrivateFile * allocation_file
Definition: hfs.h:615
HfsPPrivateFile * attributes_file
Definition: hfs.h:614
char free_geom
Definition: hfs.h:621
HfsPPrivateLinkExtent * bad_blocks_xtent_list
Definition: hfs.h:616
PedGeometry * plus_geom
Definition: hfs.h:608
HfsPExtDataRec cache
Definition: hfs.h:587
PedSector sect_nb
Definition: hfs.h:583
PedFileSystem * fs
Definition: hfs.h:584
uint32_t start_cache
Definition: hfs.h:588
HfsPExtDataRec first
Definition: hfs.h:586
HfsPNodeID CNID
Definition: hfs.h:585
struct _HfsPPrivateLinkExtent * next
Definition: hfs.h:601
HfsPExtDescriptor extent
Definition: hfs.h:600
HfsPrivateLinkExtent * bad_blocks_xtent_list
Definition: hfs.h:566
HfsMasterDirectoryBlock * mdb
Definition: hfs.h:563
char bad_blocks_loaded
Definition: hfs.h:568
unsigned int bad_blocks_xtent_nb
Definition: hfs.h:567
uint8_t alloc_map[(1<< 16)/8]
Definition: hfs.h:562
HfsPrivateFile * extent_file
Definition: hfs.h:564
HfsPrivateFile * catalog_file
Definition: hfs.h:565
uint32_t CNID
Definition: hfs.h:546
PedSector sect_nb
Definition: hfs.h:544
HfsExtDataRec first
Definition: hfs.h:547
uint16_t start_cache
Definition: hfs.h:549
HfsExtDataRec cache
Definition: hfs.h:548
PedFileSystem * fs
Definition: hfs.h:545
HfsExtDescriptor extent
Definition: hfs.h:555
struct _HfsPrivateLinkExtent * next
Definition: hfs.h:556
Structure describing file system.
Definition: filesys.h:68
Geometry of the partition.
Definition: geom.h:35