Nut/OS  5.0.5
API Reference
_PHATVOL Struct Reference

Volume info structure. More...

#include <phatvol.h>

Collaboration diagram for _PHATVOL:
[legend]

Data Fields

int vol_type
 Type of volume.
uint32_t vol_numfree
 Number of free clusters.
uint32_t vol_nxtfree
 Possibly next free cluster.
PHATSECTBUF vol_buf [1]
 Sector buffer of this volume.
HANDLE vol_fsmutex
 Mutual exclusion filesystem access semaphore.
HANDLE vol_iomutex
 Mutual exclusion I/O semaphore.
unsigned int vol_sectsz
 Bytes per sector.
unsigned int vol_clustsz
 Sectors per cluster.
uint32_t vol_tabsz
 Number of sectors per allocation table.
uint32_t vol_tab_sect [2]
 First sector of each allocation table.
unsigned int vol_rootsz
 Number of sectors used by the root directory.
uint32_t vol_root_sect
 First sector of the root directory.
uint32_t vol_root_clust
 First cluster of the root directory.
uint32_t vol_last_clust
 Last data cluster number.
uint32_t vol_data_sect
 First data sector.

Detailed Description

Volume info structure.


Field Documentation

Possibly next free cluster.

Mutual exclusion filesystem access semaphore.

Referenced by PhatVolMount().

Mutual exclusion I/O semaphore.

Referenced by PhatSectorLoad(), PhatSectorWrite(), and PhatVolMount().

Number of sectors per allocation table.

Referenced by PhatVolMount().

First sector of each allocation table.

We maintain upto two allocation tables.

Referenced by Phat12SetClusterLink(), Phat16SetClusterLink(), Phat32FreeClusters(), Phat32SetClusterLink(), and PhatVolMount().

unsigned int _PHATVOL::vol_rootsz

Number of sectors used by the root directory.

Referenced by PhatFilePosSet(), PhatFileRead(), PhatFileWrite(), and PhatVolMount().

First sector of the root directory.

Referenced by PhatClusterSector(), and PhatVolMount().

First cluster of the root directory.

Referenced by PhatDirCreate(), PhatDirOpen(), and PhatVolMount().

Last data cluster number.

The first cluster number is 2, so this value is equal to the total number of data clusters plus 2.

Referenced by Phat32FreeClusters(), and PhatVolMount().

First data sector.

The first sector following the root directory.

Referenced by PhatClusterSector(), and PhatVolMount().


The documentation for this struct was generated from the following file: