linux/fs/hfs/hfs.h

/*
 *  linux/fs/hfs/hfs.h
 *
 * Copyright (C) 1995-1997  Paul H. Hargrove
 * (C) 2003 Ardis Technologies <[email protected]>
 * This file may be distributed under the terms of the GNU General Public License.
 */

#ifndef _HFS_H
#define _HFS_H

/* offsets to various blocks */
#define HFS_DD_BLK
#define HFS_PMAP_BLK
#define HFS_MDB_BLK

/* magic numbers for various disk blocks */
#define HFS_DRVR_DESC_MAGIC
#define HFS_OLD_PMAP_MAGIC
#define HFS_NEW_PMAP_MAGIC
#define HFS_SUPER_MAGIC
#define HFS_MFS_SUPER_MAGIC

/* various FIXED size parameters */
#define HFS_SECTOR_SIZE
#define HFS_SECTOR_SIZE_BITS
#define HFS_NAMELEN
#define HFS_MAX_NAMELEN
#define HFS_MAX_VALENCE

/* Meanings of the drAtrb field of the MDB,
 * Reference: _Inside Macintosh: Files_ p. 2-61
 */
#define HFS_SB_ATTRIB_HLOCK
#define HFS_SB_ATTRIB_UNMNT
#define HFS_SB_ATTRIB_SPARED
#define HFS_SB_ATTRIB_INCNSTNT
#define HFS_SB_ATTRIB_SLOCK

/* Some special File ID numbers */
#define HFS_POR_CNID
#define HFS_ROOT_CNID
#define HFS_EXT_CNID
#define HFS_CAT_CNID
#define HFS_BAD_CNID
#define HFS_ALLOC_CNID
#define HFS_START_CNID
#define HFS_ATTR_CNID
#define HFS_EXCH_CNID
#define HFS_FIRSTUSER_CNID

/* values for hfs_cat_rec.cdrType */
#define HFS_CDR_DIR
#define HFS_CDR_FIL
#define HFS_CDR_THD
#define HFS_CDR_FTH

/* legal values for hfs_ext_key.FkType and hfs_file.fork */
#define HFS_FK_DATA
#define HFS_FK_RSRC

/* bits in hfs_fil_entry.Flags */
#define HFS_FIL_LOCK
#define HFS_FIL_THD
#define HFS_FIL_DOPEN
#define HFS_FIL_ROPEN
#define HFS_FIL_DIR
#define HFS_FIL_NOCOPY
#define HFS_FIL_USED

/* bits in hfs_dir_entry.Flags. dirflags is 16 bits. */
#define HFS_DIR_LOCK
#define HFS_DIR_THD
#define HFS_DIR_INEXPFOLDER
#define HFS_DIR_MOUNTED
#define HFS_DIR_DIR
#define HFS_DIR_EXPFOLDER

/* bits hfs_finfo.fdFlags */
#define HFS_FLG_INITED
#define HFS_FLG_LOCKED
#define HFS_FLG_INVISIBLE

/*======== HFS structures as they appear on the disk ========*/

/* Pascal-style string of up to 31 characters */
struct hfs_name {} __packed;

struct hfs_point {} __packed;

struct hfs_rect {} __packed;

struct hfs_finfo {} __packed;

struct hfs_fxinfo {} __packed;

struct hfs_dinfo {} __packed;

struct hfs_dxinfo {} __packed;

hfs_finder_info __packed;

/* Cast to a pointer to a generic bkey */
#define HFS_BKEY(X)

/* The key used in the catalog b-tree: */
struct hfs_cat_key {} __packed;

/* The key used in the extents b-tree: */
struct hfs_ext_key {} __packed;

hfs_btree_key;

#define HFS_MAX_CAT_KEYLEN
#define HFS_MAX_EXT_KEYLEN

btree_key;

struct hfs_extent {};
hfs_extent_rec;

/* The catalog record for a file */
struct hfs_cat_file {} __packed;

/* the catalog record for a directory */
struct hfs_cat_dir {} __packed;

/* the catalog record for a thread */
struct hfs_cat_thread {}  __packed;

/* A catalog tree record */
hfs_cat_rec;

struct hfs_mdb {} __packed;

/*======== Data structures kept in memory ========*/

struct hfs_readdir_data {};

#endif