Changeset 1433ecda in mainline for uspace/lib/block


Ignore:
Timestamp:
2018-04-04T15:42:37Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2c4e1cc
Parents:
47b2d7e3
Message:

Fix cstyle: make ccheck-fix and commit only files where all the changes are good.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/block/block.c

    r47b2d7e3 r1433ecda  
    225225        rc = read_blocks(devcon, 0, 1, bb_buf, devcon->pblock_size);
    226226        if (rc != EOK) {
    227                 free(bb_buf);
     227                free(bb_buf);
    228228                return rc;
    229229        }
     
    244244static size_t cache_key_hash(void *key)
    245245{
    246         aoff64_t *lba = (aoff64_t*)key;
     246        aoff64_t *lba = (aoff64_t *)key;
    247247        return *lba;
    248248}
     
    256256static bool cache_key_equal(void *key, const ht_link_t *item)
    257257{
    258         aoff64_t *lba = (aoff64_t*)key;
     258        aoff64_t *lba = (aoff64_t *)key;
    259259        block_t *b = hash_table_get_inst(item, block_t, hash_link);
    260260        return b->lba == *lba;
     
    417417        ht_link_t *hlink = hash_table_find(&cache->block_hash, &ba);
    418418        if (hlink) {
    419 found:
     419        found:
    420420                /*
    421421                 * We found the block in the cache.
     
    453453                         * Try to recycle a block from the free list.
    454454                         */
    455 recycle:
     455                recycle:
    456456                        if (list_empty(&cache->free_list)) {
    457457                                fibril_mutex_unlock(&cache->lock);
     
    491491                                        } else {
    492492                                                printf("Too many errors writing block %"
    493                                                     PRIuOFF64 "from device handle %" PRIun "\n"
     493                                                    PRIuOFF64 "from device handle %" PRIun "\n"
    494494                                                    "SEVERE DATA LOSS POSSIBLE\n",
    495                                                     b->lba, devcon->service_id);
     495                                                    b->lba, devcon->service_id);
    496496                                        }
    497497                                } else
     
    649649                                } else {
    650650                                        printf("Too many errors writing block %"
    651                                             PRIuOFF64 "from device handle %" PRIun "\n"
     651                                            PRIuOFF64 "from device handle %" PRIun "\n"
    652652                                            "SEVERE DATA LOSS POSSIBLE\n",
    653                                             block->lba, devcon->service_id);
     653                                            block->lba, devcon->service_id);
    654654                                }
    655655                        }
Note: See TracChangeset for help on using the changeset viewer.