Lines Matching defs:offset
114 /* Function to calculate chunk and offset */
116 static void yaffs_AddrToChunk(yaffs_Device *dev, loff_t addr, __u32 *chunk, __u32 *offset)
121 *offset = (__u32)(addr & dev->chunkMask);
126 *offset = (__u32)(addr & dev->crumbMask);
129 *offset += ((addr - (*chunk * dev->crumbsPerChunk)) << dev->crumbShift);
2611 /*Get the Tnode, then get the level 0 offset chunk offset */
2639 /* Get the Tnode, then get the level 0 offset chunk offset */
3880 int yaffs_ReadDataFromFile(yaffs_Object * in, __u8 * buffer, loff_t offset,
3896 //chunk = offset / dev->nDataBytesPerChunk + 1;
3897 //start = offset % dev->nDataBytesPerChunk;
3898 yaffs_AddrToChunk(dev,offset,&chunk,&start);
3991 offset += nToCopy;
4000 int yaffs_WriteDataToFile(yaffs_Object * in, const __u8 * buffer, loff_t offset,
4010 int startOfWrite = offset;
4019 //chunk = offset / dev->nDataBytesPerChunk + 1;
4020 //start = offset % dev->nDataBytesPerChunk;
4021 yaffs_AddrToChunk(dev,offset,&chunk,&start);
4173 offset += nToCopy;