Changeset 743ce51 in mainline for uspace/app/bithenge/block.c


Ignore:
Timestamp:
2012-05-25T03:49:21Z (13 years ago)
Author:
Sean Bartell <wingedtachikoma@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1923501
Parents:
a54bd98
Message:

Bithenge: various fixes and style.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/bithenge/block.c

    ra54bd98 r743ce51  
    3636 */
    3737
     38#include <assert.h>
    3839#include <errno.h>
    3940#include <libblock.h>
     
    5051} block_blob_t;
    5152
    52 static int block_size(bithenge_blob_t *base, aoff64_t *size) {
     53static int block_size(bithenge_blob_t *base, aoff64_t *size)
     54{
    5355        block_blob_t *blob = (block_blob_t *)base;
    5456        *size = blob->size;
     
    5658}
    5759
    58 static int block_read(bithenge_blob_t *base, aoff64_t offset, char *buffer, aoff64_t *size) {
     60static int block_read(bithenge_blob_t *base, aoff64_t offset, char *buffer,
     61    aoff64_t *size)
     62{
    5963        block_blob_t *blob = (block_blob_t *)base;
    6064        if (offset > blob->size)
     
    6468}
    6569
    66 static int block_destroy(bithenge_blob_t *base) {
     70static int block_destroy(bithenge_blob_t *base)
     71{
    6772        block_blob_t *blob = (block_blob_t *)base;
    6873        block_fini(blob->service_id);
     
    8287 * @param service_id The service ID of the block device.
    8388 * @return EOK on success or an error code from errno.h. */
    84 int bithenge_new_block_blob(bithenge_blob_t **out, service_id_t service_id) {
     89int bithenge_new_block_blob(bithenge_blob_t **out, service_id_t service_id)
     90{
     91        assert(out);
     92
    8593        // Initialize libblock
    8694        int rc;
     
    104112        block_blob_t *blob = malloc(sizeof(*blob));
    105113        if (!blob)
    106                 return errno;
     114                return ENOMEM;
    107115        rc = bithenge_new_random_access_blob(&blob->base, &block_ops);
    108116        if (rc != EOK) {
Note: See TracChangeset for help on using the changeset viewer.