Changes in / [3781092:5da7199] in mainline


Ignore:
Location:
uspace
Files:
10 deleted
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/mfs/mfs.h

    r3781092 r5da7199  
    159159
    160160extern int
    161 mfs_put_inode(struct mfs_node *mnode);
     161mfs_put_inode_core(struct mfs_node *mnode);
    162162
    163163extern int
  • uspace/srv/fs/mfs/mfs_dentry.c

    r3781092 r5da7199  
    7676                d_info->d_inum = conv32(sbi->native, d3->d_inum);
    7777                memcpy(d_info->d_name, d3->d_name, MFS3_MAX_NAME_LEN);
    78                 d_info->d_name[MFS3_MAX_NAME_LEN] = 0;
    7978        } else {
    8079                const int namelen = longnames ? MFS_L_MAX_NAME_LEN :
     
    8786                d_info->d_inum = conv16(sbi->native, d->d_inum);
    8887                memcpy(d_info->d_name, d->d_name, namelen);
    89                 d_info->d_name[namelen] = 0;
    9088        }
    9189
     
    251249        d_info.d_inum = d_inum;
    252250        memcpy(d_info.d_name, d_name, name_len);
    253         if (name_len < sbi->max_name_len)
    254                 d_info.d_name[name_len] = 0;
     251        d_info.d_name[name_len] = 0;
    255252
    256253        r = mfs_write_dentry(&d_info);
  • uspace/srv/fs/mfs/mfs_inode.c

    r3781092 r5da7199  
    4848                struct mfs_ino_info **ino_ptr, uint32_t inum);
    4949
    50 /**Read a MINIX inode from disk
    51  *
    52  * @param inst          Pointer to the filesystem instance.
    53  * @param ino_i         Pointer to the generic MINIX inode
    54  *                      where the inode content will be stored.
    55  * @param index         index of the inode to read.
    56  *
    57  * @return              EOK on success or a negative error code.
    58  */
     50
    5951int
    6052mfs_get_inode(struct mfs_instance *inst, struct mfs_ino_info **ino_i,
     
    193185}
    194186
    195 /**Write a MINIX inode on disk (if marked as dirty)
    196  *
    197  * @param mnode         Pointer to the generic MINIX inode in memory.
    198  *
    199  * @return              EOK on success or a negative error code.
    200  */
    201187int
    202 mfs_put_inode(struct mfs_node *mnode)
     188mfs_put_inode_core(struct mfs_node *mnode)
    203189{
    204190        int rc = EOK;
     
    313299}
    314300
    315 /**Reduce the inode size of a given number of bytes
    316  *
    317  * @param mnode         Pointer to the generic MINIX inode in memory.
    318  * @param size_shrink   Number of bytes that will be subtracted to the inode.
    319  *
    320  * @return              EOK on success or a negative error code.
    321  */
    322301int
    323302mfs_inode_shrink(struct mfs_node *mnode, size_t size_shrink)
  • uspace/srv/fs/mfs/mfs_ops.c

    r3781092 r5da7199  
    513513                assert(mnode->instance->open_nodes_cnt > 0);
    514514                mnode->instance->open_nodes_cnt--;
    515                 rc = mfs_put_inode(mnode);
     515                rc = mfs_put_inode_core(mnode);
    516516                free(mnode->ino_i);
    517517                free(mnode);
  • uspace/srv/fs/mfs/mfs_rw.c

    r3781092 r5da7199  
    5353 *bytes, this function returns the on-disk block
    5454 *relative to that position.
    55  *
    56  * @param b     Pointer to a 32bit number where the block number will be stored
    57  * @param mnode Pointer to a generic MINIX inode in memory.
    58  * @param pos   Position in file.
    59  *
    60  * @return      EOK on success or a negative error code.
     55 *Returns zero if the block does not exist.
    6156 */
    6257int
     
    232227}
    233228
    234 /**Free unused indirect zones from a MINIX inode according to it's new size.
    235  *
    236  * @param mnode         Pointer to a generic MINIX inode in memory.
    237  * @param new_size      The new size of the inode.
    238  *
    239  * @return              EOK on success or a negative error code.
    240  */
     229/*Free unused indirect zones*/
    241230int
    242231mfs_prune_ind_zones(struct mfs_node *mnode, size_t new_size)
     
    250239        mfs_version_t fs_version = sbi->fs_version;
    251240       
    252         assert(new_size <= ino_i->i_size);
    253 
    254241        if (fs_version == MFS_VERSION_V1) {
    255242                nr_direct = V1_NR_DIRECT_ZONES;
Note: See TracChangeset for help on using the changeset viewer.