phatfs.c File Reference


Detailed Description

PHAT File System.

 *
 * $Log: phatfs.c,v $
 * Revision 1.11  2008/04/02 09:39:29  haraldkipp
 * Fixed another PHAT file pointer bug.
 *
 * Revision 1.10  2008/04/01 10:14:58  haraldkipp
 * Fixes bug #1903303. Still not fully correct, because fopen(name, "a+")
 * should set the read pointer at position 0 while all writes should go
 * to the end of the file. But setting the write pointer at the end will
 * work for now.
 *
 * Revision 1.9  2006/10/08 16:42:56  haraldkipp
 * Not optimal, but simple and reliable exclusive access implemented.
 * Fixes bug #1486539. Furthermore, bug #1567790, which had been rejected,
 * had been reported correctly and is now fixed.
 *
 * Revision 1.8  2006/07/11 12:20:57  haraldkipp
 * Added mutual exclusion protection during flush.
 * Honor Nut/OS file flushing, which uses a NULL pointer on read/write.
 *
 * Revision 1.7  2006/07/05 16:02:23  haraldkipp
 * Typically Nut/OS doesn't check parameters, but this one is missed often,
 * closing a file which points to NUTFILE_EOF.
 *
 * Revision 1.6  2006/06/18 16:38:28  haraldkipp
 * No need to set errno after malloc failed.
 * Support for long filenames (VFAT) added.
 * New function PhatDirReleaseChain() simplifies code.
 * Fixed positioning bug, which caused several problems like limiting
 * directories to one cluster.
 *
 * Revision 1.5  2006/05/15 11:47:18  haraldkipp
 * Added support for file seek.
 *
 * Revision 1.4  2006/03/02 19:59:05  haraldkipp
 * Added implementation of dev_size makes _filelength() work, which in turn
 * enables the use of these file systems in pro/httpd.c.
 *
 * Revision 1.3  2006/02/23 15:45:22  haraldkipp
 * PHAT file system now supports configurable number of sector buffers.
 * This dramatically increased write rates of no-name cards.
 * AVR compile errors corrected.
 *
 * Revision 1.2  2006/01/22 17:42:08  haraldkipp
 * Now file delete requests fail if used on directory entries.
 *
 * Revision 1.1  2006/01/05 16:31:39  haraldkipp
 * First check-in.
 *
 *
 * 

Definition in file phatfs.c.

Go to the source code of this file.

Defines

#define SEEK_SET   0
#define SEEK_CUR   1
#define SEEK_END   2

Functions

u_long AllocFirstCluster (NUTFILE *nfp)
 Allocate the first cluster of a file.
int PhatFileClose (NUTFILE *nfp)
 Close a file.
NUTFILEPhatFileOpen (NUTDEVICE *dev, CONST char *path, int mode, int acc)
 Open a file.
int PhatFileWrite (NUTFILE *nfp, CONST void *buffer, int len)
 Write data to a file.
int PhatFileWrite_P (NUTFILE *nfp, PGM_P buffer, int len)
 Write data from program space to a file.
int PhatFileRead (NUTFILE *nfp, void *buffer, int size)
 Read data from a file.

Variables

NUTDEVICE devPhat0
 PHAT file system driver information structure.
NUTDEVICE devPhat1


Define Documentation

#define SEEK_SET   0

Definition at line 118 of file phatfs.c.

#define SEEK_CUR   1

Definition at line 119 of file phatfs.c.

#define SEEK_END   2

Definition at line 120 of file phatfs.c.


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