FF_MountPartition()

From FullFAT

Jump to: navigation, search


Attempts to mount a partition, if any, stored on the registered block device.

Contents

Prototype

FF_ERROR FF_MountPartition(FF_IOMAN *pIoman, FF_T_UINT8 PartitionNumber);

Parameters

pIoman

Pointer to an FF_IOMAN object, as returned from the FF_CreateIOMAN() function.

PartitionNumber

The number of the primary partition that FullFAT should attempt to mount. If there are no partitions, then this number is ignored, and FullFAT attempts to mount the volume.

This value may be 0,1,2, or 3.


Return Value

Returns FF_ERR_NONE on success.

All errors are negative, and can be passed to the FF_GetErrMessage() function to get a meaningful string describing the error.

Possible Error Codes

  • FF_ERR_NULL_POINTER - pIoman parameter was NULL.
  • FF_ERR_IOMAN_INVALID_PARTITION_NUM - Partition number was invalid (> 3).
  • FF_ERR_DEVICE_DRIVER_FAILED - The lower level device driver reported a fatal error.
  • FF_ERR_IOMAN_NO_MOUNTABLE_PARTITION - No mountable partition or volume was found.
  • FF_ERR_IOMAN_INVALID_FORMAT - The MBR appears to be corrupt or an invalid format.
  • FF_ERR_IOMAN_NOT_FAT_FORMATTED - FAT filesystem was not found on the partition or volume.

See Also

Back to API

Personal tools