Lines Matching refs:fsdata
147 static int flush_dirty_fat_buffer(fsdata *mydata);
151 int flush_dirty_fat_buffer(fsdata *mydata) in flush_dirty_fat_buffer()
162 static __u32 get_fatent(fsdata *mydata, __u32 entry) in get_fatent()
247 get_cluster(fsdata *mydata, __u32 clustnum, __u8 *buffer, unsigned long size) in get_cluster()
309 static int get_contents(fsdata *mydata, dir_entry *dentptr, loff_t pos, in get_contents()
545 static int get_fs_info(fsdata *mydata) in get_fs_info()
651 fsdata *fsdata; /* filesystem parameters */ member
679 static int fat_itr_root(fat_itr *itr, fsdata *fsdata) in fat_itr_root() argument
681 if (get_fs_info(fsdata)) in fat_itr_root()
684 itr->fsdata = fsdata; in fat_itr_root()
686 itr->clust = fsdata->root_cluster; in fat_itr_root()
687 itr->next_clust = fsdata->root_cluster; in fat_itr_root()
715 fsdata *mydata = parent->fsdata; /* for silly macros */ in fat_itr_child()
720 itr->fsdata = parent->fsdata; in fat_itr_child()
727 itr->clust = parent->fsdata->root_cluster; in fat_itr_child()
728 itr->next_clust = parent->fsdata->root_cluster; in fat_itr_child()
738 fsdata *mydata = itr->fsdata; /* for silly macros */ in next_cluster()
746 sect = clust_to_sect(itr->fsdata, itr->next_clust); in next_cluster()
749 sect, itr->fsdata->clust_size, DIRENTSPERBLOCK); in next_cluster()
760 ret = disk_read(sect, itr->fsdata->clust_size, in next_cluster()
768 if (itr->is_root && itr->fsdata->fatsize != 32) { in next_cluster()
770 sect = clust_to_sect(itr->fsdata, itr->next_clust); in next_cluster()
771 if (sect - itr->fsdata->rootdir_sect >= in next_cluster()
772 itr->fsdata->rootdir_size) { in next_cluster()
777 itr->next_clust = get_fatent(itr->fsdata, itr->next_clust); in next_cluster()
778 if (CHECK_CLUST(itr->next_clust, itr->fsdata->fatsize)) { in next_cluster()
791 unsigned nbytes = itr->fsdata->sect_size * in next_dent()
792 itr->fsdata->clust_size; in next_dent()
962 itr->clust = itr->fsdata->root_cluster; in fat_itr_resolve()
963 itr->next_clust = itr->fsdata->root_cluster; in fat_itr_resolve()
1078 fsdata fsdata; in fat_exists() local
1085 ret = fat_itr_root(itr, &fsdata); in fat_exists()
1090 free(fsdata.fatbuf); in fat_exists()
1098 fsdata fsdata; in fat_size() local
1105 ret = fat_itr_root(itr, &fsdata); in fat_size()
1115 free(fsdata.fatbuf); in fat_size()
1116 fat_itr_root(itr, &fsdata); in fat_size()
1126 free(fsdata.fatbuf); in fat_size()
1135 fsdata fsdata; in file_fat_read_at() local
1142 ret = fat_itr_root(itr, &fsdata); in file_fat_read_at()
1159 ret = get_contents(&fsdata, dentptr, pos, buffer, maxsize, actread); in file_fat_read_at()
1162 free(fsdata.fatbuf); in file_fat_read_at()
1195 fsdata fsdata; member
1209 ret = fat_itr_root(&dir->itr, &dir->fsdata); in fat_opendir()
1221 free(dir->fsdata.fatbuf); in fat_opendir()
1253 free(dir->fsdata.fatbuf); in fat_closedir()