- 博客(6)
- 收藏
- 关注
原创 yaffs_PutLevel0Tnode
void yaffs_PutLevel0Tnode(yaffs_Device *dev, yaffs_Tnode *tn, unsigned pos, unsigned val){//这个函数将某个Tnode设置为指定的值。tn是指向一组Tnode的指针;pos是所要设置的那个Tnode在该组Tnode中的索引;val就是所要设置的值,也就是物理chunk id。函数名中的Level0指
2008-07-25 11:44:00
622
原创 yaffs2读取文件操作
int yaffs_read(int fd, void *buf, unsigned int nbyte){ yaffsfs_Handle *h = NULL; yaffs_Object *obj = NULL; int pos = 0; int nRead = -1; unsigned int maxRead; yaffsfs_Lock(); h = yaf
2008-07-19 12:55:00
1782
原创 Tnodes创建和释放
static int yaffs_CreateTnodes(yaffs_Device * dev, int nTnodes){ int i; int tnodeSize; yaffs_Tnode *newTnodes; __u8 *mem; yaffs_Tnode *curr; yaffs_Tnode *next; yaffs_TnodeList *tnl;
2008-07-18 17:10:00
773
原创 yaffs打开文件yaffs_open
int yaffs_open(const YCHAR *path, int oflag, int mode){ yaffs_Object *obj = NULL; yaffs_Object *dir = NULL; YCHAR *name; int handle = -1; yaffsfs_Handle *h = NULL; int alreadyOpen = 0;
2008-07-17 21:02:00
2238
原创 yaffs2申请Cache
YAFFS2在执行读写操作可能需要申请dev->srCache。 static yaffs_ChunkCache *yaffs_GrabChunkCache(yaffs_Device * dev){ yaffs_ChunkCache *cache; yaffs_Object *theObj; int usage; int i; /*int pushout;*///首先调
2008-07-16 21:24:00
543
原创 yaffs2写文件操作
int yaffs_write(int fd, const void *buf, unsigned int nbyte){ yaffsfs_Handle *h = NULL; yaffs_Object *obj = NULL; int pos = 0; int nWritten = -1; int writeThrough = 0; yaffsfs_Lock();
2008-07-15 21:54:00
1044
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人