Changeset 7a57269f in mainline
- Timestamp:
- 2011-04-07T21:00:29Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 88ccd8b8
- Parents:
- 07dcec5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/minixfs/mfs_dentry.c
r07dcec5 r7a57269f 45 45 block_t *b; 46 46 47 struct mfs_dentry_info *d_info = malloc(sizeof *d_info);47 struct mfs_dentry_info *d_info = malloc(sizeof(*d_info)); 48 48 49 49 if (!d_info) … … 51 51 52 52 int r = read_map(&block, mnode, index * sbi->dirsize); 53 54 53 if (r != EOK || block == 0) 55 54 goto out_err; 56 55 57 56 r = block_get(&b, inst->handle, block, BLOCK_FLAGS_NONE); 58 59 57 if (r != EOK) 60 58 goto out_err; 59 60 unsigned dentries_per_zone = sbi->block_size / sbi->dirsize; 61 unsigned dentry_off = index % (dentries_per_zone - 1); 61 62 62 63 if (sbi->fs_version == MFS_VERSION_V3) { … … 64 65 65 66 d3 = b->data; 67 d3 += dentry_off; 66 68 d_info->d_inum = conv32(sbi->native, d3->d_inum); 67 69 memcpy(d_info->d_name, d3->d_name, MFS3_MAX_NAME_LEN); … … 73 75 74 76 d = b->data; 77 d += dentry_off; 75 78 d_info->d_inum = conv16(sbi->native, d->d_inum); 76 79 memcpy(d_info->d_name, d->d_name, namelen);
Note:
See TracChangeset
for help on using the changeset viewer.