Summary of the Disk Initialization Manager
Pascal Summary
Data Types
HFS Defaults Record
TYPE HFSDefaults =
RECORD
sigWord: PACKED ARRAY[0..1] OF Byte; {signature word}
abSize: LongInt; {allocation block size in bytes}
clpSize: LongInt; {clump size in bytes}
nxFreeFN: LongInt; {next free file number}
btClpSize: LongInt; {B*-tree clump size in bytes}
rsrv1: Integer; {reserved}
rsrv2: Integer; {reserved}
rsrv3: Integer; {reserved}
END;
Routines
Loading and Unloading the Disk Initialization Manager
PROCEDURE DILoad;
PROCEDURE DIUnload;
Initializing a Disk
FUNCTION DIBadMount (where: Point; evtMessage: LongInt): Integer;
Low-Level Disk-Initialization Routines
FUNCTION DIFormat (drvNum: Integer): OSErr;
FUNCTION DIVerify (drvNum: Integer): OSErr;
FUNCTION DIZero (drvNum: Integer; volName: Str255): OSErr;
C Summary
Data Types
HFS Defaults Record
struct HFSDefaults {
char sigWord[2]; /*signature word*/
long abSize; /*allocation block size in bytes*/
long clpSize; /*clump size in bytes*/
long nxFreeFN; /*next free file number*/
long btClpSize; /*B-Tree clump size in bytes*/
short rsrv1; /*reserved*/
short rsrv2; /*reserved*/
short rsrv3; /*reserved*/
};
typedef struct HFSDefaults HFSDefaults;
Routines
Loading and Unloading the Disk Initialization Package
pascal void DILoad (void);
pascal void DIUnload (void);
Initializing a Disk
pascal short DIBadMount (Point where, long evtMessage);
Low-Level Disk-Initialization Routines
pascal OSErr DIFormat (short drvNum);
pascal OSErr DIVerify (short drvNum);
pascal OSErr DIZero (short drvNum, const Str255 volName);
Assembly-Language Summary
Data Structures
HFSDefaults Data Structure
| 0 | sigWord | word | signature word |
| 2 | abSize | long | allocation block size in bytes |
| 6 | clpSize | long | clump size in bytes |
| 10 | nxFreeFN | long | next free file number |
| 14 | btClpSize | long | B*-tree clump size in bytes |
| 18 | rsrv1 | word | reserved |
| 20 | rsrv2 | word | reserved |
| 22 | rsrv3 | word | reserved |
Trap Macros
Trap Macro Requiring Routine Selectors
_Pack2
| Selector | Routine |
| $0000 | DIBadMount |
| $0002 | DILoad |
| $0004 | DIUnload |
| $0006 | DIFormat |
| $0008 | DIVerify |
| $000A | DIZero |
Global Variables
| FmtDefaults | long | Pointer to substitute values for hierarchical volume directories. |
Result Codes
| [no name] | 2 | Disk in specified drive is already mounted |
| [no name] | 1 | User canceled initializing |
| noErr | 0 | No error |
| ioErr | -36 | I/O error |
| paramErr | -50 | Drive number specified is bad |
| volOnLinErr | -55 | Volume is already online |
| nsDrvErr | -56 | No such drive |
| noMacDskErr | -57 | Disk is not a Macintosh disk |
| extFSErr | -58 | Disk has external file system |
| badMDBErr | -60 | Master directory block is bad |
| lastDskErr | -64 | Last of the range of low-level disk errors |
| firstDskErr | -84 | First of the range of low-level disk errors |
| memFullErr | -108 | Not enough memory |