Collaboration diagram for Volume Support:
![]() |
Data Structures | |
struct | _PHATVBR |
Volume boot record. More... | |
struct | _PHATSECTBUF |
Sector buffer structure. More... | |
struct | _PHATVOL |
Volume info structure. More... | |
Typedefs | |
typedef _PHATVBR | PHATVBR |
Volume boot record. | |
typedef _PHATSECTBUF | PHATSECTBUF |
Sector buffer structure. | |
typedef _PHATVOL | PHATVOL |
Volume info structure. | |
Functions | |
int | PhatVolMount (NUTDEVICE *dev, NUTFILE *blkmnt, u_char part_type) |
Mount a PHAT volume. | |
int | PhatVolUnmount (NUTDEVICE *dev) |
Unmount a PHAT volume. | |
u_long | PhatClusterSector (NUTFILE *nfp, u_long clust) |
typedef struct _PHATSECTBUF PHATSECTBUF |
Sector buffer structure.
Mount a PHAT volume.
This routine is called by the block device driver while mounting a partition. It reads and verifies the volume boot record, which is located in the first sector of a volume.
The routine may also initializes any caching mechanism. Thus, it must be called before any other read or write access.
dev | Specifies the file system device. | |
blkmnt | Handle of the block device's partition mount. | |
part_type | Partition type:
|
Definition at line 179 of file phatvol.c.
References _NUTDEVICE::dev_dcb, _NUTDEVICE::dev_ioctl, ENODEV, errno, free, malloc, memset(), _NUTFILE::nf_dev, NUTBLKDEV_INFO, _BLKPAR_INFO::par_blksz, _BLKPAR_INFO::par_nfp, PhatVolUnmount(), PTYPE_FAT12, PTYPE_FAT16, PTYPE_FAT16_BIG, PTYPE_FAT16_LBA, PTYPE_FAT32, PTYPE_FAT32_LBA, _PHATSECTBUF::sect_data, _PHATSECTBUF::sect_num, _PHATVOL::vol_buf, and _PHATVOL::vol_type.
int PhatVolUnmount | ( | NUTDEVICE * | dev | ) |
Unmount a PHAT volume.
This routine is called by the block device driver while unmounting a partition.
dev | Specifies the file system device. |
Definition at line 365 of file phatvol.c.
References _NUTDEVICE::dev_dcb, free, _PHATSECTBUF::sect_data, and _PHATVOL::vol_buf.
Referenced by PhatVolMount().
Definition at line 390 of file phatvol.c.
References _NUTDEVICE::dev_dcb, IsFixedRootDir(), _NUTFILE::nf_dev, _PHATVOL::vol_clustsz, _PHATVOL::vol_data_sect, and _PHATVOL::vol_root_sect.
Referenced by PhatDirOpen(), and PhatFileOpen().