cl 180 usr/server/fs/fatfs/fatfs.h #define IS_EOFCL(fat, cl) \ cl 181 usr/server/fs/fatfs/fatfs.h (((cl) & EOF_MASK) == ((fat)->fat_mask & EOF_MASK)) cl 195 usr/server/fs/fatfs/fatfs.h #define cl_to_sec(fat, cl) \ cl 196 usr/server/fs/fatfs/fatfs.h (fat->data_start + (cl - 2) * fat->sec_per_cl) cl 199 usr/server/fs/fatfs/fatfs.h int fat_next_cluster(struct fatfsmount *fmp, u_long cl, u_long *next); cl 200 usr/server/fs/fatfs/fatfs.h int fat_set_cluster(struct fatfsmount *fmp, u_long cl, u_long next); cl 204 usr/server/fs/fatfs/fatfs.h u_long *cl); cl 205 usr/server/fs/fatfs/fatfs.h int fat_expand_file(struct fatfsmount *fmp, u_long cl, int size); cl 206 usr/server/fs/fatfs/fatfs.h int fat_expand_dir(struct fatfsmount *fmp, u_long cl, u_long *new_cl); cl 44 usr/server/fs/fatfs/fatfs_fat.c read_fat_entry(struct fatfsmount *fmp, u_long cl) cl 53 usr/server/fs/fatfs/fatfs_fat.c sec = (cl * 2) / SEC_SIZE; cl 55 usr/server/fs/fatfs/fatfs_fat.c sec = (cl * 3 / 2) / SEC_SIZE; cl 61 usr/server/fs/fatfs/fatfs_fat.c if ((cl * 3 / 2) % SEC_SIZE == SEC_SIZE - 1) cl 87 usr/server/fs/fatfs/fatfs_fat.c write_fat_entry(struct fatfsmount *fmp, u_long cl) cl 96 usr/server/fs/fatfs/fatfs_fat.c sec = (cl * 2) / SEC_SIZE; cl 98 usr/server/fs/fatfs/fatfs_fat.c sec = (cl * 3 / 2) / SEC_SIZE; cl 100 usr/server/fs/fatfs/fatfs_fat.c if ((cl * 3 / 2) % SEC_SIZE == SEC_SIZE - 1) cl 128 usr/server/fs/fatfs/fatfs_fat.c fat_next_cluster(struct fatfsmount *fmp, u_long cl, u_long *next) cl 135 usr/server/fs/fatfs/fatfs_fat.c error = read_fat_entry(fmp, cl); cl 141 usr/server/fs/fatfs/fatfs_fat.c offset = (cl * 2) % SEC_SIZE; cl 143 usr/server/fs/fatfs/fatfs_fat.c offset = (cl * 3 / 2) % SEC_SIZE; cl 150 usr/server/fs/fatfs/fatfs_fat.c if (cl & 1) cl 156 usr/server/fs/fatfs/fatfs_fat.c DPRINTF(("fat_next_cluster: %d => %d\n", cl, *next)); cl 167 usr/server/fs/fatfs/fatfs_fat.c fat_set_cluster(struct fatfsmount *fmp, u_long cl, u_long next) cl 175 usr/server/fs/fatfs/fatfs_fat.c error = read_fat_entry(fmp, cl); cl 181 usr/server/fs/fatfs/fatfs_fat.c offset = (cl * 2) % SEC_SIZE; cl 183 usr/server/fs/fatfs/fatfs_fat.c offset = (cl * 3 / 2) % SEC_SIZE; cl 189 usr/server/fs/fatfs/fatfs_fat.c if (cl & 1) { cl 200 usr/server/fs/fatfs/fatfs_fat.c error = write_fat_entry(fmp, cl); cl 214 usr/server/fs/fatfs/fatfs_fat.c u_long cl, next; cl 222 usr/server/fs/fatfs/fatfs_fat.c cl = scan_start + 1; cl 223 usr/server/fs/fatfs/fatfs_fat.c while (cl != scan_start) { cl 224 usr/server/fs/fatfs/fatfs_fat.c error = fat_next_cluster(fmp, cl, &next); cl 228 usr/server/fs/fatfs/fatfs_fat.c DPRINTF(("fat_alloc_cluster: free cluster=%d\n", cl)); cl 229 usr/server/fs/fatfs/fatfs_fat.c *free = cl; cl 232 usr/server/fs/fatfs/fatfs_fat.c if (++cl >= fmp->last_cluster) cl 233 usr/server/fs/fatfs/fatfs_fat.c cl = CL_FIRST; cl 247 usr/server/fs/fatfs/fatfs_fat.c u_long cl, next; cl 249 usr/server/fs/fatfs/fatfs_fat.c cl = start; cl 250 usr/server/fs/fatfs/fatfs_fat.c if (cl < CL_FIRST) cl 253 usr/server/fs/fatfs/fatfs_fat.c while (!IS_EOFCL(fmp, cl)) { cl 254 usr/server/fs/fatfs/fatfs_fat.c error = fat_next_cluster(fmp, cl, &next); cl 257 usr/server/fs/fatfs/fatfs_fat.c error = fat_set_cluster(fmp, cl, CL_FREE); cl 260 usr/server/fs/fatfs/fatfs_fat.c cl = next; cl 263 usr/server/fs/fatfs/fatfs_fat.c error = fat_set_cluster(fmp, cl, CL_FREE); cl 279 usr/server/fs/fatfs/fatfs_fat.c u_long *cl) cl 296 usr/server/fs/fatfs/fatfs_fat.c *cl = c; cl 308 usr/server/fs/fatfs/fatfs_fat.c fat_expand_file(struct fatfsmount *fmp, u_long cl, int size) cl 317 usr/server/fs/fatfs/fatfs_fat.c error = fat_next_cluster(fmp, cl, &next); cl 321 usr/server/fs/fatfs/fatfs_fat.c error = fat_alloc_cluster(fmp, cl, &next); cl 327 usr/server/fs/fatfs/fatfs_fat.c error = fat_set_cluster(fmp, cl, next); cl 331 usr/server/fs/fatfs/fatfs_fat.c cl = next; cl 334 usr/server/fs/fatfs/fatfs_fat.c fat_set_cluster(fmp, cl, fmp->fat_eof); /* add eof */ cl 349 usr/server/fs/fatfs/fatfs_fat.c fat_expand_dir(struct fatfsmount *fmp, u_long cl, u_long *new_cl) cl 355 usr/server/fs/fatfs/fatfs_fat.c while (!IS_EOFCL(fmp, cl)) { cl 356 usr/server/fs/fatfs/fatfs_fat.c error = fat_next_cluster(fmp, cl, &next); cl 359 usr/server/fs/fatfs/fatfs_fat.c cl = next; cl 362 usr/server/fs/fatfs/fatfs_fat.c error = fat_alloc_cluster(fmp, cl, &next); cl 366 usr/server/fs/fatfs/fatfs_fat.c error = fat_set_cluster(fmp, cl, next); cl 125 usr/server/fs/fatfs/fatfs_node.c u_long cl, sec; cl 137 usr/server/fs/fatfs/fatfs_node.c cl = dvp->v_blkno; cl 138 usr/server/fs/fatfs/fatfs_node.c if (cl == CL_ROOT) { cl 147 usr/server/fs/fatfs/fatfs_node.c while (!IS_EOFCL(fmp, cl)) { cl 148 usr/server/fs/fatfs/fatfs_node.c sec = cl_to_sec(fmp, cl); cl 156 usr/server/fs/fatfs/fatfs_node.c error = fat_next_cluster(fmp, cl, &cl); cl 217 usr/server/fs/fatfs/fatfs_node.c u_long cl, sec; cl 221 usr/server/fs/fatfs/fatfs_node.c cl = dvp->v_blkno; cl 226 usr/server/fs/fatfs/fatfs_node.c if (cl == CL_ROOT) { cl 235 usr/server/fs/fatfs/fatfs_node.c while (!IS_EOFCL(fmp, cl)) { cl 236 usr/server/fs/fatfs/fatfs_node.c sec = cl_to_sec(fmp, cl); cl 244 usr/server/fs/fatfs/fatfs_node.c error = fat_next_cluster(fmp, cl, &cl); cl 295 usr/server/fs/fatfs/fatfs_node.c u_long cl, sec; cl 300 usr/server/fs/fatfs/fatfs_node.c cl = dvp->v_blkno; cl 302 usr/server/fs/fatfs/fatfs_node.c DPRINTF(("fatfs_add_node: cl=%d\n", cl)); cl 304 usr/server/fs/fatfs/fatfs_node.c if (cl == CL_ROOT) { cl 313 usr/server/fs/fatfs/fatfs_node.c while (!IS_EOFCL(fmp, cl)) { cl 314 usr/server/fs/fatfs/fatfs_node.c sec = cl_to_sec(fmp, cl); cl 321 usr/server/fs/fatfs/fatfs_node.c error = fat_next_cluster(fmp, cl, &next); cl 324 usr/server/fs/fatfs/fatfs_node.c cl = next; cl 328 usr/server/fs/fatfs/fatfs_node.c error = fat_expand_dir(fmp, cl, &next); cl 169 usr/server/fs/fatfs/fatfs_vnops.c u_long cl, file_pos; cl 193 usr/server/fs/fatfs/fatfs_vnops.c error = fat_seek_cluster(fmp, vp->v_blkno, file_pos, &cl); cl 201 usr/server/fs/fatfs/fatfs_vnops.c if (fat_read_cluster(fmp, cl)) { cl 219 usr/server/fs/fatfs/fatfs_vnops.c error = fat_next_cluster(fmp, cl, &cl); cl 225 usr/server/fs/fatfs/fatfs_vnops.c } while (!IS_EOFCL(fmp, cl)); cl 243 usr/server/fs/fatfs/fatfs_vnops.c u_long cl; cl 280 usr/server/fs/fatfs/fatfs_vnops.c error = fat_seek_cluster(fmp, vp->v_blkno, file_pos, &cl); cl 291 usr/server/fs/fatfs/fatfs_vnops.c if (fat_read_cluster(fmp, cl)) { cl 303 usr/server/fs/fatfs/fatfs_vnops.c if (fat_write_cluster(fmp, cl)) { cl 313 usr/server/fs/fatfs/fatfs_vnops.c error = fat_next_cluster(fmp, cl, &cl); cl 320 usr/server/fs/fatfs/fatfs_vnops.c } while (!IS_EOFCL(fmp, cl)); cl 381 usr/server/fs/fatfs/fatfs_vnops.c u_long cl; cl 396 usr/server/fs/fatfs/fatfs_vnops.c error = fat_alloc_cluster(fmp, 0, &cl); cl 403 usr/server/fs/fatfs/fatfs_vnops.c de->cluster = cl; cl 410 usr/server/fs/fatfs/fatfs_vnops.c error = fat_set_cluster(fmp, cl, fmp->fat_eof); cl 558 usr/server/fs/fatfs/fatfs_vnops.c u_long cl; cl 571 usr/server/fs/fatfs/fatfs_vnops.c error = fat_alloc_cluster(fmp, 0, &cl); cl 578 usr/server/fs/fatfs/fatfs_vnops.c de->cluster = cl; cl 592 usr/server/fs/fatfs/fatfs_vnops.c de->cluster = cl; cl 602 usr/server/fs/fatfs/fatfs_vnops.c if (fat_write_cluster(fmp, cl)) { cl 607 usr/server/fs/fatfs/fatfs_vnops.c error = fat_set_cluster(fmp, cl, fmp->fat_eof);