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


Ignore:
Timestamp:
2011-04-16T11:47:52Z (13 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6fc5262
Parents:
afd9c3b
Message:

read_directory_entry() should return an error code, not a poniter to the directory structure

File:
1 edited

Legend:

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

    rafd9c3b r488f7ed  
    336336        struct mfs_ino_info *ino_i = mnode->ino_i;
    337337        struct mfs_dentry_info *d_info;
     338        int r;
    338339
    339340        mfsdebug("mfs_match()\n");
     
    347348        int i = 2;
    348349        while (1) {
    349                 d_info = read_directory_entry(mnode, i++);
     350                r = read_directory_entry(mnode, &d_info, i++);
     351                if (r != EOK)
     352                        return r;
     353
    350354                if (!d_info) {
    351355                        /*Reached the end of the directory entry list*/
     
    535539{
    536540        struct mfs_node *mnode = fsnode->data;
     541        int r;
    537542
    538543        *has_children = false;
     
    546551        int i = 2;
    547552        while (1) {
    548                 d_info = read_directory_entry(mnode, i++);
     553                r = read_directory_entry(mnode, &d_info, i++);
     554                if (r != EOK)
     555                        return r;
    549556
    550557                if (!d_info) {
     
    612619
    613620                while (1) {
    614                         d_info = read_directory_entry(mnode, pos);
     621                        rc = read_directory_entry(mnode, &d_info, pos);
     622                        if (rc != EOK)
     623                                goto out_error;
     624
    615625                        if (!d_info) {
    616626                                /*Reached the end of the dentries list*/
Note: See TracChangeset for help on using the changeset viewer.