Changes in uspace/srv/bd/rd/rd.c [b7fd2a0:c1694b6b] in mainline


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/rd/rd.c

    rb7fd2a0 rc1694b6b  
    6767static const size_t block_size = 512;
    6868
    69 static errno_t rd_open(bd_srvs_t *, bd_srv_t *);
    70 static errno_t rd_close(bd_srv_t *);
    71 static errno_t rd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *, size_t);
    72 static errno_t rd_write_blocks(bd_srv_t *, aoff64_t, size_t, const void *, size_t);
    73 static errno_t rd_get_block_size(bd_srv_t *, size_t *);
    74 static errno_t rd_get_num_blocks(bd_srv_t *, aoff64_t *);
     69static int rd_open(bd_srvs_t *, bd_srv_t *);
     70static int rd_close(bd_srv_t *);
     71static int rd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *, size_t);
     72static int rd_write_blocks(bd_srv_t *, aoff64_t, size_t, const void *, size_t);
     73static int rd_get_block_size(bd_srv_t *, size_t *);
     74static int rd_get_num_blocks(bd_srv_t *, aoff64_t *);
    7575
    7676/** This rwlock protects the ramdisk's data.
     
    100100
    101101/** Open device. */
    102 static errno_t rd_open(bd_srvs_t *bds, bd_srv_t *bd)
     102static int rd_open(bd_srvs_t *bds, bd_srv_t *bd)
    103103{
    104104        return EOK;
     
    106106
    107107/** Close device. */
    108 static errno_t rd_close(bd_srv_t *bd)
     108static int rd_close(bd_srv_t *bd)
    109109{
    110110        return EOK;
     
    112112
    113113/** Read blocks from the device. */
    114 static errno_t rd_read_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt, void *buf,
     114static int rd_read_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt, void *buf,
    115115    size_t size)
    116116{
     
    128128
    129129/** Write blocks to the device. */
    130 static errno_t rd_write_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt,
     130static int rd_write_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt,
    131131    const void *buf, size_t size)
    132132{
     
    147147{
    148148        sysarg_t size;
    149         errno_t ret = sysinfo_get_value("rd.size", &size);
     149        int ret = sysinfo_get_value("rd.size", &size);
    150150        if ((ret != EOK) || (size == 0)) {
    151151                printf("%s: No RAM disk found\n", NAME);
     
    197197
    198198/** Get device block size. */
    199 static errno_t rd_get_block_size(bd_srv_t *bd, size_t *rsize)
     199static int rd_get_block_size(bd_srv_t *bd, size_t *rsize)
    200200{
    201201        *rsize = block_size;
     
    204204
    205205/** Get number of blocks on device. */
    206 static errno_t rd_get_num_blocks(bd_srv_t *bd, aoff64_t *rnb)
     206static int rd_get_num_blocks(bd_srv_t *bd, aoff64_t *rnb)
    207207{
    208208        *rnb = rd_size / block_size;
Note: See TracChangeset for help on using the changeset viewer.