Changeset 6a7e497 in mainline for uspace/lib/ext2/libext2_directory.c
- Timestamp:
- 2011-06-02T19:05:17Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 16b2ea8
- Parents:
- 18626b3 (diff), d030e0c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/ext2/libext2_directory.c
r18626b3 r6a7e497 93 93 it->fs = fs; 94 94 95 / / Get the first data block, so we can get first entry95 /* Get the first data block, so we can get the first entry */ 96 96 rc = ext2_filesystem_get_inode_data_block_index(fs, inode_ref->inode, 0, 97 97 &block_id); … … 133 133 size = ext2_inode_get_size(it->fs->superblock, it->inode_ref->inode); 134 134 135 / / Are we at the end?135 /* Are we at the end? */ 136 136 if (it->current_offset + skip >= size) { 137 137 rc = block_put(it->current_block); … … 150 150 next_block_idx = (it->current_offset + skip) / block_size; 151 151 152 // If we are moving accross block boundary, 153 // we need to get another block 152 /* If we are moving accross block boundary, 153 * we need to get another block 154 */ 154 155 if (current_block_idx != next_block_idx) { 155 156 rc = block_put(it->current_block); … … 176 177 offset_in_block = (it->current_offset + skip) % block_size; 177 178 178 / / Ensure proper alignment179 /* Ensure proper alignment */ 179 180 if ((offset_in_block % 4) != 0) { 180 181 it->current = NULL; … … 182 183 } 183 184 184 / / Ensure that the core of the entry does not overflow the block185 /* Ensure that the core of the entry does not overflow the block */ 185 186 if (offset_in_block > block_size - 8) { 186 187 it->current = NULL; … … 191 192 it->current_offset += skip; 192 193 193 / / Ensure that the whole entry does not overflow the block194 /* Ensure that the whole entry does not overflow the block */ 194 195 skip = ext2_directory_entry_ll_get_entry_length(it->current); 195 196 if (offset_in_block + skip > block_size) { … … 198 199 } 199 200 200 / / Ensure the name length is not too large201 /* Ensure the name length is not too large */ 201 202 if (ext2_directory_entry_ll_get_name_length(it->fs->superblock, 202 203 it->current) > skip-8) {
Note:
See TracChangeset
for help on using the changeset viewer.