Changeset 6132b59 in mainline


Ignore:
Timestamp:
2008-11-02T17:54:25Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d5a720cf
Parents:
9df7918
Message:

Do not use/pass the superfluous block size argument to block_get().

Location:
uspace
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libblock/libblock.c

    r9df7918 r6132b59  
    359359 * @return                      Block structure.
    360360 */
    361 block_t *block_get(dev_handle_t dev_handle, off_t boff, size_t bs)
     361block_t *block_get(dev_handle_t dev_handle, off_t boff)
    362362{
    363363        devcon_t *devcon;
  • uspace/lib/libblock/libblock.h

    r9df7918 r6132b59  
    7676extern int block_cache_init(dev_handle_t, size_t, unsigned);
    7777
    78 extern block_t *block_get(dev_handle_t, off_t, size_t);
     78extern block_t *block_get(dev_handle_t, off_t);
    7979extern void block_put(block_t *);
    8080
  • uspace/srv/fs/fat/fat_fat.c

    r9df7918 r6132b59  
    9696                /* root directory special case */
    9797                assert(offset < rds);
    98                 b = block_get(dev_handle, rscnt + fatcnt * sf + offset, bps);
     98                b = block_get(dev_handle, rscnt + fatcnt * sf + offset);
    9999                return b;
    100100        }
     
    109109                fidx = clst % (bps / sizeof(fat_cluster_t));
    110110                /* read FAT1 */
    111                 b = block_get(dev_handle, rscnt + fsec, bps);
     111                b = block_get(dev_handle, rscnt + fsec);
    112112                clst = uint16_t_le2host(((fat_cluster_t *)b->data)[fidx]);
    113113                assert(clst != FAT_CLST_BAD);
     
    117117
    118118        b = block_get(dev_handle, ssa + (clst - FAT_CLST_FIRST) * spc +
    119             offset % spc, bps);
     119            offset % spc);
    120120
    121121        return b;
     
    164164                fidx = clst % (bps / sizeof(fat_cluster_t));
    165165                /* read FAT1 */
    166                 b = block_get(dev_handle, rscnt + fsec, bps);
     166                b = block_get(dev_handle, rscnt + fsec);
    167167                clst = uint16_t_le2host(((fat_cluster_t *)b->data)[fidx]);
    168168                assert(clst != FAT_CLST_BAD);
     
    244244        assert(fatno < bs->fatcnt);
    245245        b = block_get(dev_handle, rscnt + sf * fatno +
    246             (clst * sizeof(fat_cluster_t)) / bps, bps);
     246            (clst * sizeof(fat_cluster_t)) / bps);
    247247        cp = (fat_cluster_t *)b->data + clst % (bps / sizeof(fat_cluster_t));
    248248        *cp = host2uint16_t_le(value);
     
    314314        futex_down(&fat_alloc_lock);
    315315        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);
    317317                for (c = 0; c < bps / sizeof(fat_cluster_t); c++, cl++) {
    318318                        fat_cluster_t *clst = (fat_cluster_t *)blk->data + c;
Note: See TracChangeset for help on using the changeset viewer.