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


Ignore:
File:
1 edited

Legend:

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

    rc1694b6b rb7fd2a0  
    6767static const size_t block_size = 512;
    6868
    69 static int rd_open(bd_srvs_t *, bd_srv_t *);
    70 static int rd_close(bd_srv_t *);
    71 static int rd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *, size_t);
    72 static int rd_write_blocks(bd_srv_t *, aoff64_t, size_t, const void *, size_t);
    73 static int rd_get_block_size(bd_srv_t *, size_t *);
    74 static int rd_get_num_blocks(bd_srv_t *, aoff64_t *);
     69static errno_t rd_open(bd_srvs_t *, bd_srv_t *);
     70static errno_t rd_close(bd_srv_t *);
     71static errno_t rd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *, size_t);
     72static errno_t rd_write_blocks(bd_srv_t *, aoff64_t, size_t, const void *, size_t);
     73static errno_t rd_get_block_size(bd_srv_t *, size_t *);
     74static errno_t rd_get_num_blocks(bd_srv_t *, aoff64_t *);
    7575
    7676/** This rwlock protects the ramdisk's data.
     
    100100
    101101/** Open device. */
    102 static int rd_open(bd_srvs_t *bds, bd_srv_t *bd)
     102static errno_t rd_open(bd_srvs_t *bds, bd_srv_t *bd)
    103103{
    104104        return EOK;
     
    106106
    107107/** Close device. */
    108 static int rd_close(bd_srv_t *bd)
     108static errno_t rd_close(bd_srv_t *bd)
    109109{
    110110        return EOK;
     
    112112
    113113/** Read blocks from the device. */
    114 static int rd_read_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt, void *buf,
     114static errno_t 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 int rd_write_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt,
     130static errno_t 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         int ret = sysinfo_get_value("rd.size", &size);
     149        errno_t 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 int rd_get_block_size(bd_srv_t *bd, size_t *rsize)
     199static errno_t 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 int rd_get_num_blocks(bd_srv_t *bd, aoff64_t *rnb)
     206static errno_t 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.