Changeset 6d4d883 in mainline for uspace/srv/fs/mfs/mfs_inode.c


Ignore:
Timestamp:
2011-10-14T19:39:02Z (13 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2ac7af3
Parents:
9269c88
Message:

cstyle

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/mfs/mfs_inode.c

    r9269c88 r6d4d883  
    4242static int
    4343mfs_read_inode_raw(const struct mfs_instance *instance,
    44                 struct mfs_ino_info **ino_ptr, uint16_t inum);
     44    struct mfs_ino_info **ino_ptr, uint16_t inum);
    4545
    4646static int
    4747mfs2_read_inode_raw(const struct mfs_instance *instance,
    48                 struct mfs_ino_info **ino_ptr, uint32_t inum);
     48    struct mfs_ino_info **ino_ptr, uint32_t inum);
    4949
    5050/**Read a MINIX inode from disk
     
    5959int
    6060mfs_get_inode(struct mfs_instance *inst, struct mfs_ino_info **ino_i,
    61           fs_index_t index)
     61    fs_index_t index)
    6262{
    6363        struct mfs_sb_info *sbi = inst->sbi;
     
    6565
    6666        if (sbi->fs_version == MFS_VERSION_V1) {
    67                 /*Read a MFS V1 inode*/
     67                /* Read a MFS V1 inode */
    6868                r = mfs_read_inode_raw(inst, ino_i, index);
    6969        } else {
    70                 /*Read a MFS V2/V3 inode*/
     70                /* Read a MFS V2/V3 inode */
    7171                r = mfs2_read_inode_raw(inst, ino_i, index);
    7272        }
     
    7777static int
    7878mfs_read_inode_raw(const struct mfs_instance *instance,
    79                 struct mfs_ino_info **ino_ptr, uint16_t inum) {
     79    struct mfs_ino_info **ino_ptr, uint16_t inum)
     80{
    8081        struct mfs_inode *ino;
    8182        struct mfs_ino_info *ino_i = NULL;
     
    8687        sbi = instance->sbi;
    8788
    88         /*inode 0 does not exist*/
     89        /* inode 0 does not exist */
    8990        inum -= 1;
    9091
     
    101102
    102103        r = block_get(&b, instance->service_id,
    103                       itable_off + inum / sbi->ino_per_block,
    104                       BLOCK_FLAGS_NONE);
     104            itable_off + inum / sbi->ino_per_block,
     105            BLOCK_FLAGS_NONE);
     106
    105107        if (r != EOK)
    106108                goto out_err;
     
    134136static int
    135137mfs2_read_inode_raw(const struct mfs_instance *instance,
    136                 struct mfs_ino_info **ino_ptr, uint32_t inum) {
     138    struct mfs_ino_info **ino_ptr, uint32_t inum)
     139{
    137140        struct mfs2_inode *ino;
    138141        struct mfs_ino_info *ino_i = NULL;
     
    150153        sbi = instance->sbi;
    151154
    152         /*inode 0 does not exist*/
     155        /* inode 0 does not exist */
    153156        inum -= 1;
    154157
     
    157160
    158161        r = block_get(&b, instance->service_id,
    159                       itable_off + inum / sbi->ino_per_block,
    160                       BLOCK_FLAGS_NONE);
     162            itable_off + inum / sbi->ino_per_block,
     163            BLOCK_FLAGS_NONE);
     164
    161165        if (r != EOK)
    162166                goto out_err;
     
    322326
    323327        if (size_shrink == 0) {
    324                 /*Nothing to be done*/
     328                /* Nothing to be done */
    325329                return EOK;
    326330        }
     
    333337        ino_i->dirty = true;
    334338
    335         /*Compute the number of zones to free*/
     339        /* Compute the number of zones to free */
    336340        unsigned zones_to_free;
    337341
     
    354358
    355359                if (old_zone == 0)
    356                         continue; /*Sparse block*/
     360                        continue; /* Sparse block */
    357361
    358362                r = mfs_free_zone(mnode->instance, old_zone);
Note: See TracChangeset for help on using the changeset viewer.