Ignore:
File:
1 edited

Legend:

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

    rb7fd2a0 rcde999a  
    7373 * @return              EOK on success or an error code.
    7474 */
    75 errno_t
     75int
    7676fat_cluster_walk(fat_bs_t *bs, service_id_t service_id, fat_cluster_t firstc,
    7777    fat_cluster_t *lastc, uint32_t *numc, uint32_t max_clusters)
     
    8080        fat_cluster_t clst = firstc, clst_last1 = FAT_CLST_LAST1(bs);
    8181        fat_cluster_t clst_bad = FAT_CLST_BAD(bs);
    82         errno_t rc;
     82        int rc;
    8383
    8484        if (firstc == FAT_CLST_RES0) {
     
    123123 * @return              EOK on success or an error code.
    124124 */
    125 errno_t
     125int
    126126fat_block_get(block_t **block, struct fat_bs *bs, fat_node_t *nodep,
    127127    aoff64_t bn, int flags)
     
    130130        fat_cluster_t currc = 0;
    131131        aoff64_t relbn = bn;
    132         errno_t rc;
     132        int rc;
    133133
    134134        if (!nodep->size)
     
    188188 * @return              EOK on success or an error code.
    189189 */
    190 errno_t
     190int
    191191_fat_block_get(block_t **block, fat_bs_t *bs, service_id_t service_id,
    192192    fat_cluster_t fcl, fat_cluster_t *clp, aoff64_t bn, int flags)
     
    195195        uint32_t max_clusters;
    196196        fat_cluster_t c = 0;
    197         errno_t rc;
     197        int rc;
    198198
    199199        /*
     
    237237 * @return              EOK on success or an error code.
    238238 */
    239 errno_t
     239int
    240240fat_fill_gap(fat_bs_t *bs, fat_node_t *nodep, fat_cluster_t mcl, aoff64_t pos)
    241241{
    242242        block_t *b;
    243243        aoff64_t o, boundary;
    244         errno_t rc;
     244        int rc;
    245245
    246246        boundary = ROUND_UP(nodep->size, BPS(bs) * SPC(bs));
     
    289289 * @return              EOK or an error code.
    290290 */
    291 static errno_t
     291static int
    292292fat_get_cluster_fat12(fat_bs_t *bs, service_id_t service_id, unsigned fatno,
    293293    fat_cluster_t clst, fat_cluster_t *value)
     
    296296        uint16_t byte1, byte2;
    297297        aoff64_t offset;
    298         errno_t rc;
     298        int rc;
    299299
    300300        offset = (clst + clst / 2);
     
    359359 * @return              EOK or an error code.
    360360 */
    361 static errno_t
     361static int
    362362fat_get_cluster_fat16(fat_bs_t *bs, service_id_t service_id, unsigned fatno,
    363363    fat_cluster_t clst, fat_cluster_t *value)
     
    365365        block_t *b;
    366366        aoff64_t offset;
    367         errno_t rc;
     367        int rc;
    368368
    369369        offset = (clst * FAT16_CLST_SIZE);
     
    390390 * @return              EOK or an error code.
    391391 */
    392 static errno_t
     392static int
    393393fat_get_cluster_fat32(fat_bs_t *bs, service_id_t service_id, unsigned fatno,
    394394    fat_cluster_t clst, fat_cluster_t *value)
     
    396396        block_t *b;
    397397        aoff64_t offset;
    398         errno_t rc;
     398        int rc;
    399399
    400400        offset = (clst * FAT32_CLST_SIZE);
     
    423423 * @return              EOK or an error code.
    424424 */
    425 errno_t
     425int
    426426fat_get_cluster(fat_bs_t *bs, service_id_t service_id, unsigned fatno,
    427427    fat_cluster_t clst, fat_cluster_t *value)
    428428{
    429         errno_t rc;
     429        int rc;
    430430
    431431        assert(fatno < FATCNT(bs));
     
    451451 * @return              EOK on success or an error code.
    452452 */
    453 static errno_t
     453static int
    454454fat_set_cluster_fat12(fat_bs_t *bs, service_id_t service_id, unsigned fatno,
    455455    fat_cluster_t clst, fat_cluster_t value)
     
    458458        aoff64_t offset;
    459459        uint16_t byte1, byte2;
    460         errno_t rc;
     460        int rc;
    461461
    462462        offset = (clst + clst / 2);
     
    539539 * @return              EOK on success or an error code.
    540540 */
    541 static errno_t
     541static int
    542542fat_set_cluster_fat16(fat_bs_t *bs, service_id_t service_id, unsigned fatno,
    543543    fat_cluster_t clst, fat_cluster_t value)
     
    545545        block_t *b;
    546546        aoff64_t offset;
    547         errno_t rc;
     547        int rc;
    548548
    549549        offset = (clst * FAT16_CLST_SIZE);
     
    572572 * @return              EOK on success or an error code.
    573573 */
    574 static errno_t
     574static int
    575575fat_set_cluster_fat32(fat_bs_t *bs, service_id_t service_id, unsigned fatno,
    576576    fat_cluster_t clst, fat_cluster_t value)
     
    578578        block_t *b;
    579579        aoff64_t offset;
    580         errno_t rc;
     580        int rc;
    581581        fat_cluster_t temp;
    582582
     
    609609 * @return              EOK on success or an error code.
    610610 */
    611 errno_t
     611int
    612612fat_set_cluster(fat_bs_t *bs, service_id_t service_id, unsigned fatno,
    613613    fat_cluster_t clst, fat_cluster_t value)
    614614{
    615         errno_t rc;
     615        int rc;
    616616
    617617        assert(fatno < FATCNT(bs));
     
    636636 * @return              EOK on success or an error code.
    637637 */
    638 errno_t fat_alloc_shadow_clusters(fat_bs_t *bs, service_id_t service_id,
     638int fat_alloc_shadow_clusters(fat_bs_t *bs, service_id_t service_id,
    639639    fat_cluster_t *lifo, unsigned nclsts)
    640640{
     
    642642        unsigned c;
    643643        fat_cluster_t clst_last1 = FAT_CLST_LAST1(bs);
    644         errno_t rc;
     644        int rc;
    645645
    646646        for (fatno = FAT1 + 1; fatno < FATCNT(bs); fatno++) {
     
    673673 * @return              EOK on success, an error code otherwise.
    674674 */
    675 errno_t
     675int
    676676fat_alloc_clusters(fat_bs_t *bs, service_id_t service_id, unsigned nclsts,
    677677    fat_cluster_t *mcl, fat_cluster_t *lcl)
     
    682682        fat_cluster_t value = 0;
    683683        fat_cluster_t clst_last1 = FAT_CLST_LAST1(bs);
    684         errno_t rc = EOK;
     684        int rc = EOK;
    685685
    686686        lifo = (fat_cluster_t *) malloc(nclsts * sizeof(fat_cluster_t));
     
    744744 * @return              EOK on success or an error code.
    745745 */
    746 errno_t
     746int
    747747fat_free_clusters(fat_bs_t *bs, service_id_t service_id, fat_cluster_t firstc)
    748748{
     
    750750        fat_cluster_t nextc = 0;
    751751        fat_cluster_t clst_bad = FAT_CLST_BAD(bs);
    752         errno_t rc;
     752        int rc;
    753753
    754754        /* Mark all clusters in the chain as free in all copies of FAT. */
     
    782782 * @return              EOK on success or an error code.
    783783 */
    784 errno_t fat_append_clusters(fat_bs_t *bs, fat_node_t *nodep, fat_cluster_t mcl,
     784int fat_append_clusters(fat_bs_t *bs, fat_node_t *nodep, fat_cluster_t mcl,
    785785    fat_cluster_t lcl)
    786786{
     
    788788        fat_cluster_t lastc = 0;
    789789        uint8_t fatno;
    790         errno_t rc;
     790        int rc;
    791791
    792792        if (nodep->firstc == FAT_CLST_RES0) {
     
    829829 * @return              EOK on success or an error code.
    830830 */
    831 errno_t fat_chop_clusters(fat_bs_t *bs, fat_node_t *nodep, fat_cluster_t lcl)
     831int fat_chop_clusters(fat_bs_t *bs, fat_node_t *nodep, fat_cluster_t lcl)
    832832{
    833833        fat_cluster_t clst_last1 = FAT_CLST_LAST1(bs);
    834         errno_t rc;
     834        int rc;
    835835        service_id_t service_id = nodep->idx->service_id;
    836836
     
    880880}
    881881
    882 errno_t
     882int
    883883fat_zero_cluster(struct fat_bs *bs, service_id_t service_id, fat_cluster_t c)
    884884{
    885885        int i;
    886886        block_t *b;
    887         errno_t rc;
     887        int rc;
    888888
    889889        for (i = 0; i < SPC(bs); i++) {
     
    908908 * does not contain a fat file system.
    909909 */
    910 errno_t fat_sanity_check(fat_bs_t *bs, service_id_t service_id)
     910int fat_sanity_check(fat_bs_t *bs, service_id_t service_id)
    911911{
    912912        fat_cluster_t e0 = 0;
    913913        fat_cluster_t e1 = 0;
    914914        unsigned fat_no;
    915         errno_t rc;
     915        int rc;
    916916
    917917        /* Check number of FATs. */
Note: See TracChangeset for help on using the changeset viewer.