Changeset 44c6091f in mainline for uspace/srv/fs/minixfs/mfs_inode.c
- Timestamp:
- 2011-04-30T12:24:14Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fdc05ca
- Parents:
- 8a49fed
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/minixfs/mfs_inode.c
r8a49fed r44c6091f 50 50 int 51 51 get_inode(struct mfs_instance *inst, struct mfs_ino_info **ino_i, 52 52 fs_index_t index) 53 53 { 54 54 struct mfs_sb_info *sbi = inst->sbi; … … 69 69 70 70 static struct mfs_ino_info * 71 mfs_read_inode_raw(const struct mfs_instance *instance, uint16_t inum) 72 { 71 mfs_read_inode_raw(const struct mfs_instance *instance, uint16_t inum) { 73 72 struct mfs_inode *ino = NULL; 74 73 struct mfs_ino_info *ino_i = NULL; … … 95 94 96 95 if (block_get(&b, instance->handle, 97 98 96 itable_off + inum / sbi->ino_per_block, 97 BLOCK_FLAGS_NONE) != EOK) 99 98 goto out_err; 100 99 … … 128 127 129 128 static struct mfs_ino_info * 130 mfs2_read_inode_raw(const struct mfs_instance *instance, uint32_t inum) 131 { 129 mfs2_read_inode_raw(const struct mfs_instance *instance, uint32_t inum) { 132 130 struct mfs2_inode *ino = NULL; 133 131 struct mfs_ino_info *ino_i = NULL; … … 153 151 const int ino_off = inum % sbi->ino_per_block; 154 152 155 if (block_get(&b, instance->handle, 156 itable_off + inum / sbi->ino_per_block,157 153 if (block_get(&b, instance->handle, 154 itable_off + inum / sbi->ino_per_block, 155 BLOCK_FLAGS_NONE) != EOK) 158 156 goto out_err; 159 157 … … 228 226 229 227 r = block_get(&b, mnode->instance->handle, 230 231 228 itable_off + inum / sbi->ino_per_block, 229 BLOCK_FLAGS_NONE); 232 230 233 231 on_error(r, goto out); … … 268 266 const int ino_off = inum % sbi->ino_per_block; 269 267 const bool native = sbi->native; 270 268 271 269 r = block_get(&b, mnode->instance->handle, 272 273 270 itable_off + inum / sbi->ino_per_block, 271 BLOCK_FLAGS_NONE); 274 272 275 273 on_error(r, goto out); … … 282 280 ino2->i_uid = conv16(native, ino_i->i_uid); 283 281 ino2->i_gid = conv16(native, ino_i->i_gid); 284 ino2->i_size = conv32(native, ino_i->i_size); 282 ino2->i_size = conv32(native, ino_i->i_size); 285 283 ino2->i_atime = conv32(native, ino_i->i_atime); 286 284 ino2->i_mtime = conv32(native, ino_i->i_mtime); … … 389 387 block_t *b; 390 388 r = block_get(&b, mnode->instance->handle, new_zone, 391 389 BLOCK_FLAGS_NOREAD); 392 390 on_error(r, return r); 393 391 … … 397 395 398 396 r = write_map(mnode, (start_zone + i) * bs, 399 397 new_zone, &dummy); 400 398 401 399 on_error(r, return r); … … 413 411 /** 414 412 * @} 415 */ 416 413 */ 414
Note:
See TracChangeset
for help on using the changeset viewer.