![]() |
|
| << Previous | Next >> | |
| | |
int fat_Init( int pnum, mbr_drvr *driver, mbr_dev *dev, fat_part *part, int norecovery );
Description
- Initializes the default driver in
MBR_DRIVER_INIT, enumerates device 0, then enumerates and mounts the specified partition. This function was replaced with the more powerfulfat_AutoMount().
fat_Init()will only work with device 0 of the default driver. This driver becomes the primary driver in the system.
- The application can start calling any directory or file functions after this routine returns successfully.
- The desired partition must already be formatted. If the partition mount fails, you may call the function again using a different partition number (
pnum). The device will not be initialized a second time.Parameters
- pnum
- Partition number to mount (0-3).
- driver
- Pointer to the driver structure to fill in.
- dev
- Pointer to the device structure to fill in.
- part
- Pointer to the partition structure to fill in.
- norecovery
- Boolean flag - set to True to ignore power-recovery data. True is any value except zero.
Return Value
0: success.
-EIO: device I/O error.
-EINVAL:pnum,driver, ordevice, orpartis invalid.
-EUNFORMAT: the device is not formatted.
-EBADPART: the partition requested is not a valid FAT partition.
-ENOPART: no partitions exist on the device.
-EBUSY: the device is busy. (Only if non-blocking.)Library
- FAT.LIB
See Also
- fat_AutoMount, fat_EnumDevice, fat_EnumPartition, fat_MountPartition
| Dynamic C Functions | << Previous | Next >> | rabbit.com |