Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: Files /
Chapter 5 - Disk Initialization Manager / Disk Initialization Manager Reference
Routines / Low-Level Disk Initialization Routines


DIZero

To complete the disk-initialization process, you can use the DIZero function.

FUNCTION DIZero (drvNum: Integer; volName: Str255): OSErr;
drvNum
The number of the drive containing the disk to be zeroed.
volName
The name of the volume (to be included in the volume information).
DESCRIPTION
On the unmounted volume in the drive specified by the given drive number, the DIZero function sets the volume information, the volume bitmap, a file directory, and the desktop database (or desktop file) to the settings corresponding to a volume with no files. This function completes the process of making any files previously on the volume permanently inaccessible. If the operation fails, DIZero returns a result code indicating that a low-level disk error occurred. Otherwise, it mounts the volume by calling the File Manager function PBMountVol and returns that function's result code.

ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector for DIZero are
Trap macroSelector
_Pack2$000A

SPECIAL CONSIDERATIONS
You should not call DIZero at interrupt time. In system software version 7.0 and later, DIZero automatically performs bad block sparing, as described in "Bad Block Sparing," beginning on page 5-7.

RESULT CODES
noErr0No error
ioErr-36I/O error
paramErr-50Drive number specified is bad
volOnLinErr-55Volume is already online
nsDrvErr-56No such drive
noMacDskErr-57Disk is not a Macintosh disk
extFSErr-58Disk has external file system
badMDBErr-60Master directory block is bad
lastDskErr-64Last of the range of low-level disk errors
...  
firstDskErr-84First of the range of low-level disk errors
memFullErr-108Not enough memory

Previous Book Contents Book Index Next

© Apple Computer, Inc.
2 JUL 1996