Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/block/ddisk/ddisk.c

    rb7fd2a0 rcde999a  
    5656#define DDISK_CMD_IRQ_DEASSERT  0x4
    5757
    58 static errno_t ddisk_dev_add(ddf_dev_t *);
    59 static errno_t ddisk_dev_remove(ddf_dev_t *);
    60 static errno_t ddisk_dev_gone(ddf_dev_t *);
    61 static errno_t ddisk_fun_online(ddf_fun_t *);
    62 static errno_t ddisk_fun_offline(ddf_fun_t *);
     58static int ddisk_dev_add(ddf_dev_t *);
     59static int ddisk_dev_remove(ddf_dev_t *);
     60static int ddisk_dev_gone(ddf_dev_t *);
     61static int ddisk_fun_online(ddf_fun_t *);
     62static int ddisk_fun_offline(ddf_fun_t *);
    6363
    6464static void ddisk_bd_connection(ipc_callid_t, ipc_call_t *, void *);
     
    117117} ddisk_t;
    118118
    119 static errno_t ddisk_bd_open(bd_srvs_t *, bd_srv_t *);
    120 static errno_t ddisk_bd_close(bd_srv_t *);
    121 static errno_t ddisk_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *, size_t);
    122 static errno_t ddisk_bd_write_blocks(bd_srv_t *, aoff64_t, size_t, const void *,
     119static int ddisk_bd_open(bd_srvs_t *, bd_srv_t *);
     120static int ddisk_bd_close(bd_srv_t *);
     121static int ddisk_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *, size_t);
     122static int ddisk_bd_write_blocks(bd_srv_t *, aoff64_t, size_t, const void *,
    123123    size_t);
    124 static errno_t ddisk_bd_get_block_size(bd_srv_t *, size_t *);
    125 static errno_t ddisk_bd_get_num_blocks(bd_srv_t *, aoff64_t *);
     124static int ddisk_bd_get_block_size(bd_srv_t *, size_t *);
     125static int ddisk_bd_get_num_blocks(bd_srv_t *, aoff64_t *);
    126126
    127127bd_ops_t ddisk_bd_ops = {
     
    188188}
    189189
    190 errno_t ddisk_bd_open(bd_srvs_t *bds, bd_srv_t *bd)
    191 {
    192         return EOK;
    193 }
    194 
    195 errno_t ddisk_bd_close(bd_srv_t *bd)
     190int ddisk_bd_open(bd_srvs_t *bds, bd_srv_t *bd)
     191{
     192        return EOK;
     193}
     194
     195int ddisk_bd_close(bd_srv_t *bd)
    196196{
    197197        return EOK;
     
    199199
    200200static
    201 errno_t ddisk_rw_block(ddisk_t *ddisk, bool read, aoff64_t ba, void *buf)
     201int ddisk_rw_block(ddisk_t *ddisk, bool read, aoff64_t ba, void *buf)
    202202{
    203203        fibril_mutex_lock(&ddisk->lock);
     
    236236
    237237static
    238 errno_t ddisk_bd_rw_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt, void *buf,
     238int ddisk_bd_rw_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt, void *buf,
    239239    size_t size, bool is_read)
    240240{
    241241        ddisk_t *ddisk = (ddisk_t *) bd->srvs->sarg;
    242242        aoff64_t i;
    243         errno_t rc;
     243        int rc;
    244244
    245245        if (size < cnt * DDISK_BLOCK_SIZE)
     
    256256}
    257257
    258 errno_t ddisk_bd_read_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt, void *buf,
     258int ddisk_bd_read_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt, void *buf,
    259259    size_t size)
    260260{
     
    262262}
    263263
    264 errno_t ddisk_bd_write_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt,
     264int ddisk_bd_write_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt,
    265265    const void *buf, size_t size)
    266266{
     
    268268}
    269269
    270 errno_t ddisk_bd_get_block_size(bd_srv_t *bd, size_t *rsize)
     270int ddisk_bd_get_block_size(bd_srv_t *bd, size_t *rsize)
    271271{
    272272        *rsize = DDISK_BLOCK_SIZE;
     
    274274}
    275275
    276 errno_t ddisk_bd_get_num_blocks(bd_srv_t *bd, aoff64_t *rnb)
     276int ddisk_bd_get_num_blocks(bd_srv_t *bd, aoff64_t *rnb)
    277277{
    278278        ddisk_t *ddisk = (ddisk_t *) bd->srvs->sarg;
     
    282282}
    283283
    284 static errno_t ddisk_get_res(ddf_dev_t *dev, ddisk_res_t *ddisk_res)
     284static int ddisk_get_res(ddf_dev_t *dev, ddisk_res_t *ddisk_res)
    285285{
    286286        async_sess_t *parent_sess;
    287287        hw_res_list_parsed_t hw_res;
    288         errno_t rc;
     288        int rc;
    289289
    290290        parent_sess = ddf_dev_parent_sess_get(dev);
     
    317317}
    318318
    319 static errno_t ddisk_fun_create(ddisk_t *ddisk)
    320 {
    321         errno_t rc;
     319static int ddisk_fun_create(ddisk_t *ddisk)
     320{
     321        int rc;
    322322        ddf_fun_t *fun = NULL;
    323323
     
    350350}
    351351
    352 static errno_t ddisk_fun_remove(ddisk_t *ddisk)
    353 {
    354         errno_t rc;
     352static int ddisk_fun_remove(ddisk_t *ddisk)
     353{
     354        int rc;
    355355
    356356        if (ddisk->fun == NULL)
     
    381381}
    382382
    383 static errno_t ddisk_fun_unbind(ddisk_t *ddisk)
    384 {
    385         errno_t rc;
     383static int ddisk_fun_unbind(ddisk_t *ddisk)
     384{
     385        int rc;
    386386
    387387        if (ddisk->fun == NULL)
     
    410410 * @return     EOK on success or an error code.
    411411 */
    412 static errno_t ddisk_dev_add(ddf_dev_t *dev)
     412static int ddisk_dev_add(ddf_dev_t *dev)
    413413{
    414414        ddisk_t *ddisk;
    415415        ddisk_res_t res;
    416         errno_t rc;
     416        int rc;
    417417
    418418        /*
     
    530530
    531531
    532 static errno_t ddisk_dev_remove_common(ddisk_t *ddisk, bool surprise)
    533 {
    534         errno_t rc;
     532static int ddisk_dev_remove_common(ddisk_t *ddisk, bool surprise)
     533{
     534        int rc;
    535535
    536536        if (!surprise)
     
    558558}
    559559
    560 static errno_t ddisk_dev_remove(ddf_dev_t *dev)
     560static int ddisk_dev_remove(ddf_dev_t *dev)
    561561{
    562562        ddisk_t *ddisk = (ddisk_t *) ddf_dev_data_get(dev);
     
    566566}
    567567
    568 static errno_t ddisk_dev_gone(ddf_dev_t *dev)
     568static int ddisk_dev_gone(ddf_dev_t *dev)
    569569{
    570570        ddisk_t *ddisk = (ddisk_t *) ddf_dev_data_get(dev);
     
    574574}
    575575
    576 static errno_t ddisk_fun_online(ddf_fun_t *fun)
     576static int ddisk_fun_online(ddf_fun_t *fun)
    577577{
    578578        ddf_msg(LVL_DEBUG, "ddisk_fun_online()");
     
    580580}
    581581
    582 static errno_t ddisk_fun_offline(ddf_fun_t *fun)
     582static int ddisk_fun_offline(ddf_fun_t *fun)
    583583{
    584584        ddf_msg(LVL_DEBUG, "ddisk_fun_offline()");
Note: See TracChangeset for help on using the changeset viewer.