Mercurial > yaffs-ecoscentric
diff direct/yaffsfs.c @ 152:3bc7020d669c
Add large NAND support and improve retirement handling
| author | charles |
|---|---|
| date | Tue, 03 Oct 2006 11:13:03 +0100 |
| parents | 9371b1f460a4 |
| children | 41dac3f9ad92 |
line wrap: on
line diff
--- a/direct/yaffsfs.c +++ b/direct/yaffsfs.c @@ -620,7 +620,7 @@ int yaffs_write(int fd, const void *buf, } -int yaffs_truncate(int fd, unsigned int newSize) +int yaffs_truncate(int fd, off_t newSize) { yaffsfs_Handle *h = NULL; yaffs_Object *obj = NULL; @@ -851,7 +851,7 @@ static int yaffsfs_DoStat(yaffs_Object * buf->st_gid = 0;; buf->st_rdev = obj->yst_rdev; buf->st_size = yaffs_GetObjectFileLength(obj); - buf->st_blksize = obj->myDev->nBytesPerChunk; + buf->st_blksize = obj->myDev->nDataBytesPerChunk; buf->st_blocks = (buf->st_size + buf->st_blksize -1)/buf->st_blksize; buf->yst_atime = obj->yst_atime; buf->yst_ctime = obj->yst_ctime; @@ -1118,9 +1118,9 @@ int yaffs_unmount(const char *path) } -off_t yaffs_freespace(const char *path) +loff_t yaffs_freespace(const char *path) { - off_t retVal=-1; + loff_t retVal=-1; yaffs_Device *dev=NULL; char *dummy; @@ -1129,7 +1129,7 @@ off_t yaffs_freespace(const char *path) if(dev && dev->isMounted) { retVal = yaffs_GetNumberOfFreeChunks(dev); - retVal *= dev->nBytesPerChunk; + retVal *= dev->nDataBytesPerChunk; } else
