/*
libparted - a library for manipulating disk partitions
Copyright (C) 2003-2005, 2007, 2009-2010 Free Software Foundation,
Inc.
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _HFS_H
#define _HFS_H
/* WARNING : bn is used 2 times in theses macro */
/* so _never_ use side effect operators when using them */
/* Maximum number of blocks for the copy buffers */
/* Maximum size of the copy buffers, in bytes */
/* Apple Creator Codes follow */
/* Define the filenames used by the FS extractor */
#ifdef HFS_EXTRACT_FS
#endif /* HFS_EXTRACT_FS */
/* ----------------------------------- */
/* -- HFS DATA STRUCTURES -- */
/* ----------------------------------- */
#ifdef __sun
#endif /* __sun */
/* Extent descriptor */
#ifdef __sun
#pragma pack(1)
#endif
};
#ifdef __sun
#pragma pack()
#endif
/* Volume header */
#ifdef __sun
#pragma pack(1)
#endif
union __attribute__ ((packed)) {
struct __attribute__ ((packed)) {
} legacy;
struct __attribute__ ((packed)) {
} embedded;
} old_new;
};
#ifdef __sun
#pragma pack()
#endif
/* B*-Tree Node Descriptor */
#ifdef __sun
#pragma pack(1)
#endif
};
#ifdef __sun
#pragma pack()
#endif
/* Header record of a whole B*-Tree */
#ifdef __sun
#pragma pack(1)
#endif
};
#ifdef __sun
#pragma pack()
#endif
/* Catalog key for B*-Tree lookup in the catalog file */
#ifdef __sun
#pragma pack(1)
#endif
};
#ifdef __sun
#pragma pack()
#endif
/* Extents overflow key for B*-Tree lookup */
#ifdef __sun
#pragma pack(1)
#endif
};
#ifdef __sun
#pragma pack()
#endif
/* Catalog subdata case directory */
#ifdef __sun
#pragma pack(1)
#endif
};
#ifdef __sun
#pragma pack()
#endif
/* Catalog subdata case file */
#ifdef __sun
#pragma pack(1)
#endif
};
#ifdef __sun
#pragma pack()
#endif
/* Catalog subdata case directory thread */
#ifdef __sun
#pragma pack(1)
#endif
};
#ifdef __sun
#pragma pack()
#endif
/* Catalog subdata case file thread */
/* Catalog data */
#ifdef __sun
#pragma pack(1)
#endif
union {
} sel;
};
#ifdef __sun
#pragma pack()
#endif
/* ------------------------------------ */
/* -- HFS+ DATA STRUCTURES -- */
/* ------------------------------------ */
/* documented since 2004 in tn1150 */
#ifdef __sun
#pragma pack(1)
#endif
};
#ifdef __sun
#pragma pack()
#endif
/* HFS+ extent descriptor*/
#ifdef __sun
#pragma pack(1)
#endif
};
#ifdef __sun
#pragma pack()
#endif
/* HFS+ fork data structure */
#ifdef __sun
#pragma pack(1)
#endif
};
#ifdef __sun
#pragma pack()
#endif
/* HFS+ catalog node ID */
/* HFS+ file names */
#ifdef __sun
#pragma pack(1)
#endif
};
#ifdef __sun
#pragma pack()
#endif
/* HFS+ volume header */
#ifdef __sun
#pragma pack(1)
#endif
};
#ifdef __sun
#pragma pack()
#endif
/* HFS+ B-Tree Node Descriptor. Same as HFS btree. */
#ifdef __sun
#pragma pack(1)
#endif
};
#ifdef __sun
#pragma pack()
#endif
/* Header record of a whole HFS+ B-Tree. */
#ifdef __sun
#pragma pack(1)
#endif
/* 0xBC = binary compare */
/* otherwise, reserved */
};
#ifdef __sun
#pragma pack()
#endif
/* Catalog key for B-Tree lookup in the HFS+ catalog file */
#ifdef __sun
#pragma pack(1)
#endif
};
#ifdef __sun
#pragma pack()
#endif
/* HFS+ catalog subdata case dir */
#ifdef __sun
#pragma pack(1)
#endif
};
#ifdef __sun
#pragma pack()
#endif
/* HFS+ catalog subdata case file */
#ifdef __sun
#pragma pack(1)
#endif
};
#ifdef __sun
#pragma pack()
#endif
/* HFS+ catalog subdata case thread */
#ifdef __sun
#pragma pack(1)
#endif
};
#ifdef __sun
#pragma pack()
#endif
/* HFS+ Catalog leaf data */
#ifdef __sun
#pragma pack(1)
#endif
union {
} sel;
};
#ifdef __sun
#pragma pack()
#endif
/* HFS+ extents file key */
#ifdef __sun
#pragma pack(1)
#endif
};
#ifdef __sun
#pragma pack()
#endif
/* extent file data is HfsPExtDataRec */
/* Fork data attribute file */
#ifdef __sun
#pragma pack(1)
#endif
union __attribute__ ((packed)) {
} fork_res;
};
#ifdef __sun
#pragma pack()
#endif
/* ----------- Journal data structures ----------- */
/* Info block : stored in a block # defined in the VH */
#ifdef __sun
#pragma pack(1)
#endif
};
#ifdef __sun
#pragma pack()
#endif
#ifdef __sun
#pragma pack(1)
#endif
};
#ifdef __sun
#pragma pack()
#endif
#ifdef __sun
#pragma pack(1)
#endif
};
#ifdef __sun
#pragma pack()
#endif
#ifdef __sun
#pragma pack(1)
#endif
};
#ifdef __sun
#pragma pack()
#endif
/* ---------------------------------------- */
/* -- INTERNAL DATA STRUCTURES -- */
/* ---------------------------------------- */
/* Data of an opened HFS file */
struct _HfsPrivateFile {
};
/* To store bad block list */
struct _HfsPrivateLinkExtent {
};
/* HFS Filesystem specific data */
struct _HfsPrivateFSData {
unsigned int bad_blocks_xtent_nb;
char bad_blocks_loaded;
};
/* Generic btree key */
#ifdef __sun
#pragma pack(1)
#endif
};
#ifdef __sun
#pragma pack()
#endif
/* ----- HFS+ ----- */
/* Data of an opened HFS file */
struct _HfsPPrivateFile {
};
struct _HfsPPrivateExtent {
};
/* To store bad block list */
struct _HfsPPrivateLinkExtent {
};
/* HFS+ file system specific data */
struct _HfsPPrivateFSData {
unsigned int bad_blocks_xtent_nb;
char bad_blocks_loaded;
};
/* Generic + btree key */
#ifdef __sun
#pragma pack(1)
#endif
};
#ifdef __sun
#pragma pack()
#endif
/* ---- common ---- */
/* node and lead record reference for a BTree search */
struct _HfsCPrivateLeafRec {
unsigned int node_number;
unsigned int record_pos;
unsigned int record_number;
};
extern uint8_t* hfsp_block;
extern unsigned hfs_block_count;
extern unsigned hfsp_block_count;
#endif /* _HFS_H */