Changeset ff0c270 in mainline for uspace/srv/fs/exfat/exfat_bitmap.c


Ignore:
Timestamp:
2011-08-25T22:15:33Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0dbe5ac
Parents:
abb7491c
Message:

Cstyle.

File:
1 edited

Legend:

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

    rabb7491c rff0c270  
    5353{
    5454        fs_node_t *fn;
    55         block_t *b=NULL;
     55        block_t *b = NULL;
    5656        exfat_node_t *bitmapp;
    5757        uint8_t *bitmap;
     
    9494{
    9595        fs_node_t *fn;
    96         block_t *b=NULL;
     96        block_t *b = NULL;
    9797        exfat_node_t *bitmapp;
    9898        uint8_t *bitmap;
     
    129129{
    130130        fs_node_t *fn;
    131         block_t *b=NULL;
     131        block_t *b = NULL;
    132132        exfat_node_t *bitmapp;
    133133        uint8_t *bitmap;
     
    142142       
    143143        aoff64_t offset = clst / 8;
    144         rc = exfat_block_get(&b, bs, bitmapp, offset / BPS(bs), BLOCK_FLAGS_NONE);
     144        rc = exfat_block_get(&b, bs, bitmapp, offset / BPS(bs),
     145            BLOCK_FLAGS_NONE);
    145146        if (rc != EOK) {
    146147                (void) exfat_node_put(fn);
     
    167168        clst = firstc;
    168169
    169         while (clst < firstc+count ) {
     170        while (clst < firstc + count ) {
    170171                rc = bitmap_set_cluster(bs, service_id, clst);
    171172                if (rc != EOK) {
    172                         if ((clst-firstc) > 0)
    173                                 (void) bitmap_clear_clusters(bs, service_id, firstc, clst-firstc);
     173                        if (clst - firstc > 0)
     174                                (void) bitmap_clear_clusters(bs, service_id,
     175                                    firstc, clst - firstc);
    174176                        return rc;
    175177                }
     
    186188        clst = firstc;
    187189
    188         while (clst < firstc+count ) {
     190        while (clst < firstc + count) {
    189191                rc = bitmap_clear_cluster(bs, service_id, clst);
    190192                if (rc != EOK)
     
    201203        startc = EXFAT_CLST_FIRST;
    202204
    203         while (startc < DATA_CNT(bs)+2) {
     205        while (startc < DATA_CNT(bs) + 2) {
    204206                endc = startc;
    205207                while (bitmap_is_free(bs, service_id, endc) == EOK) {
    206                         if ((endc - startc)+1 == count){
     208                        if ((endc - startc) + 1 == count) {
    207209                                *firstc = startc;
    208210                                return bitmap_set_clusters(bs, service_id, startc, count);
    209                         }
    210                         else
     211                        } else
    211212                                endc++;
    212213                }
     
    227228                lastc = nodep->firstc + ROUND_UP(nodep->size, BPC(bs)) / BPC(bs) - 1;
    228229
    229                 clst = lastc+1;
     230                clst = lastc + 1;
    230231                while (bitmap_is_free(bs, nodep->idx->service_id, clst) == EOK) {
    231                         if ((clst - lastc) == count){
     232                        if (clst - lastc == count){
    232233                                return bitmap_set_clusters(bs, nodep->idx->service_id,
    233                                     lastc+1, count);
    234                         }
    235                         else
     234                                    lastc + 1, count);
     235                        } else
    236236                                clst++;
    237237                }
     
    248248        lastc -= count;
    249249
    250         return bitmap_clear_clusters(bs, nodep->idx->service_id, lastc+1, count);
     250        return bitmap_clear_clusters(bs, nodep->idx->service_id, lastc + 1, count);
    251251}
    252252
     
    260260
    261261        for (clst = nodep->firstc; clst < lastc; clst++) {
    262                 rc = exfat_set_cluster(bs, service_id, clst, clst+1);
     262                rc = exfat_set_cluster(bs, service_id, clst, clst + 1);
    263263                if (rc != EOK)
    264264                        return rc;
Note: See TracChangeset for help on using the changeset viewer.