Lines Matching defs:buf

510 int yaffs_read(int fd, void *buf, unsigned int nbyte)
547 nRead = yaffs_ReadDataFromFile(obj,buf,pos,nbyte);
571 int yaffs_write(int fd, const void *buf, unsigned int nbyte)
603 nWritten = yaffs_WriteDataToFile(obj,buf,pos,nbyte,writeThrough);
821 static int yaffsfs_DoStat(yaffs_Object *obj,struct yaffs_stat *buf)
830 if(obj && buf)
832 buf->st_dev = (int)obj->myDev->genericDevice;
833 buf->st_ino = obj->objectId;
834 buf->st_mode = obj->yst_mode & ~S_IFMT; // clear out file type bits
838 buf->st_mode |= S_IFDIR;
842 buf->st_mode |= S_IFLNK;
846 buf->st_mode |= S_IFREG;
849 buf->st_nlink = yaffs_GetObjectLinkCount(obj);
850 buf->st_uid = 0;
851 buf->st_gid = 0;;
852 buf->st_rdev = obj->yst_rdev;
853 buf->st_size = yaffs_GetObjectFileLength(obj);
854 buf->st_blksize = obj->myDev->nDataBytesPerChunk;
855 buf->st_blocks = (buf->st_size + buf->st_blksize -1)/buf->st_blksize;
856 buf->yst_atime = obj->yst_atime;
857 buf->yst_ctime = obj->yst_ctime;
858 buf->yst_mtime = obj->yst_mtime;
864 static int yaffsfs_DoStatOrLStat(const char *path, struct yaffs_stat *buf,int doLStat)
880 retVal = yaffsfs_DoStat(obj,buf);
894 int yaffs_stat(const char *path, struct yaffs_stat *buf)
896 return yaffsfs_DoStatOrLStat(path,buf,0);
899 int yaffs_lstat(const char *path, struct yaffs_stat *buf)
901 return yaffsfs_DoStatOrLStat(path,buf,1);
904 int yaffs_fstat(int fd, struct yaffs_stat *buf)
915 retVal = yaffsfs_DoStat(obj,buf);
1379 int yaffs_readlink(const char *path, char *buf, int bufsiz)
1402 memset(buf,0,bufsiz);
1403 strncpy(buf,alias,bufsiz - 1);