Changeset a2a1792 in mainline
- Timestamp:
- 2011-02-16T17:11:51Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- b65cae22
- Parents:
- 5352d72
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ext2/libext2_filesystem.c
r5352d72 ra2a1792 186 186 uint32_t block_group; 187 187 uint32_t offset_in_group; 188 uint32_t byte_offset_in_group; 189 size_t offset_in_block; 188 190 uint32_t inodes_per_group; 189 191 uint32_t inode_table_start; … … 217 219 block_size = ext2_superblock_get_block_size(fs->superblock); 218 220 219 block_id = inode_table_start + ((index * inode_size) / block_size); 221 byte_offset_in_group = offset_in_group * inode_size; 222 223 block_id = inode_table_start + (byte_offset_in_group / block_size); 224 offset_in_block = byte_offset_in_group % block_size; 220 225 221 226 rc = block_get(&newref->block, fs->device, block_id, 0); … … 225 230 } 226 231 227 newref->inode = newref->block->data + (offset_in_group*inode_size);232 newref->inode = newref->block->data + offset_in_block; 228 233 229 234 *ref = newref;
Note:
See TracChangeset
for help on using the changeset viewer.