Rev 3506 | Rev 3510 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3506 | Rev 3507 | ||
---|---|---|---|
Line 214... | Line 214... | ||
214 | fat_cluster_t value) |
214 | fat_cluster_t value) |
215 | { |
215 | { |
216 | /* TODO */ |
216 | /* TODO */ |
217 | } |
217 | } |
218 | 218 | ||
219 | void |
- | |
220 | fat_alloc_shadow_clusters(dev_handle_t dev_handle, fat_cluster_t *lifo, |
219 | void fat_alloc_shadow_clusters(dev_handle_t dev_handle, fat_cluster_t *lifo, |
221 | unsigned nclsts) |
220 | unsigned nclsts) |
222 | { |
221 | { |
- | 222 | uint8_t fatcnt; |
|
- | 223 | uint8_t fatno; |
|
- | 224 | unsigned c; |
|
223 | /* TODO */ |
225 | block_t *bb; |
- | 226 | ||
- | 227 | bb = block_get(dev_handle, BS_BLOCK, BS_SIZE); |
|
- | 228 | fatcnt = FAT_BS(bb)->fatcnt; |
|
- | 229 | block_put(bb); |
|
- | 230 | ||
- | 231 | for (fatno = FAT1 + 1; fatno < fatcnt; fatno++) { |
|
- | 232 | for (c = 0; c < nclsts; c++) { |
|
- | 233 | fat_mark_cluster(dev_handle, fatno, lifo[c], |
|
- | 234 | c == 0 ? FAT_CLST_LAST1 : lifo[c - 1]); |
|
- | 235 | } |
|
- | 236 | } |
|
224 | } |
237 | } |
225 | 238 | ||
226 | int |
239 | int |
227 | fat_alloc_clusters(dev_handle_t dev_handle, unsigned nclsts, fat_cluster_t *mcl, |
240 | fat_alloc_clusters(dev_handle_t dev_handle, unsigned nclsts, fat_cluster_t *mcl, |
228 | fat_cluster_t *lcl) |
241 | fat_cluster_t *lcl) |