*
* $Log: pnutfs.c,v $
* Revision 1.10 2006/08/01 07:43:48 haraldkipp
* PNUT file system failed after some modifications done previously for the
* PHAT file system. During directory open, the NUTFILE structure must be
* allocated in the file system driver. PnutDirRead() must return -1 if the
* end of a directory is reached. Reading unused directory entries must update
* the file position pointer.
*
* 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
*
*
|
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 30 |
Defines |
|
#define | SEEK_SET 0 |
|
#define | SEEK_CUR 1 |
|
#define | SEEK_END 2 |
|
#define | NODETYPE_REG 0 |
|
#define | NODETYPE_DIR 1 |
| #define | PNUT_MAX_NAMELEN (PNUT_DIRENT_SIZE - sizeof(PNUT_BLKNUM) - sizeof(u_char) - 1) |
| | Maximum length of a base name.
|
| #define | PNUT_MAX_FILESIZE (PNUT_BLOCKS_PER_NODE * PNUT_BLOCK_SIZE) |
| | Maximum size of a file or directory.
|
|
#define | NUTBANK_SIZE 16384 |
| | Size of each memory bank.
|
| #define | PNUT_TOTAL_BLOCKS (PNUTBANK_COUNT * (NUTBANK_SIZE / PNUT_BLOCK_SIZE)) |
| | Total number of blocks on this device.
|
|
#define | BLOCKS_PER_BANK (NUTBANK_SIZE / PNUT_BLOCK_SIZE) |
|
#define | NUTBANK_SR 0xFF00 |
|
#define | NUTBANK_START 0x8000 |
|
#define | NUTBANK_PTR ((char *)NUTBANK_START) |
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_NODE * | BankNodePointer (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.
|