pnutfs.c File Reference


Detailed Description

Peanut File System.

 *
 * $Log: pnutfs.c,v $
 * Revision 1.9  2006/03/02 20:01:17  haraldkipp
 * Added implementation of dev_size makes _filelength() work, which in turn
 * enables the use of this file system in pro/httpd.c.
 *
 * Revision 1.8  2006/01/05 16:45:20  haraldkipp
 * Dynamic NUTFILE allocation for detached block device.
 *
 * Revision 1.7  2005/09/08 10:12:44  olereinhardt
 * Added #ifdef statement in NutSegBufEnable to avoid compiler warning
 * if no banked mem is used.
 *
 * Revision 1.6  2005/09/07 16:23:41  christianwelzel
 * Added support for MMnet02. Bankswitching is now handled in bankmem.h
 *
 * Revision 1.5  2005/08/02 17:46:47  haraldkipp
 * Major API documentation update.
 *
 * Revision 1.4  2005/05/16 08:33:59  haraldkipp
 * Added banking support for Arthernet.
 *
 * Revision 1.3  2005/02/21 11:10:21  olereinhardt
 * Changed deckaration of the "root" variable to compile with unix emulation
 *
 * Revision 1.2  2005/02/07 18:57:47  haraldkipp
 * ICCAVR compile errors fixed
 *
 * Revision 1.1  2005/02/05 20:35:21  haraldkipp
 * Peanut added
 *
 * 


Data Structures

struct  PNUT_NODE
 Node structure. More...
struct  PNUT_DIRENTRY
 Directory entry structure. More...
struct  PNUT_FINDRESULT
 Directory search result information structure. More...
struct  _PNUTFILE
 PNUT file descriptor structure. More...

Peanut File System Configuration

The Nut/OS Configurator may be used to override the default values.

#define PNUT_BLOCK_SIZE   512
 Size of a filesystem block.
#define PNUT_DIRENT_SIZE   32
 Size of a directory entry.
#define PNUT_BLOCKS_PER_NODE   250
 Maximum number of blocks per node.
#define PNUTBANK_COUNT

Defines

#define SEEK_SET
#define SEEK_CUR
#define SEEK_END
#define NODETYPE_REG
#define NODETYPE_DIR
#define PNUT_MAX_NAMELEN
 Maximum length of a base name.
#define PNUT_MAX_FILESIZE
 Maximum size of a file or directory.
#define NUTBANK_SIZE
 Size of each memory bank.
#define PNUT_TOTAL_BLOCKS
 Total number of blocks on this device.
#define BLOCKS_PER_BANK
#define NUTBANK_SR
#define NUTBANK_START
#define NUTBANK_PTR

Typedefs

typedef short PNUT_BLKNUM
typedef _PNUTFILE PNUTFILE
 PNUT file descriptor type.

Functions

void BankSelect (PNUT_BLKNUM blk)
 Make the bank visible, which contains the specified block.
PNUT_NODEBankNodePointer (PNUT_BLKNUM blk)
 Select specified bank and return pointer to block.
int PnutIOCtl (NUTDEVICE *dev, int req, void *conf)
 Device specific functions.

Variables

NUTDEVICE devPnut
 Peanut device information structure.


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