Lines Matching refs:fsdata

149 static int flush_dirty_fat_buffer(fsdata *mydata);
153 int flush_dirty_fat_buffer(fsdata *mydata) in flush_dirty_fat_buffer()
164 static __u32 get_fatent(fsdata *mydata, __u32 entry) in get_fatent()
249 get_cluster(fsdata *mydata, __u32 clustnum, __u8 *buffer, unsigned long size) in get_cluster()
325 static int get_contents(fsdata *mydata, dir_entry *dentptr, loff_t pos, in get_contents()
560 static int get_fs_info(fsdata *mydata) in get_fs_info()
674 fsdata *fsdata; member
743 static int fat_itr_root(fat_itr *itr, fsdata *fsdata) in fat_itr_root() argument
745 if (get_fs_info(fsdata)) in fat_itr_root()
748 itr->fsdata = fsdata; in fat_itr_root()
749 itr->start_clust = fsdata->root_cluster; in fat_itr_root()
750 itr->clust = fsdata->root_cluster; in fat_itr_root()
751 itr->next_clust = fsdata->root_cluster; in fat_itr_root()
779 fsdata *mydata = parent->fsdata; /* for silly macros */ in fat_itr_child()
784 itr->fsdata = parent->fsdata; in fat_itr_child()
791 itr->clust = parent->fsdata->root_cluster; in fat_itr_child()
792 itr->next_clust = parent->fsdata->root_cluster; in fat_itr_child()
793 itr->start_clust = parent->fsdata->root_cluster; in fat_itr_child()
821 if (itr->is_root && itr->fsdata->fatsize != 32) { in fat_next_cluster()
829 unsigned sect_offset = itr->next_clust * itr->fsdata->clust_size; in fat_next_cluster()
830 unsigned remaining_sects = itr->fsdata->rootdir_size - sect_offset; in fat_next_cluster()
831 sect = itr->fsdata->rootdir_sect + sect_offset; in fat_next_cluster()
833 read_size = min_t(u32, itr->fsdata->clust_size, in fat_next_cluster()
836 sect = clust_to_sect(itr->fsdata, itr->next_clust); in fat_next_cluster()
837 read_size = itr->fsdata->clust_size; in fat_next_cluster()
841 sect, itr->fsdata->clust_size, read_size); in fat_next_cluster()
858 *nbytes = read_size * itr->fsdata->sect_size; in fat_next_cluster()
860 if (itr->is_root && itr->fsdata->fatsize != 32) { in fat_next_cluster()
862 if (itr->next_clust * itr->fsdata->clust_size >= in fat_next_cluster()
863 itr->fsdata->rootdir_size) { in fat_next_cluster()
868 itr->next_clust = get_fatent(itr->fsdata, itr->next_clust); in fat_next_cluster()
869 if (CHECK_CLUST(itr->next_clust, itr->fsdata->fatsize)) { in fat_next_cluster()
1085 itr->clust = itr->fsdata->root_cluster; in fat_itr_resolve()
1086 itr->next_clust = itr->fsdata->root_cluster; in fat_itr_resolve()
1087 itr->start_clust = itr->fsdata->root_cluster; in fat_itr_resolve()
1202 fsdata fsdata; in fat_exists() local
1209 ret = fat_itr_root(itr, &fsdata); in fat_exists()
1214 free(fsdata.fatbuf); in fat_exists()
1222 fsdata fsdata; in fat_size() local
1229 ret = fat_itr_root(itr, &fsdata); in fat_size()
1239 free(fsdata.fatbuf); in fat_size()
1240 ret = fat_itr_root(itr, &fsdata); in fat_size()
1251 free(fsdata.fatbuf); in fat_size()
1260 fsdata fsdata; in file_fat_read_at() local
1267 ret = fat_itr_root(itr, &fsdata); in file_fat_read_at()
1280 ret = get_contents(&fsdata, dentptr, pos, buffer, maxsize, actread); in file_fat_read_at()
1283 free(fsdata.fatbuf); in file_fat_read_at()
1316 fsdata fsdata; member
1330 ret = fat_itr_root(&dir->itr, &dir->fsdata); in fat_opendir()
1342 free(dir->fsdata.fatbuf); in fat_opendir()
1374 free(dir->fsdata.fatbuf); in fat_closedir()