Important: The information in this document is obsolete and should not be used for new development.
DIZero
To complete the disk-initialization process, you can use theDIZero
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, theDIZero
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 functionPBMountVol
and returns that function's result code.ASSEMBLY-LANGUAGE INFORMATION
The trap macro and routine selector forDIZero
are
Trap macro Selector _Pack2 $000A SPECIAL CONSIDERATIONS
You should not callDIZero
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