<< Previous | Next >> | |
|
int fat_EnumDevice( mbr_drvr *driver, mbr_dev *dev, int devnum, char *sig, int norecovery );
Description
- This routine is called to learn about the devices present on the driver passed in. The device will be added to the linked list of enumerated devices. Partition pointers will be set to NULL, indicating they have not been enumerated yet. Partition entries must be enumerated separately.
- The signature string is an identifier given to the write-back cache, and must remain consistent between resets so that the device can be associated properly with any battery-backed cache entries remaining in memory.
- This function is called by
fat_AutoMount()
andfat_Init()
.Parameters
- driver
- Pointer to an initialized driver structure set up during the initialization of the storage device driver.
- dev
- Pointer to the device structure to be filled in.
- devnum
- Physical device number of the device.
- sig
- Pointer to a unique signature string. Note that this value must remain the same between resets.
- norecovery
- Boolean flag - set to True to ignore power-recovery data. True is any value except zero.
Return value
0
: success.
-EIO
: error trying to read the device or structure.
-EINVAL
:devnum
invalid or does not exist.
-ENOMEM
: memory for page buffer/RJ is not available.
-EUNFORMAT
: the device is accessible, but not formatted. You may use it provided it is formatted/partitioned by either this library or by another system.
-EBADPART
: the partition table on the device is invalid.
-ENOPART
: the device does not have any FAT partitions. This code is superseded by any other error detected.
-EEXIST
: the device has already been enumerated.
-EBUSY
: the device is busy (nonblocking mode only).Library
- FAT.LIB
See Also
- fat_AutoMount, fat_Init, fat_EnumPartition
Dynamic C Functions | << Previous | Next >> | rabbit.com |