PHAT Block I/O
[PHAT File System]

Collaboration diagram for PHAT Block I/O:


Detailed Description

Reading and writing data blocks.


Functions

int PhatSectorFlush (NUTDEVICE *dev, int bufnum)
 Flush sector buffers.
int PhatSectorRead (NUTFILE *blkmnt, u_long sect, u_char *buf)
 Read sector.
int PhatSectorLoad (NUTDEVICE *dev, u_long sect)


Function Documentation

int PhatSectorFlush ( NUTDEVICE dev,
int  bufnum 
)

Flush sector buffers.

The volume must be locked before calling this function.

Parameters:
dev Specifies the file system device.
bufnum The buffer number to flush. If -1, all buffers are flushed.
Returns:
0 on success, -1 on failures.

Definition at line 91 of file phatio.c.

References _NUTDEVICE::dev_dcb, _NUTDEVICE::dev_icb, EIO, errno, NUTBLKDEV_SEEK, _BLKPAR_SEEK::par_blknum, _BLKPAR_SEEK::par_nfp, _PHATSECTBUF::sect_data, _PHATSECTBUF::sect_dirty, _PHATSECTBUF::sect_num, and _PHATVOL::vol_buf.

int PhatSectorRead ( NUTFILE blkmnt,
u_long  sect,
u_char buf 
)

Read sector.

The volume must be locked before calling this function.

Parameters:
blkmnt Specifies the mounted block device partition.
sect Sector to load.
buf Points to a buffer which will receive the sector data.
Returns:
0 on success, -1 on failures.

Definition at line 141 of file phatio.c.

References _NUTDEVICE::dev_ioctl, _NUTDEVICE::dev_read, EIO, errno, _NUTFILE::nf_dev, NUTBLKDEV_SEEK, _BLKPAR_SEEK::par_blknum, and _BLKPAR_SEEK::par_nfp.

int PhatSectorLoad ( NUTDEVICE dev,
u_long  sect 
)

Definition at line 166 of file phatio.c.

References _NUTDEVICE::dev_dcb, NutEventPostAsync(), NutEventWait(), _PHATSECTBUF::sect_num, _PHATVOL::vol_buf, and _PHATVOL::vol_iomutex.

Referenced by Phat12GetClusterLink(), Phat12SetClusterLink(), Phat16GetClusterLink(), Phat16SetClusterLink(), Phat32GetClusterLink(), Phat32SetClusterLink(), and PhatDirEntryUpdate().


© 2000-2007 by egnite Software GmbH - visit http://www.ethernut.de/