Lines Matching refs:length
736 int dfs_file_ftruncate(struct dfs_file *fd, off_t length) in dfs_file_ftruncate() argument
741 if (fd == NULL || fd->vnode->type != FT_REGULAR || length < 0) in dfs_file_ftruncate()
747 result = fd->vnode->fops->ioctl(fd, RT_FIOFTRUNCATE, (void*)&length); in dfs_file_ftruncate()
751 fd->vnode->size = length; in dfs_file_ftruncate()
790 int length; in ls() local
818 length = dfs_file_getdents(&fd, &dirent, sizeof(struct dirent)); in ls()
819 if (length > 0) in ls()
845 while (length > 0); in ls()
870 int length = 0; in cat() local
884 length = dfs_file_read(&fd, (void *)buffer, sizeof(buffer) - 1); in cat()
885 if (length > 0) in cat()
887 buffer[length] = '\0'; in cat()
889 rt_device_write(out_device, 0, (void *)buffer, length); in cat()
891 } while (length > 0); in cat()
939 int length; in copyfile() local
941 length = dfs_file_write(&fd, block_ptr, read_bytes); in copyfile()
942 if (length != read_bytes) in copyfile()
945 rt_kprintf("Write file data failed, errno=%d\n", length); in copyfile()
962 int length; in copydir() local
974 length = dfs_file_getdents(&cpfd, &dirent, sizeof(struct dirent)); in copydir()
975 if (length > 0) in copydir()
1016 while (length > 0); in copydir()