Lines Matching defs:blk
281 ulong_t off, blk;
295 blk = FI_STARTCLUST(fp);
296 rd = blk == CLUSTER_ROOTDIR ? 1 : 0;
300 blk = FI_STARTCLUST(fp);
301 rd = (blk == CLUSTER_ROOTDIR) ? 1 : 0;
307 blk = fat_map(blk, rd);
310 if (!cluster_valid(blk, rd)) {
312 blk, rd);
318 sector = fat_ctodb(blk, rd);
339 blk = fat_map(blk, rd);
340 if (!cluster_valid(blk, rd)) {
342 blk, rd);
403 fat_ctodb(int blk, int r)
407 s = r ? blk + pcfsp->f_rootsec + pcfsp->f_adjust :
408 ((blk - 2) * pcfsp->f_bpb.bs_spc) +
415 fat_map(int blk, int rootdir)
421 return (blk > pcfsp->f_rootlen ? CLUSTER_EOF : blk + 1);
425 fat_index = (pcfsp->f_16bit) ? ((ulong_t)blk << 1) :
426 ((ulong_t)blk + ((uint_t)blk >> 1));
444 blk = fp[0] | (fp[1] << 8);
446 if (blk & 1)
447 blk = ((fp[0] >> 4) & 0xf) | (fp[1] << 4);
449 blk = ((fp[1] & 0xf) << 8) | fp[0];
455 if (blk >= CLUSTER_RES_12_0)
456 blk |= CLUSTER_RES_16_0;
458 return (blk);