Changeset c922bc7 in mainline
- Timestamp:
- 2011-04-06T18:32:00Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8ab1adff
- Parents:
- 40f7297
- Location:
- uspace/srv/fs/minixfs
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/minixfs/mfs.h
r40f7297 rc922bc7 154 154 155 155 /*mfs_inode.c*/ 156 extern struct mfs_ino_info * 157 mfs_read_inode_raw(const struct mfs_instance *instance, uint16_t inum); 158 159 extern struct mfs_ino_info * 160 mfs2_read_inode_raw(const struct mfs_instance *instance, uint32_t inum); 156 int 157 get_inode(struct mfs_instance *inst, struct mfs_ino_info **ino_i, 158 fs_index_t index); 161 159 162 160 extern int … … 164 162 165 163 int 166 mfs_inode_grow(struct mfs_node *mnode, unsigned size_grow);164 inode_grow(struct mfs_node *mnode, unsigned size_grow); 167 165 168 166 /*mfs_rw.c*/ -
uspace/srv/fs/minixfs/mfs_inode.c
r40f7297 rc922bc7 44 44 mfs2_write_inode_raw(struct mfs_node *mnode); 45 45 46 struct mfs_ino_info * 46 static struct mfs_ino_info * 47 mfs_read_inode_raw(const struct mfs_instance *instance, uint16_t inum); 48 49 static struct mfs_ino_info * 50 mfs2_read_inode_raw(const struct mfs_instance *instance, uint32_t inum); 51 52 53 int 54 get_inode(struct mfs_instance *inst, struct mfs_ino_info **ino_i, 55 fs_index_t index) 56 { 57 struct mfs_sb_info *sbi = inst->sbi; 58 59 if (sbi->fs_version == MFS_VERSION_V1) { 60 /*Read a MFS V1 inode*/ 61 *ino_i = mfs_read_inode_raw(inst, index); 62 } else { 63 /*Read a MFS V2/V3 inode*/ 64 *ino_i = mfs2_read_inode_raw(inst, index); 65 } 66 67 if (*ino_i == NULL) 68 return -1; 69 70 return EOK; 71 } 72 73 static struct mfs_ino_info * 47 74 mfs_read_inode_raw(const struct mfs_instance *instance, uint16_t inum) 48 75 { … … 100 127 } 101 128 102 st ruct mfs_ino_info *129 static struct mfs_ino_info * 103 130 mfs2_read_inode_raw(const struct mfs_instance *instance, uint32_t inum) 104 131 { … … 272 299 273 300 int 274 mfs_inode_grow(struct mfs_node *mnode, unsigned size_grow)301 inode_grow(struct mfs_node *mnode, unsigned size_grow) 275 302 { 276 303 unsigned i; -
uspace/srv/fs/minixfs/mfs_ops.c
r40f7297 rc922bc7 387 387 int rc; 388 388 389 const struct mfs_sb_info *sbi = inst->sbi;390 391 389 node = malloc(sizeof(fs_node_t)); 392 390 if (!node) { … … 405 403 struct mfs_ino_info *ino_i; 406 404 407 if (sbi->fs_version == MFS_VERSION_V1) { 408 /*Read MFS V1 inode*/ 409 ino_i = mfs_read_inode_raw(inst, index); 410 } else { 411 /*Read MFS V2/V3 inode*/ 412 ino_i = mfs2_read_inode_raw(inst, index); 413 } 414 415 if (!ino_i) 405 rc = get_inode(inst, &ino_i, index); 406 if (rc != EOK) 416 407 goto out_err; 417 408
Note:
See TracChangeset
for help on using the changeset viewer.