Changeset 6132b59 in mainline
- Timestamp:
- 2008-11-02T17:54:25Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d5a720cf
- Parents:
- 9df7918
- Location:
- uspace
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/libblock/libblock.c
r9df7918 r6132b59 359 359 * @return Block structure. 360 360 */ 361 block_t *block_get(dev_handle_t dev_handle, off_t boff , size_t bs)361 block_t *block_get(dev_handle_t dev_handle, off_t boff) 362 362 { 363 363 devcon_t *devcon; -
uspace/lib/libblock/libblock.h
r9df7918 r6132b59 76 76 extern int block_cache_init(dev_handle_t, size_t, unsigned); 77 77 78 extern block_t *block_get(dev_handle_t, off_t , size_t);78 extern block_t *block_get(dev_handle_t, off_t); 79 79 extern void block_put(block_t *); 80 80 -
uspace/srv/fs/fat/fat_fat.c
r9df7918 r6132b59 96 96 /* root directory special case */ 97 97 assert(offset < rds); 98 b = block_get(dev_handle, rscnt + fatcnt * sf + offset , bps);98 b = block_get(dev_handle, rscnt + fatcnt * sf + offset); 99 99 return b; 100 100 } … … 109 109 fidx = clst % (bps / sizeof(fat_cluster_t)); 110 110 /* read FAT1 */ 111 b = block_get(dev_handle, rscnt + fsec , bps);111 b = block_get(dev_handle, rscnt + fsec); 112 112 clst = uint16_t_le2host(((fat_cluster_t *)b->data)[fidx]); 113 113 assert(clst != FAT_CLST_BAD); … … 117 117 118 118 b = block_get(dev_handle, ssa + (clst - FAT_CLST_FIRST) * spc + 119 offset % spc , bps);119 offset % spc); 120 120 121 121 return b; … … 164 164 fidx = clst % (bps / sizeof(fat_cluster_t)); 165 165 /* read FAT1 */ 166 b = block_get(dev_handle, rscnt + fsec , bps);166 b = block_get(dev_handle, rscnt + fsec); 167 167 clst = uint16_t_le2host(((fat_cluster_t *)b->data)[fidx]); 168 168 assert(clst != FAT_CLST_BAD); … … 244 244 assert(fatno < bs->fatcnt); 245 245 b = block_get(dev_handle, rscnt + sf * fatno + 246 (clst * sizeof(fat_cluster_t)) / bps , bps);246 (clst * sizeof(fat_cluster_t)) / bps); 247 247 cp = (fat_cluster_t *)b->data + clst % (bps / sizeof(fat_cluster_t)); 248 248 *cp = host2uint16_t_le(value); … … 314 314 futex_down(&fat_alloc_lock); 315 315 for (b = 0, cl = 0; b < sf; blk++) { 316 blk = block_get(dev_handle, rscnt + b , bps);316 blk = block_get(dev_handle, rscnt + b); 317 317 for (c = 0; c < bps / sizeof(fat_cluster_t); c++, cl++) { 318 318 fat_cluster_t *clst = (fat_cluster_t *)blk->data + c;
Note:
See TracChangeset
for help on using the changeset viewer.