Changeset e402382 in mainline for uspace/srv/fs/fat/fat_ops.c


Ignore:
Timestamp:
2009-09-03T13:24:36Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
dc87ad11
Parents:
684b655
Message:

Make fat_cluster_walk() return an error code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/fat/fat_ops.c

    r684b655 re402382  
    220220                 * size of the directory by walking the FAT.
    221221                 */
    222                 nodep->size = bps * spc * fat_clusters_get(bs, idxp->dev_handle,
     222                uint16_t clusters;
     223                rc = fat_clusters_get(&clusters, bs, idxp->dev_handle,
    223224                    uint16_t_le2host(d->firstc));
     225                assert(rc == EOK);
     226                nodep->size = bps * spc * clusters;
    224227        } else {
    225228                nodep->type = FAT_FILE;
     
    11891192                } else {
    11901193                        fat_cluster_t lastc;
    1191                         (void) fat_cluster_walk(bs, dev_handle, nodep->firstc,
    1192                             &lastc, (size - 1) / bpc);
     1194                        rc = fat_cluster_walk(bs, dev_handle, nodep->firstc,
     1195                            &lastc, NULL, (size - 1) / bpc);
     1196                        if (rc != EOK)
     1197                                goto out;
    11931198                        fat_chop_clusters(bs, nodep, lastc);
    11941199                }
     
    11971202                rc = EOK;       
    11981203        }
     1204out:
    11991205        fat_node_put(fn);
    12001206        ipc_answer_0(rid, rc);
Note: See TracChangeset for help on using the changeset viewer.