Changeset c922bc7 in mainline for uspace/srv/fs/minixfs/mfs_ops.c


Ignore:
Timestamp:
2011-04-06T18:32:00Z (14 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8ab1adff
Parents:
40f7297
Message:

Add function get_inode(), it is used to obtain a generic minix inode without
messing around with these ugly "if (fsversion == x) .. else if (fsversion == y)…"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/minixfs/mfs_ops.c

    r40f7297 rc922bc7  
    387387        int rc;
    388388
    389         const struct mfs_sb_info *sbi = inst->sbi;
    390 
    391389        node = malloc(sizeof(fs_node_t));
    392390        if (!node) {
     
    405403        struct mfs_ino_info *ino_i;
    406404
    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)
    416407                goto out_err;
    417408
Note: See TracChangeset for help on using the changeset viewer.