Changeset 25696fea in mainline for uspace/srv/fs/mfs/mfs_dentry.c


Ignore:
Timestamp:
2011-10-15T20:05:00Z (13 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
22ceff3a
Parents:
1ccc32f (diff), 721d4b6e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge with mainline

File:
1 edited

Legend:

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

    r1ccc32f r25696fea  
    4444int
    4545mfs_read_dentry(struct mfs_node *mnode,
    46                      struct mfs_dentry_info *d_info, unsigned index)
     46    struct mfs_dentry_info *d_info, unsigned index)
    4747{
    4848        const struct mfs_instance *inst = mnode->instance;
     
    5757
    5858        if (block == 0) {
    59                 /*End of the dentries list*/
     59                /* End of the dentries list */
    6060                r = EOK;
    6161                goto out_err;
     
    7979        } else {
    8080                const int namelen = longnames ? MFS_L_MAX_NAME_LEN :
    81                                     MFS_MAX_NAME_LEN;
     81                    MFS_MAX_NAME_LEN;
    8282
    8383                struct mfs_dentry *d;
    8484
    8585                d = b->data + dentry_off * (longnames ? MFSL_DIRSIZE :
    86                                             MFS_DIRSIZE);
     86                    MFS_DIRSIZE);
    8787                d_info->d_inum = conv16(sbi->native, d->d_inum);
    8888                memcpy(d_info->d_name, d->d_name, namelen);
     
    101101/**Write a directory entry on disk.
    102102 *
    103  * @param d_info        Pointer to the directory entry structure to write on disk.
    104  *
    105  * @return              EOK on success or a negative error code.
     103 * @param d_info Pointer to the directory entry structure to write on disk.
     104 *
     105 * @return       EOK on success or a negative error code.
    106106 */
    107107int
     
    178178
    179179                if (name_len == d_name_len &&
    180                                 !bcmp(d_info.d_name, d_name, name_len)) {
     180                    !bcmp(d_info.d_name, d_name, name_len)) {
     181
    181182                        d_info.d_inum = 0;
    182183                        r = mfs_write_dentry(&d_info);
     
    197198 */
    198199int
    199 mfs_insert_dentry(struct mfs_node *mnode, const char *d_name, fs_index_t d_inum)
     200mfs_insert_dentry(struct mfs_node *mnode, const char *d_name,
     201    fs_index_t d_inum)
    200202{
    201203        int r;
     
    209211                return ENAMETOOLONG;
    210212
    211         /*Search for an empty dentry*/
     213        /* Search for an empty dentry */
    212214        unsigned i;
    213215        for (i = 0; i < mnode->ino_i->i_size / sbi->dirsize; ++i) {
     
    217219
    218220                if (d_info.d_inum == 0) {
    219                         /*This entry is not used*/
     221                        /* This entry is not used */
    220222                        empty_dentry_found = true;
    221223                        break;
     
    231233
    232234                if (b == 0) {
    233                         /*Increase the inode size*/
     235                        /* Increase the inode size */
    234236
    235237                        uint32_t dummy;
Note: See TracChangeset for help on using the changeset viewer.