<< Previous | Next >> | |
|
int mbr_FormatDevice( mbr_dev * dev );
Description
- Creates or rewrites the Master Boot Record on the device given. The routine will only rewrite the Boot Loader code if an MBR already exists on the device. The existing partition table will be preserved. To modify an existing partition table use mbr_CreatePartion.
NOTE This routine is NOT PROTECTED from power loss and can make existing partitions inaccessible if interrupted.
NOTE This function is BLOCKING. Parameters
- dev
- Pointer to MBR device structure
Return value
- 0 for success.
-EEXIST
if the MBR exists, writing Boot Loader only
-EIO
for Error trying to read the device or structure
-EINVAL
if the Device structure is not valid
-ENOMEM
if memory for page buffer is not available
-EPERM
if drive has mounted or FS enumerated partition(s)Library
- PART.LIB
Dynamic C Functions | << Previous | Next >> | rabbit.com |