Changeset e666ddc in mainline for uspace/srv/fs/minixfs/mfs_dentry.c


Ignore:
Timestamp:
2011-04-09T15:35:40Z (13 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
668f1949
Parents:
e33100c
Message:

Fix a bug in dentry on-disk offset calculation

File:
1 edited

Legend:

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

    re33100c re666ddc  
    4545        block_t *b;
    4646
     47        mfsdebug("read_directory(%u)\n", index);
     48
    4749        struct mfs_dentry_info *d_info = malloc(sizeof(*d_info));
    48 
    4950        if (!d_info)
    5051                return NULL;
     
    6465                struct mfs3_dentry *d3;
    6566
    66                 d3 = b->data;
     67                d3 = b->data + (dentry_off * MFS3_DIRSIZE);
    6768                d3 += dentry_off;
    6869                d_info->d_inum = conv32(sbi->native, d3->d_inum);
     
    7475                struct mfs_dentry *d;
    7576
    76                 d = b->data;
    77                 d += dentry_off;
     77                d = b->data + dentry_off * (longnames ? MFSL_DIRSIZE :
     78                                                        MFS_DIRSIZE);
    7879                d_info->d_inum = conv16(sbi->native, d->d_inum);
    7980                memcpy(d_info->d_name, d->d_name, namelen);
Note: See TracChangeset for help on using the changeset viewer.