Lines Matching refs:scl
1328 DWORD val, scl, ctr; in find_bitmap() local
1333 scl = val = clst; ctr = 0; in find_bitmap()
1344 if (++ctr == ncl) return scl + 2; /* Check if run length is sufficient for required */ in find_bitmap()
1346 scl = val; ctr = 0; /* Encountered a cluster in-use, restart to scan */ in find_bitmap()
1455 DWORD scl = clst, ecl = clst; in remove_chain() local
1489 … res = change_bitmap(fs, scl, ecl - scl + 1, 0); /* Mark the cluster block 'free' on the bitmap */ in remove_chain()
1494 rt[0] = clst2sect(fs, scl); /* Start of data area to be freed */ in remove_chain()
1498 scl = ecl = nxt; in remove_chain()
1545 DWORD cs, ncl, scl; in create_chain() local
1551 scl = fs->last_clst; /* Suggested cluster to start to find */ in create_chain()
1552 if (scl == 0 || scl >= fs->n_fatent) scl = 1; in create_chain()
1559 scl = clst; /* Cluster to start to find */ in create_chain()
1565 ncl = find_bitmap(fs, scl, 1); /* Find a free cluster */ in create_chain()
1573 if (obj->stat == 2 && ncl != scl + 1) { /* Is the chain got fragmented? */ in create_chain()
1574 obj->n_cont = scl - obj->sclust; /* Set size of the contiguous part */ in create_chain()
1591 if (scl == clst) { /* Stretching an existing chain? */ in create_chain()
1592 ncl = scl + 1; /* Test if next cluster is free */ in create_chain()
1598 if (cs >= 2 && cs < fs->n_fatent) scl = cs; in create_chain()
1603 ncl = scl; /* Start cluster */ in create_chain()
1608 if (ncl > scl) return 0; /* No free cluster found? */ in create_chain()
1613 if (ncl == scl) return 0; /* No free cluster found? */ in create_chain()
5591 DWORD n, clst, stcl, scl, ncl, tcl, lclst; local
5607 scl = find_bitmap(fs, stcl, tcl); /* Find a contiguous cluster block */
5608 if (scl == 0) res = FR_DENIED; /* No contiguous cluster block was found */
5609 if (scl == 0xFFFFFFFF) res = FR_DISK_ERR;
5612 res = change_bitmap(fs, scl, tcl, 1); /* Mark the cluster block 'in use' */
5613 lclst = scl + tcl - 1;
5615 lclst = scl - 1;
5621 scl = clst = stcl; ncl = 0;
5634 scl = clst; ncl = 0; /* Not a free cluster */
5642 for (clst = scl, n = tcl; n; clst++, n--) { /* Create a cluster chain on the FAT */
5648 lclst = scl - 1;
5656 fp->obj.sclust = scl; /* Update object allocation information */