Changeset 51d0ee9 in mainline for uspace/app/mkfat/mkfat.c


Ignore:
Timestamp:
2011-08-27T21:27:24Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
dc6b148
Parents:
4cf5ed46
Message:

Fix ppc32 build and a possible rounding error.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/mkfat/mkfat.c

    r4cf5ed46 r51d0ee9  
    253253                return ENOSPC;
    254254
    255         fat_bytes = (cfg->total_clusters + 2) * FAT_SIZE(cfg->fat_type);
     255        fat_bytes = div_round_up((cfg->total_clusters + 2) *
     256            FAT_CLUSTER_DOUBLE_SIZE(cfg->fat_type), 2);
    256257        cfg->fat_sectors = div_round_up(fat_bytes, cfg->sector_size);
    257258
Note: See TracChangeset for help on using the changeset viewer.