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


Ignore:
Timestamp:
2011-08-26T23:36:00Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0be611b
Parents:
4bf6895
Message:

Cleanup.

File:
1 edited

Legend:

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

    r4bf6895 r7ece4247  
    315315                nodep->firstc = uint16_t_le2host(d->firstc_lo) |
    316316                    (uint16_t_le2host(d->firstc_hi) << 16);
    317         }
    318         else
     317        } else
    319318                nodep->firstc = uint16_t_le2host(d->firstc);
    320319
     
    333332                 */
    334333                uint32_t clusters;
    335                 rc = fat_clusters_get(&clusters, bs, idxp->service_id, nodep->firstc);
     334                rc = fat_clusters_get(&clusters, bs, idxp->service_id,
     335                    nodep->firstc);
    336336                if (rc != EOK) {
    337337                        (void) block_put(b);
     
    392392                        /* hit */
    393393                        fat_node_t *nodep;
    394                         aoff64_t o = di.pos % (BPS(di.bs) / sizeof(fat_dentry_t));
     394                        aoff64_t o = di.pos %
     395                            (BPS(di.bs) / sizeof(fat_dentry_t));
    395396                        fat_idx_t *idx = fat_idx_get_by_pos(service_id,
    396                                 parentp->firstc, di.bnum * DPS(di.bs) + o);
     397                            parentp->firstc, di.bnum * DPS(di.bs) + o);
    397398                        if (!idx) {
    398399                                /*
     
    615616
    616617        rc = fat_directory_write(&di, name, &de);
    617         if (rc!=EOK)
     618        if (rc != EOK)
    618619                return rc;
    619620        rc = fat_directory_close(&di);
    620         if (rc!=EOK)
     621        if (rc != EOK)
    621622                return rc;
    622623
     
    713714       
    714715        fat_directory_t di;
    715         rc = fat_directory_open(parentp,&di);
     716        rc = fat_directory_open(parentp, &di);
    716717        if (rc != EOK)
    717718                goto error;
     
    10891090                fat_directory_t di;
    10901091                rc = fat_directory_open(nodep, &di);
    1091                 if (rc != EOK) goto err;
     1092                if (rc != EOK)
     1093                        goto err;
    10921094                rc = fat_directory_seek(&di, pos);
    10931095                if (rc != EOK) {
     
    10971099
    10981100                rc = fat_directory_read(&di, name, &d);
    1099                 if (rc == EOK) goto hit;
    1100                 if (rc == ENOENT) goto miss;
     1101                if (rc == EOK)
     1102                        goto hit;
     1103                if (rc == ENOENT)
     1104                        goto miss;
    11011105
    11021106err:
     
    11071111miss:
    11081112                rc = fat_directory_close(&di);
    1109                 if (rc!=EOK)
     1113                if (rc != EOK)
    11101114                        goto err;
    11111115                rc = fat_node_put(fn);
     
    11171121                pos = di.pos;
    11181122                rc = fat_directory_close(&di);
    1119                 if (rc!=EOK)
     1123                if (rc != EOK)
    11201124                        goto err;
    1121                 (void) async_data_read_finalize(callid, name, str_size(name) + 1);
    1122                 bytes = (pos - spos)+1;
     1125                (void) async_data_read_finalize(callid, name,
     1126                    str_size(name) + 1);
     1127                bytes = (pos - spos) + 1;
    11231128        }
    11241129
Note: See TracChangeset for help on using the changeset viewer.