Changeset af8ce880 in mainline
- Timestamp:
- 2011-04-05T17:11:50Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2bbbfd3
- Parents:
- 8829e33
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/minixfs/mfs_rw.c
r8829e33 raf8ce880 191 191 *zone pointer in the chain. 192 192 */ 193 uint32_t di_block = rblock / ptrs_per_block;193 uint32_t ind2_block = rblock / ptrs_per_block; 194 194 195 195 /*read the second indirect zone of the chain*/ 196 196 if (fs_version == MFS_VERSION_V1) { 197 197 uint16_t *pt16 = bi1->data; 198 uint16_t blk = conv16(sbi->native, pt16[ di_block]);198 uint16_t blk = conv16(sbi->native, pt16[ind2_block]); 199 199 200 200 if (blk == 0) { … … 206 206 207 207 blk = block; 208 pt16[ di_block] = conv16(sbi->native, blk);208 pt16[ind2_block] = conv16(sbi->native, blk); 209 209 bi1->dirty = true; 210 210 } else { … … 220 220 221 221 pt16 = bi2->data; 222 pt16 += di_block % ptrs_per_block;222 pt16 += ind2_block % ptrs_per_block; 223 223 *b = conv16(sbi->native, *pt16); 224 224 if (write_mode) { … … 228 228 } else { 229 229 uint32_t *pt32 = bi1->data; 230 uint32_t blk = conv32(sbi->native, pt32[ di_block]);230 uint32_t blk = conv32(sbi->native, pt32[ind2_block]); 231 231 232 232 if (blk == 0) { … … 238 238 239 239 blk = block; 240 pt32[ di_block] = conv32(sbi->native, blk);240 pt32[ind2_block] = conv32(sbi->native, blk); 241 241 bi1->dirty = true; 242 242 } else { … … 252 252 253 253 pt32 = bi2->data; 254 pt32 += di_block % ptrs_per_block;254 pt32 += ind2_block % ptrs_per_block; 255 255 *b = conv32(sbi->native, *pt32); 256 256 if (write_mode) {
Note:
See TracChangeset
for help on using the changeset viewer.