See Device API use cases.
struct Volume{
struct Device *dev; /* the pointer of the Device structure of which the volume belongs to */
/* physical sector numbers */
SECTNUM firstBlock; /* first block of the data area (from the beginning of the media) */
SECTNUM lastBlock; /* last usable block (from the beginning of the media) */
/* logical sector number */
SECTNUM rootBlock; /* root block (from firstBlock) */
char dosType; /* FFS/OFS, DIRCACHE, INTERNATIONAL */
BOOL bootCode; /* TRUE if a floppy is bootable */
int dataBlockSize; /* 488 or 512 */
char* volName;
/* bitmap */
long bitmapSize; /* number of blocks used to store the bitmap
(excluding the bitmapExtension blocks) */
SECTNUM *bitmapBlocks; /* bitmap blocks pointers (excluding bitmap extensions blocks) */
struct bBitmapBlock* *bitmapTable; /* stores the bitmap blocks */
BOOL *bitmapBlocksChg; /* bitmapBlocksChg[i] is TRUE if bitmapTable[i} has changed,
and need to be written at bitmapBlocks[i] */
SECTNUM curDirPtr; /* number of the current working directory */
}
If vol is one Volume structure returned by adfMount() :
adfMount()
Mounts a designed volume (nPart) of the Device (dev), eventually with read only access (readOnly). The first partition is #0.
The current working directory is the root block.
adfUnMount()
adfCountFreeBlocks()
adfInstallBootBlock()
You must provide the 1024 bytes large bootblock.
Doesn't modify the initial 'DOS' header and dosType. Recalculates the checksum.
adfCreateHdFile()
Use adfCreateDumpDevice() the create the device passed to adfCreateHdFile().