Home
last modified time | relevance | path

Searched refs:filedisk (Results 1 – 2 of 2) sorted by relevance

/external/yaffs2/yaffs2/direct/
Dyaffs_fileem.c61 static yflash_Device filedisk; variable
83 filedisk.nBlocks = (SIZE_IN_MB * 1024 * 1024)/(16 * 1024); in CheckInit()
85 filedisk.handle = open("yaffsemfile", O_RDWR | O_CREAT, S_IREAD | S_IWRITE); in CheckInit()
87 if(filedisk.handle < 0) in CheckInit()
94 fSize = lseek(filedisk.handle,0,SEEK_END); in CheckInit()
100 lseek(filedisk.handle,0,SEEK_SET); in CheckInit()
106 written = write(filedisk.handle,&p,sizeof(yflash_Page)); in CheckInit()
129 lseek(filedisk.handle,chunkInNAND * 528,SEEK_SET); in yflash_WriteChunkToNAND()
130 written = write(filedisk.handle,data,512); in yflash_WriteChunkToNAND()
137 lseek(filedisk.handle,chunkInNAND * 528 + 512,SEEK_SET); in yflash_WriteChunkToNAND()
[all …]
Dyaffs_fileem2k.c59 static yflash_Device filedisk; variable
122 filedisk.nBlocks = SIZE_IN_MB * BLOCKS_PER_MB; in CheckInit()
125 filedisk.handle[i] = -1; in CheckInit()
127 for(i = 0,blk = 0; blk < filedisk.nBlocks; blk+=BLOCKS_PER_HANDLE,i++) in CheckInit()
128 filedisk.handle[i] = GetBlockFileHandle(i); in CheckInit()
139 return filedisk.nBlocks; in yflash_GetNumberOfBlocks()
155 h = filedisk.handle[(chunkInNAND / (PAGES_PER_BLOCK * BLOCKS_PER_HANDLE))]; in yflash_WriteChunkWithTagsToNAND()
171 h = filedisk.handle[(chunkInNAND / (PAGES_PER_BLOCK * BLOCKS_PER_HANDLE))]; in yflash_WriteChunkWithTagsToNAND()
224 h = filedisk.handle[(chunkInNAND / (PAGES_PER_BLOCK * BLOCKS_PER_HANDLE))]; in yflash_ReadChunkWithTagsFromNAND()
234 h = filedisk.handle[(chunkInNAND / (PAGES_PER_BLOCK * BLOCKS_PER_HANDLE))]; in yflash_ReadChunkWithTagsFromNAND()
[all …]