Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 3ab580a in mainline


Ignore:
Timestamp:
2011-04-17T18:42:17Z (11 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master
Children:
127d999
Parents:
58c36ac
Message:

inode numbers start from 1, not 0. Fix write_inode functions appropriately.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/minixfs/mfs_inode.c

    r58c36ac r3ab580a  
    225225        struct mfs_sb_info *sbi = mnode->instance->sbi;
    226226
     227        const uint32_t inum = ino_i->index - 1;
    227228        const int itable_off = sbi->itable_off;
    228         const int ino_off = ino_i->index % sbi->ino_per_block;
     229        const int ino_off = inum % sbi->ino_per_block;
    229230        const bool native = sbi->native;
    230231
    231232        r = block_get(&b, mnode->instance->handle,
    232                                 itable_off + ino_i->index / sbi->ino_per_block,
     233                                itable_off + inum / sbi->ino_per_block,
    233234                                BLOCK_FLAGS_NONE);
    234235
     
    267268        int i, r;
    268269
     270        const uint32_t inum = ino_i->index - 1;
    269271        const int itable_off = sbi->itable_off;
    270         const int ino_off = ino_i->index % sbi->ino_per_block;
     272        const int ino_off = inum % sbi->ino_per_block;
    271273        const bool native = sbi->native;
    272274       
    273275        r = block_get(&b, mnode->instance->handle,
    274                                 itable_off + ino_i->index / sbi->ino_per_block,
     276                                itable_off + inum / sbi->ino_per_block,
    275277                                BLOCK_FLAGS_NONE);
    276278
Note: See TracChangeset for help on using the changeset viewer.