Lines Matching refs:buf
63 uint8_t *buf = kzalloc(fsbi->bytes_per_clus, 0); in __fat32_search_long_short() local
80 …sk->fops->transfer(blk->bd_disk, AHCI_CMD_READ_DMA_EXT, sector, fsbi->sec_per_clus, (uint64_t)buf); in __fat32_search_long_short()
82 tmp_dEntry = (struct fat32_Directory_t *)buf; in __fat32_search_long_short()
287 kfree(buf); in __fat32_search_long_short()
294 kfree(buf); in __fat32_search_long_short()
300 sinfo->buffer = buf; in __fat32_search_long_short()
304 sinfo->slot_off = tmp_dEntry - (struct fat32_Directory_t *)buf; in __fat32_search_long_short()
376 uint8_t buf[512] = {0}; in fat32_read_superblock() local
377 …bd_disk->fops->transfer(blk->bd_disk, AHCI_CMD_READ_DMA_EXT, blk->bd_start_LBA, 1, (uint64_t)&buf); in fat32_read_superblock()
387 struct fat32_BootSector_t *fbs = (struct fat32_BootSector_t *)buf; in fat32_read_superblock()
495 struct fat32_Directory_t *buf = (struct fat32_Directory_t *)kmalloc(fsbi->bytes_per_clus, 0); in fat32_write_inode() local
496 memset(buf, 0, fsbi->bytes_per_clus); in fat32_write_inode()
499 fsbi->sec_per_clus, (uint64_t)buf); in fat32_write_inode()
501 struct fat32_Directory_t *fdEntry = buf + finode->dEntry_location_clus_offset; in fat32_write_inode()
510 fsbi->sec_per_clus, (uint64_t)buf); in fat32_write_inode()
511 kfree(buf); in fat32_write_inode()
573 long fat32_read(struct vfs_file_t *file_ptr, char *buf, int64_t count, long *position) in fat32_read() argument
632 if (((uint64_t)buf) < USER_MAX_LINEAR_ADDR) in fat32_read()
633 copy_to_user(buf, tmp_buffer + bytes_offset, step_trans_len); in fat32_read()
635 memcpy(buf, tmp_buffer + bytes_offset, step_trans_len); in fat32_read()
638 buf += step_trans_len; in fat32_read()
662 long fat32_write(struct vfs_file_t *file_ptr, char *buf, int64_t count, long *position) in fat32_write() argument
728 if (((uint64_t)buf) < USER_MAX_LINEAR_ADDR) in fat32_write()
729 copy_from_user(tmp_buffer + bytes_offset, buf, step_trans_len); in fat32_write()
731 memcpy(tmp_buffer + bytes_offset, buf, step_trans_len); in fat32_write()
744 buf += step_trans_len; in fat32_write()
1032 void *buf = kmalloc(fsbi->bytes_per_clus, 0); in fat32_mkdir() local
1033 struct fat32_Directory_t *new_dir_dentries = (struct fat32_Directory_t *)buf; in fat32_mkdir()
1061 …k->fops->transfer(blk->bd_disk, AHCI_CMD_WRITE_DMA_EXT, sector, fsbi->sec_per_clus, (uint64_t)buf); in fat32_mkdir()
1163 unsigned char *buf = (unsigned char *)kzalloc(fsbi->bytes_per_clus, 0); in fat32_readdir() local
1192 fsbi->sec_per_clus, (uint64_t)buf)) in fat32_readdir()
1196 kfree(buf); in fat32_readdir()
1204 dentry = (struct fat32_Directory_t *)(buf + file_ptr->position % fsbi->bytes_per_clus); in fat32_readdir()
1326 kfree(buf); in fat32_readdir()