Changeset 0dd2717 in mainline for uspace/app/mkminix/mkminix.c


Ignore:
Timestamp:
2011-03-11T18:20:23Z (13 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b84175a
Parents:
d3ce9515
Message:

Fix wrong use of the FIRST_ZONE macro

File:
1 edited

Legend:

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

    rd3ce9515 r0dd2717  
    324324        unsigned long itable_size;
    325325
    326         itable_off = FIRST_ZONE(sb->block_size);
    327         itable_off += sb->zbmap_blocks + sb->ibmap_blocks;
     326        itable_off = sb->zbmap_blocks + sb->ibmap_blocks;
    328327
    329328        /*Convert to 1K offset*/
    330         itable_off = CONVERT_1K_OFF(itable_off, sb->block_size);
     329        itable_off = CONVERT_1K_OFF(itable_off, sb->block_size) + 2;
    331330        itable_size = CONVERT_1K_OFF(sb->itable_size, sb->block_size);
    332331
     
    388387
    389388        /*Compute offset of the first inode table block*/
    390         itable_off = FIRST_ZONE(sb->block_size);
    391         itable_off += sb->zbmap_blocks + sb->ibmap_blocks;
     389        itable_off = sb->zbmap_blocks + sb->ibmap_blocks;
    392390
    393391        /*Convert to 1K block offset*/
    394         itable_off = CONVERT_1K_OFF(itable_off, sb->block_size);
     392        itable_off = CONVERT_1K_OFF(itable_off, sb->block_size) + 2;
    395393
    396394        const time_t sec = time(NULL);
     
    582580        zbmap_buf8 = (uint8_t *) zbmap_buf;
    583581
    584         int start_block = FIRST_ZONE(sb->block_size);
     582        int start_block = 2;
    585583
    586584        for (i = 0; i < ibmap_nblocks; ++i) {
     
    590588        }
    591589
    592         start_block = FIRST_ZONE(sb->block_size) + ibmap_nblocks;
     590        start_block = 2 + ibmap_nblocks;
    593591
    594592        for (i = 0; i < zbmap_nblocks; ++i) {
Note: See TracChangeset for help on using the changeset viewer.