<< Previous | Next >>

fat_EnumPartition

int fat_EnumPartition( mbr_dev *dev, int pnum, fat_part *part );

Description

This routine is called to enumerate a partition on the given device. The partition information will be put into the FAT partition structure pointed to by part. The partition pointer will be linked to the device structure, registered with the write-back cache, and will then be active. The partition must be of a valid FAT type.

This function is called by fat_AutoMount() and fat_Init().

Parameters

dev
Pointer to an MBR device structure.

pnum
Partition number to link and enumerate.

part
Pointer to an FAT partition structure to be filled in.

Return value

0: success.
-EIO: error trying to read the device or structure.
-EINVAL: partition number is invalid.
-EUNFORMAT: the device is accessible, but not formatted.
-EBADPART: the partition is not a FAT partition.
-EEXIST: the partition has already been enumerated.
-EUNFLUSHABLE: there are no flushable sectors in the write-back cache.
-EBUSY: the device is busy (Only if non-blocking.).

Library

FAT.LIB

See Also

fat_EnumDevice, fat_FormatPartition, fat_MountPartition


Dynamic C Functions << Previous | Next >> rabbit.com