Changeset 071ff5fa in mainline for uspace/srv/fs/exfat/exfat_fat.c


Ignore:
Timestamp:
2011-12-09T21:11:38Z (12 years ago)
Author:
Maurizio Lombardi <m.lombardi85@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c62751f
Parents:
2747dd85
Message:

exfat: exfat_alloc_clusters(), return the correct error code in case of error

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/exfat/exfat_fat.c

    r2747dd85 r071ff5fa  
    322322                            (found == 0) ?  EXFAT_CLST_EOF : lifo[found - 1]);
    323323                        if (rc != EOK)
    324                                 break;
     324                                goto exit_error;
    325325                        found++;
    326326                        rc = bitmap_set_cluster(bs, service_id, clst);
    327327                        if (rc != EOK)
    328                                 break;
     328                                goto exit_error;
    329329
    330330                }
     
    339339        }
    340340
     341        rc = ENOSPC;
     342
     343exit_error:
     344
    341345        /* If something wrong - free the clusters */
    342346        while (found--) {
     
    347351        free(lifo);
    348352        fibril_mutex_unlock(&exfat_alloc_lock);
    349         return ENOSPC;
     353        return rc;
    350354}
    351355
Note: See TracChangeset for help on using the changeset viewer.