Changeset 5a6cc679 in mainline for uspace/lib/drv


Ignore:
Timestamp:
2018-01-31T02:21:24Z (7 years ago)
Author:
Jenda <jenda.jzqk73@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a0a9cc2
Parents:
132ab5d1
Message:

Merge commit '50f19b7ee8e94570b5c63896736c4eb49cfa18db' into forwardport

Not all ints are converted to errno_t in xhci tree yet, however it compiles and works :)

Location:
uspace/lib/drv
Files:
35 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/generic/driver.c

    r132ab5d1 r5a6cc679  
    124124       
    125125        char *dev_name = NULL;
    126         int rc = async_data_write_accept((void **) &dev_name, true, 0, 0, 0, 0);
     126        errno_t rc = async_data_write_accept((void **) &dev_name, true, 0, 0, 0, 0);
    127127        if (rc != EOK) {
    128128                async_answer_0(iid, rc);
     
    157157        (void) parent_fun_handle;
    158158       
    159         int res = driver->driver_ops->dev_add(dev);
     159        errno_t res = driver->driver_ops->dev_add(dev);
    160160       
    161161        if (res != EOK) {
     
    189189        }
    190190       
    191         int rc;
     191        errno_t rc;
    192192       
    193193        if (driver->driver_ops->dev_remove != NULL)
     
    222222        }
    223223       
    224         int rc;
     224        errno_t rc;
    225225       
    226226        if (driver->driver_ops->dev_gone != NULL)
     
    263263       
    264264        /* Call driver entry point */
    265         int rc;
     265        errno_t rc;
    266266       
    267267        if (driver->driver_ops->fun_online != NULL)
     
    298298       
    299299        /* Call driver entry point */
    300         int rc;
     300        errno_t rc;
    301301       
    302302        if (driver->driver_ops->fun_offline != NULL)
     
    414414         */
    415415       
    416         int ret = EOK;
     416        errno_t ret = EOK;
    417417        /* Open device function */
    418418        if (fun->ops != NULL && fun->ops->open != NULL)
     
    676676 * @return      EOK on success, ENOMEM if out of memory
    677677 */
    678 int ddf_fun_set_name(ddf_fun_t *dev, const char *name)
     678errno_t ddf_fun_set_name(ddf_fun_t *dev, const char *name)
    679679{
    680680        assert(dev->name == NULL);
     
    825825 *
    826826 */
    827 int ddf_fun_bind(ddf_fun_t *fun)
     827errno_t ddf_fun_bind(ddf_fun_t *fun)
    828828{
    829829        assert(fun->bound == false);
     
    832832       
    833833        add_to_functions_list(fun);
    834         int res = devman_add_function(fun->name, fun->ftype, &fun->match_ids,
     834        errno_t res = devman_add_function(fun->name, fun->ftype, &fun->match_ids,
    835835            fun->dev->handle, &fun->handle);
    836836        if (res != EOK) {
     
    853853 *
    854854 */
    855 int ddf_fun_unbind(ddf_fun_t *fun)
     855errno_t ddf_fun_unbind(ddf_fun_t *fun)
    856856{
    857857        assert(fun->bound == true);
    858858       
    859         int res = devman_remove_function(fun->handle);
     859        errno_t res = devman_remove_function(fun->handle);
    860860        if (res != EOK)
    861861                return res;
     
    874874 *
    875875 */
    876 int ddf_fun_online(ddf_fun_t *fun)
     876errno_t ddf_fun_online(ddf_fun_t *fun)
    877877{
    878878        assert(fun->bound == true);
    879879       
    880         int res = devman_drv_fun_online(fun->handle);
     880        errno_t res = devman_drv_fun_online(fun->handle);
    881881        if (res != EOK)
    882882                return res;
     
    892892 *
    893893 */
    894 int ddf_fun_offline(ddf_fun_t *fun)
     894errno_t ddf_fun_offline(ddf_fun_t *fun)
    895895{
    896896        assert(fun->bound == true);
    897897       
    898         int res = devman_drv_fun_offline(fun->handle);
     898        errno_t res = devman_drv_fun_offline(fun->handle);
    899899        if (res != EOK)
    900900                return res;
     
    916916 *
    917917 */
    918 int ddf_fun_add_match_id(ddf_fun_t *fun, const char *match_id_str,
     918errno_t ddf_fun_add_match_id(ddf_fun_t *fun, const char *match_id_str,
    919919    int match_score)
    920920{
     
    963963 *
    964964 */
    965 int ddf_fun_add_to_category(ddf_fun_t *fun, const char *cat_name)
     965errno_t ddf_fun_add_to_category(ddf_fun_t *fun, const char *cat_name)
    966966{
    967967        assert(fun->bound == true);
     
    984984         */
    985985        port_id_t port;
    986         int rc = async_create_port(INTERFACE_DDF_DRIVER, driver_connection_driver,
     986        errno_t rc = async_create_port(INTERFACE_DDF_DRIVER, driver_connection_driver,
    987987            NULL, &port);
    988988        if (rc != EOK) {
  • uspace/lib/drv/generic/interrupt.c

    r132ab5d1 r5a6cc679  
    4343#include "private/driver.h"
    4444
    45 int register_interrupt_handler(ddf_dev_t *dev, int irq,
     45errno_t register_interrupt_handler(ddf_dev_t *dev, int irq,
    4646    interrupt_handler_t *handler, const irq_code_t *irq_code,
    4747    cap_handle_t *handle)
     
    5151}
    5252
    53 int unregister_interrupt_handler(ddf_dev_t *dev, cap_handle_t cap)
     53errno_t unregister_interrupt_handler(ddf_dev_t *dev, cap_handle_t cap)
    5454{
    5555        return async_irq_unsubscribe(cap);
  • uspace/lib/drv/generic/log.c

    r132ab5d1 r5a6cc679  
    4040 *
    4141 */
    42 int ddf_log_init(const char *drv_name)
     42errno_t ddf_log_init(const char *drv_name)
    4343{
    4444        return log_init(drv_name);
  • uspace/lib/drv/generic/remote_ahci.c

    r132ab5d1 r5a6cc679  
    6565       
    6666        char devn[MAX_NAME_LENGTH];
    67         int rc = devman_fun_get_name(funh, devn, MAX_NAME_LENGTH);
     67        errno_t rc = devman_fun_get_name(funh, devn, MAX_NAME_LENGTH);
    6868        if (rc != EOK)
    6969                return NULL;
     
    8383}
    8484
    85 int ahci_get_sata_device_name(async_sess_t *sess, size_t sata_dev_name_length,
     85errno_t ahci_get_sata_device_name(async_sess_t *sess, size_t sata_dev_name_length,
    8686    char *sata_dev_name)
    8787{
     
    9595        async_data_read_start(exch, sata_dev_name, sata_dev_name_length);
    9696       
    97         int rc;
     97        errno_t rc;
    9898        async_wait_for(req, &rc);
    9999       
     
    101101}
    102102
    103 int ahci_get_num_blocks(async_sess_t *sess, uint64_t *blocks)
     103errno_t ahci_get_num_blocks(async_sess_t *sess, uint64_t *blocks)
    104104{
    105105        async_exch_t *exch = async_exchange_begin(sess);
     
    109109        sysarg_t blocks_hi;
    110110        sysarg_t blocks_lo;
    111         int rc = async_req_1_2(exch, DEV_IFACE_ID(AHCI_DEV_IFACE),
     111        errno_t rc = async_req_1_2(exch, DEV_IFACE_ID(AHCI_DEV_IFACE),
    112112            IPC_M_AHCI_GET_NUM_BLOCKS, &blocks_hi, &blocks_lo);
    113113       
     
    122122}
    123123
    124 int ahci_get_block_size(async_sess_t *sess, size_t *blocks_size)
     124errno_t ahci_get_block_size(async_sess_t *sess, size_t *blocks_size)
    125125{
    126126        async_exch_t *exch = async_exchange_begin(sess);
     
    129129       
    130130        sysarg_t bs;
    131         int rc = async_req_1_1(exch, DEV_IFACE_ID(AHCI_DEV_IFACE),
     131        errno_t rc = async_req_1_1(exch, DEV_IFACE_ID(AHCI_DEV_IFACE),
    132132            IPC_M_AHCI_GET_BLOCK_SIZE, &bs);
    133133       
     
    140140}
    141141
    142 int ahci_read_blocks(async_sess_t *sess, uint64_t blocknum, size_t count,
     142errno_t ahci_read_blocks(async_sess_t *sess, uint64_t blocknum, size_t count,
    143143    void *buf)
    144144{
     
    155155        async_exchange_end(exch);
    156156       
    157         int rc;
     157        errno_t rc;
    158158        async_wait_for(req, &rc);
    159159       
     
    161161}
    162162
    163 int ahci_write_blocks(async_sess_t *sess, uint64_t blocknum, size_t count,
     163errno_t ahci_write_blocks(async_sess_t *sess, uint64_t blocknum, size_t count,
    164164    void* buf)
    165165{
     
    175175        async_exchange_end(exch);
    176176       
    177         int rc;
     177        errno_t rc;
    178178        async_wait_for(req, &rc);
    179179       
     
    227227        }       
    228228       
    229         const int ret = ahci_iface->get_sata_device_name(fun,
     229        const errno_t ret = ahci_iface->get_sata_device_name(fun,
    230230            sata_dev_name_length, sata_dev_name);
    231231       
     
    251251       
    252252        uint64_t blocks;
    253         const int ret = ahci_iface->get_num_blocks(fun, &blocks);
     253        const errno_t ret = ahci_iface->get_num_blocks(fun, &blocks);
    254254       
    255255        if (ret != EOK)
     
    270270       
    271271        size_t blocks;
    272         const int ret = ahci_iface->get_block_size(fun, &blocks);
     272        const errno_t ret = ahci_iface->get_block_size(fun, &blocks);
    273273       
    274274        if (ret != EOK)
     
    302302        const size_t cnt = (size_t) DEV_IPC_GET_ARG3(*call);
    303303       
    304         const int ret = ahci_iface->read_blocks(fun, blocknum, cnt, buf);
     304        const errno_t ret = ahci_iface->read_blocks(fun, blocknum, cnt, buf);
    305305       
    306306        async_answer_0(callid, ret);
     
    331331        const size_t cnt = (size_t) DEV_IPC_GET_ARG3(*call);
    332332       
    333         const int ret = ahci_iface->write_blocks(fun, blocknum, cnt, buf);
     333        const errno_t ret = ahci_iface->write_blocks(fun, blocknum, cnt, buf);
    334334       
    335335        async_answer_0(callid, ret);
  • uspace/lib/drv/generic/remote_audio_mixer.c

    r132ab5d1 r5a6cc679  
    9494 * @return Error code.
    9595 */
    96 int audio_mixer_get_info(async_exch_t *exch, const char **name, unsigned *items)
     96errno_t audio_mixer_get_info(async_exch_t *exch, const char **name, unsigned *items)
    9797{
    9898        if (!exch)
    9999                return EINVAL;
    100100        sysarg_t name_size, itemc;
    101         const int ret = async_req_1_2(exch, DEV_IFACE_ID(AUDIO_MIXER_IFACE),
     101        const errno_t ret = async_req_1_2(exch, DEV_IFACE_ID(AUDIO_MIXER_IFACE),
    102102            IPC_M_AUDIO_MIXER_GET_INFO, &name_size, &itemc);
    103103        if (ret == EOK && name) {
     
    109109                        return ENOMEM;
    110110                }
    111                 const int ret =
     111                const errno_t ret =
    112112                    async_data_read_start(exch, name_place, name_size);
    113113                if (ret != EOK) {
     
    130130 * @return Error code.
    131131 */
    132 int audio_mixer_get_item_info(async_exch_t *exch, unsigned item,
     132errno_t audio_mixer_get_item_info(async_exch_t *exch, unsigned item,
    133133    const char **name, unsigned *levels)
    134134{
     
    136136                return EINVAL;
    137137        sysarg_t name_size, lvls;
    138         const int ret = async_req_2_2(exch, DEV_IFACE_ID(AUDIO_MIXER_IFACE),
     138        const errno_t ret = async_req_2_2(exch, DEV_IFACE_ID(AUDIO_MIXER_IFACE),
    139139            IPC_M_AUDIO_MIXER_GET_ITEM_INFO, item, &name_size, &lvls);
    140140        if (ret == EOK && name) {
     
    146146                        return ENOMEM;
    147147                }
    148                 const int ret =
     148                const errno_t ret =
    149149                    async_data_read_start(exch, name_place, name_size);
    150150                if (ret != EOK) {
     
    166166 * @return Error code.
    167167 */
    168 int audio_mixer_set_item_level(async_exch_t *exch, unsigned item,
     168errno_t audio_mixer_set_item_level(async_exch_t *exch, unsigned item,
    169169    unsigned level)
    170170{
     
    183183 * @return Error code.
    184184 */
    185 int audio_mixer_get_item_level(async_exch_t *exch, unsigned item,
     185errno_t audio_mixer_get_item_level(async_exch_t *exch, unsigned item,
    186186    unsigned *level)
    187187{
     
    189189                return EINVAL;
    190190        sysarg_t current;
    191         const int ret = async_req_2_1(exch, DEV_IFACE_ID(AUDIO_MIXER_IFACE),
     191        const errno_t ret = async_req_2_1(exch, DEV_IFACE_ID(AUDIO_MIXER_IFACE),
    192192            IPC_M_AUDIO_MIXER_GET_ITEM_LEVEL, item, &current);
    193193        if (ret == EOK && level)
     
    229229        const char *name = NULL;
    230230        unsigned items = 0;
    231         const int ret = mixer_iface->get_info(fun, &name, &items);
     231        const errno_t ret = mixer_iface->get_info(fun, &name, &items);
    232232        const size_t name_size = name ? str_size(name) + 1 : 0;
    233233        async_answer_2(callid, ret, name_size, items);
     
    261261        const char *name = NULL;
    262262        unsigned values = 0;
    263         const int ret = mixer_iface->get_item_info(fun, item, &name, &values);
     263        const errno_t ret = mixer_iface->get_item_info(fun, item, &name, &values);
    264264        const size_t name_size = name ? str_size(name) + 1 : 0;
    265265        async_answer_2(callid, ret, name_size, values);
     
    291291        const unsigned item = DEV_IPC_GET_ARG1(*call);
    292292        const unsigned value = DEV_IPC_GET_ARG2(*call);
    293         const int ret = mixer_iface->set_item_level(fun, item, value);
     293        const errno_t ret = mixer_iface->set_item_level(fun, item, value);
    294294        async_answer_0(callid, ret);
    295295}
     
    306306        const unsigned item = DEV_IPC_GET_ARG1(*call);
    307307        unsigned current = 0;
    308         const int ret =
     308        const errno_t ret =
    309309            mixer_iface->get_item_level(fun, item, &current);
    310310        async_answer_1(callid, ret, current);
  • uspace/lib/drv/generic/remote_audio_pcm.c

    r132ab5d1 r5a6cc679  
    114114        static category_id_t pcm_id = 0;
    115115        if (!resolved) {
    116                 const int ret = loc_category_get_id("audio-pcm", &pcm_id,
     116                const errno_t ret = loc_category_get_id("audio-pcm", &pcm_id,
    117117                    IPC_FLAG_BLOCKING);
    118118                if (ret != EOK)
     
    123123        service_id_t *svcs = NULL;
    124124        size_t count = 0;
    125         const int ret = loc_category_get_svcs(pcm_id, &svcs, &count);
     125        const errno_t ret = loc_category_get_svcs(pcm_id, &svcs, &count);
    126126        if (ret != EOK)
    127127                return NULL;
     
    143143{
    144144        devman_handle_t device_handle = 0;
    145         const int ret = devman_fun_get_handle(name, &device_handle, 0);
     145        const errno_t ret = devman_fun_get_handle(name, &device_handle, 0);
    146146        if (ret != EOK)
    147147                return NULL;
     
    184184 * @note Caller is responsible for freeing newly allocated memory.
    185185 */
    186 int audio_pcm_get_info_str(audio_pcm_sess_t *sess, const char **name)
     186errno_t audio_pcm_get_info_str(audio_pcm_sess_t *sess, const char **name)
    187187{
    188188        if (!name)
     
    190190        async_exch_t *exch = async_exchange_begin(sess);
    191191        sysarg_t name_size;
    192         const int ret = async_req_1_1(exch,
     192        const errno_t ret = async_req_1_1(exch,
    193193            DEV_IFACE_ID(AUDIO_PCM_BUFFER_IFACE),
    194194            IPC_M_AUDIO_PCM_GET_INFO_STR, &name_size);
     
    202202                        return ENOMEM;
    203203                }
    204                 const int ret =
     204                const errno_t ret =
    205205                    async_data_read_start(exch, name_place, name_size);
    206206                if (ret != EOK) {
     
    225225 * @return Error code.
    226226 */
    227 int audio_pcm_query_cap(audio_pcm_sess_t *sess, audio_cap_t cap, sysarg_t *value)
    228 {
    229         async_exch_t *exch = async_exchange_begin(sess);
    230         const int ret = async_req_2_1(exch,
     227errno_t audio_pcm_query_cap(audio_pcm_sess_t *sess, audio_cap_t cap, sysarg_t *value)
     228{
     229        async_exch_t *exch = async_exchange_begin(sess);
     230        const errno_t ret = async_req_2_1(exch,
    231231            DEV_IFACE_ID(AUDIO_PCM_BUFFER_IFACE), IPC_M_AUDIO_PCM_QUERY_CAPS,
    232232            cap, value);
     
    245245 * Works for both playback and capture.
    246246 */
    247 int audio_pcm_get_buffer_pos(audio_pcm_sess_t *sess, size_t *pos)
     247errno_t audio_pcm_get_buffer_pos(audio_pcm_sess_t *sess, size_t *pos)
    248248{
    249249        if (!pos)
     
    251251        async_exch_t *exch = async_exchange_begin(sess);
    252252        sysarg_t value = 0;
    253         const int ret = async_req_1_1(exch,
     253        const errno_t ret = async_req_1_1(exch,
    254254            DEV_IFACE_ID(AUDIO_PCM_BUFFER_IFACE),
    255255            IPC_M_AUDIO_PCM_GET_BUFFER_POS, &value);
     
    273273 * parameters to the nearest values supported by the device.
    274274 */
    275 int audio_pcm_test_format(audio_pcm_sess_t *sess, unsigned *channels,
     275errno_t audio_pcm_test_format(audio_pcm_sess_t *sess, unsigned *channels,
    276276    unsigned *rate, pcm_sample_format_t *format)
    277277{
     
    280280        sysarg_t rate_arg = rate ? *rate : 0;
    281281        sysarg_t format_arg = format ? *format : 0;
    282         const int ret = async_req_4_3(exch,
     282        const errno_t ret = async_req_4_3(exch,
    283283            DEV_IFACE_ID(AUDIO_PCM_BUFFER_IFACE),
    284284            IPC_M_AUDIO_PCM_TEST_FORMAT, channels_arg, rate_arg, format_arg,
     
    311311 * @return Error code.
    312312 */
    313 int audio_pcm_register_event_callback(audio_pcm_sess_t *sess,
     313errno_t audio_pcm_register_event_callback(audio_pcm_sess_t *sess,
    314314    async_port_handler_t event_callback, void *arg)
    315315{
     
    319319        async_exch_t *exch = async_exchange_begin(sess);
    320320       
    321         int ret = async_req_1_0(exch, DEV_IFACE_ID(AUDIO_PCM_BUFFER_IFACE),
     321        errno_t ret = async_req_1_0(exch, DEV_IFACE_ID(AUDIO_PCM_BUFFER_IFACE),
    322322            IPC_M_AUDIO_PCM_REGISTER_EVENTS);
    323323        if (ret == EOK) {
     
    338338 * @return Error code.
    339339 */
    340 int audio_pcm_unregister_event_callback(audio_pcm_sess_t *sess)
    341 {
    342         async_exch_t *exch = async_exchange_begin(sess);
    343         const int ret = async_req_1_0(exch,
     340errno_t audio_pcm_unregister_event_callback(audio_pcm_sess_t *sess)
     341{
     342        async_exch_t *exch = async_exchange_begin(sess);
     343        const errno_t ret = async_req_1_0(exch,
    344344            DEV_IFACE_ID(AUDIO_PCM_BUFFER_IFACE),
    345345            IPC_M_AUDIO_PCM_UNREGISTER_EVENTS);
     
    357357 * @return Error code.
    358358 */
    359 int audio_pcm_get_buffer(audio_pcm_sess_t *sess, void **buffer, size_t *size)
     359errno_t audio_pcm_get_buffer(audio_pcm_sess_t *sess, void **buffer, size_t *size)
    360360{
    361361        if (!buffer || !size)
     
    365365
    366366        sysarg_t buffer_size = *size;
    367         int ret = async_req_2_1(exch, DEV_IFACE_ID(AUDIO_PCM_BUFFER_IFACE),
     367        errno_t ret = async_req_2_1(exch, DEV_IFACE_ID(AUDIO_PCM_BUFFER_IFACE),
    368368            IPC_M_AUDIO_PCM_GET_BUFFER, (sysarg_t)buffer_size, &buffer_size);
    369369        if (ret == EOK) {
     
    388388 * @return Error code.
    389389 */
    390 int audio_pcm_release_buffer(audio_pcm_sess_t *sess)
    391 {
    392         async_exch_t *exch = async_exchange_begin(sess);
    393         const int ret = async_req_1_0(exch,
     390errno_t audio_pcm_release_buffer(audio_pcm_sess_t *sess)
     391{
     392        async_exch_t *exch = async_exchange_begin(sess);
     393        const errno_t ret = async_req_1_0(exch,
    394394            DEV_IFACE_ID(AUDIO_PCM_BUFFER_IFACE),
    395395            IPC_M_AUDIO_PCM_RELEASE_BUFFER);
     
    412412 * 0 to turn off event generation.
    413413 */
    414 int audio_pcm_start_playback_fragment(audio_pcm_sess_t *sess, unsigned frames,
     414errno_t audio_pcm_start_playback_fragment(audio_pcm_sess_t *sess, unsigned frames,
    415415    unsigned channels, unsigned sample_rate, pcm_sample_format_t format)
    416416{
     
    420420        const sysarg_t packed = (channels << 16) | (format & UINT16_MAX);
    421421        async_exch_t *exch = async_exchange_begin(sess);
    422         const int ret = async_req_4_0(exch,
     422        const errno_t ret = async_req_4_0(exch,
    423423            DEV_IFACE_ID(AUDIO_PCM_BUFFER_IFACE),
    424424            IPC_M_AUDIO_PCM_START_PLAYBACK,
     
    434434 * @return Error code.
    435435 */
    436 int audio_pcm_last_playback_fragment(audio_pcm_sess_t *sess)
    437 {
    438         async_exch_t *exch = async_exchange_begin(sess);
    439         const int ret = async_req_2_0(exch,
     436errno_t audio_pcm_last_playback_fragment(audio_pcm_sess_t *sess)
     437{
     438        async_exch_t *exch = async_exchange_begin(sess);
     439        const errno_t ret = async_req_2_0(exch,
    440440            DEV_IFACE_ID(AUDIO_PCM_BUFFER_IFACE),
    441441            IPC_M_AUDIO_PCM_STOP_PLAYBACK, false);
     
    454454 * @return Error code.
    455455 */
    456 int audio_pcm_start_playback(audio_pcm_sess_t *sess,
     456errno_t audio_pcm_start_playback(audio_pcm_sess_t *sess,
    457457    unsigned channels, unsigned sample_rate, pcm_sample_format_t format)
    458458{
     
    468468 * @return Error code.
    469469 */
    470 int audio_pcm_stop_playback_immediate(audio_pcm_sess_t *sess)
    471 {
    472         async_exch_t *exch = async_exchange_begin(sess);
    473         const int ret = async_req_2_0(exch,
     470errno_t audio_pcm_stop_playback_immediate(audio_pcm_sess_t *sess)
     471{
     472        async_exch_t *exch = async_exchange_begin(sess);
     473        const errno_t ret = async_req_2_0(exch,
    474474            DEV_IFACE_ID(AUDIO_PCM_BUFFER_IFACE),
    475475            IPC_M_AUDIO_PCM_STOP_PLAYBACK, true);
     
    485485 * @return Error code.
    486486 */
    487 int audio_pcm_stop_playback(audio_pcm_sess_t *sess)
    488 {
    489         async_exch_t *exch = async_exchange_begin(sess);
    490         const int ret = async_req_2_0(exch,
     487errno_t audio_pcm_stop_playback(audio_pcm_sess_t *sess)
     488{
     489        async_exch_t *exch = async_exchange_begin(sess);
     490        const errno_t ret = async_req_2_0(exch,
    491491            DEV_IFACE_ID(AUDIO_PCM_BUFFER_IFACE),
    492492            IPC_M_AUDIO_PCM_STOP_PLAYBACK, false);
     
    509509 * 0 to turn off event generation.
    510510 */
    511 int audio_pcm_start_capture_fragment(audio_pcm_sess_t *sess, unsigned frames,
     511errno_t audio_pcm_start_capture_fragment(audio_pcm_sess_t *sess, unsigned frames,
    512512    unsigned channels, unsigned sample_rate, pcm_sample_format_t format)
    513513{
     
    517517        const sysarg_t packed = (channels << 16) | (format & UINT16_MAX);
    518518        async_exch_t *exch = async_exchange_begin(sess);
    519         const int ret = async_req_4_0(exch,
     519        const errno_t ret = async_req_4_0(exch,
    520520            DEV_IFACE_ID(AUDIO_PCM_BUFFER_IFACE), IPC_M_AUDIO_PCM_START_CAPTURE,
    521521            frames, sample_rate, packed);
     
    534534 * @return Error code.
    535535 */
    536 int audio_pcm_start_capture(audio_pcm_sess_t *sess,
     536errno_t audio_pcm_start_capture(audio_pcm_sess_t *sess,
    537537    unsigned channels, unsigned sample_rate, pcm_sample_format_t format)
    538538{
     
    549549 * @return Error code.
    550550 */
    551 int audio_pcm_last_capture_fragment(audio_pcm_sess_t *sess)
    552 {
    553         async_exch_t *exch = async_exchange_begin(sess);
    554         const int ret = async_req_2_0(exch,
     551errno_t audio_pcm_last_capture_fragment(audio_pcm_sess_t *sess)
     552{
     553        async_exch_t *exch = async_exchange_begin(sess);
     554        const errno_t ret = async_req_2_0(exch,
    555555            DEV_IFACE_ID(AUDIO_PCM_BUFFER_IFACE),
    556556            IPC_M_AUDIO_PCM_STOP_CAPTURE, false);
     
    566566 * @return Error code.
    567567 */
    568 int audio_pcm_stop_capture_immediate(audio_pcm_sess_t *sess)
    569 {
    570         async_exch_t *exch = async_exchange_begin(sess);
    571         const int ret = async_req_2_0(exch,
     568errno_t audio_pcm_stop_capture_immediate(audio_pcm_sess_t *sess)
     569{
     570        async_exch_t *exch = async_exchange_begin(sess);
     571        const errno_t ret = async_req_2_0(exch,
    572572            DEV_IFACE_ID(AUDIO_PCM_BUFFER_IFACE),
    573573            IPC_M_AUDIO_PCM_STOP_CAPTURE, true);
     
    583583 * @return Error code.
    584584 */
    585 int audio_pcm_stop_capture(audio_pcm_sess_t *sess)
    586 {
    587         async_exch_t *exch = async_exchange_begin(sess);
    588         const int ret = async_req_2_0(exch,
     585errno_t audio_pcm_stop_capture(audio_pcm_sess_t *sess)
     586{
     587        async_exch_t *exch = async_exchange_begin(sess);
     588        const errno_t ret = async_req_2_0(exch,
    589589            DEV_IFACE_ID(AUDIO_PCM_BUFFER_IFACE),
    590590            IPC_M_AUDIO_PCM_STOP_CAPTURE, false);
     
    641641        }
    642642        const char *name = NULL;
    643         const int ret = pcm_iface->get_info_str(fun, &name);
     643        const errno_t ret = pcm_iface->get_info_str(fun, &name);
    644644        const size_t name_size = name ? str_size(name) + 1 : 0;
    645645        async_answer_1(callid, ret, name_size);
     
    692692                return;
    693693        }
    694         const int ret = pcm_iface->set_event_session(fun, sess);
     694        const errno_t ret = pcm_iface->set_event_session(fun, sess);
    695695        if (ret != EOK) {
    696696                ddf_msg(LVL_DEBUG, "Failed to set event callback.");
     
    722722        const audio_pcm_iface_t *pcm_iface = iface;
    723723        size_t pos = 0;
    724         const int ret = pcm_iface->get_buffer_pos ?
     724        const errno_t ret = pcm_iface->get_buffer_pos ?
    725725            pcm_iface->get_buffer_pos(fun, &pos) : ENOTSUP;
    726726        async_answer_1(callid, ret, pos);
     
    733733        unsigned rate = DEV_IPC_GET_ARG2(*call);
    734734        pcm_sample_format_t format = DEV_IPC_GET_ARG3(*call);
    735         const int ret = pcm_iface->test_format ?
     735        const errno_t ret = pcm_iface->test_format ?
    736736            pcm_iface->test_format(fun, &channels, &rate, &format) : ENOTSUP;
    737737        async_answer_3(callid, ret, channels, rate, format);
     
    750750        void *buffer = NULL;
    751751        size_t size = DEV_IPC_GET_ARG1(*call);
    752         int ret = pcm_iface->get_buffer(fun, &buffer, &size);
     752        errno_t ret = pcm_iface->get_buffer(fun, &buffer, &size);
    753753        async_answer_1(callid, ret, size);
    754754        if (ret != EOK || size == 0)
     
    792792        const audio_pcm_iface_t *pcm_iface = iface;
    793793
    794         const int ret = pcm_iface->release_buffer ?
     794        const errno_t ret = pcm_iface->release_buffer ?
    795795            pcm_iface->release_buffer(fun) : ENOTSUP;
    796796        async_answer_0(callid, ret);
     
    807807        const pcm_sample_format_t format = DEV_IPC_GET_ARG3(*call) & UINT16_MAX;
    808808
    809         const int ret = pcm_iface->start_playback
     809        const errno_t ret = pcm_iface->start_playback
    810810            ? pcm_iface->start_playback(fun, frames, channels, rate, format)
    811811            : ENOTSUP;
     
    819819        const bool immediate = DEV_IPC_GET_ARG1(*call);
    820820
    821         const int ret = pcm_iface->stop_playback ?
     821        const errno_t ret = pcm_iface->stop_playback ?
    822822            pcm_iface->stop_playback(fun, immediate) : ENOTSUP;
    823823        async_answer_0(callid, ret);
     
    834834        const pcm_sample_format_t format = DEV_IPC_GET_ARG3(*call) & UINT16_MAX;
    835835
    836         const int ret = pcm_iface->start_capture
     836        const errno_t ret = pcm_iface->start_capture
    837837            ? pcm_iface->start_capture(fun, frames, channels, rate, format)
    838838            : ENOTSUP;
     
    846846        const bool immediate = DEV_IPC_GET_ARG1(*call);
    847847
    848         const int ret = pcm_iface->stop_capture ?
     848        const errno_t ret = pcm_iface->stop_capture ?
    849849            pcm_iface->stop_capture(fun, immediate) : ENOTSUP;
    850850        async_answer_0(callid, ret);
  • uspace/lib/drv/generic/remote_battery_dev.c

    r132ab5d1 r5a6cc679  
    4747 * @return         EOK on success or an error code
    4848 */
    49 int
     49errno_t
    5050battery_status_get(async_sess_t *sess, battery_status_t *batt_status)
    5151{
     
    5454        async_exch_t *exch = async_exchange_begin(sess);
    5555
    56         int const rc = async_req_1_1(exch, DEV_IFACE_ID(BATTERY_DEV_IFACE),
     56        errno_t const rc = async_req_1_1(exch, DEV_IFACE_ID(BATTERY_DEV_IFACE),
    5757            BATTERY_STATUS_GET, &status);
    5858
     
    7272 * @return         EOK on success or an error code
    7373 */
    74 int
     74errno_t
    7575battery_charge_level_get(async_sess_t *sess, int *level)
    7676{
     
    7979        async_exch_t *exch = async_exchange_begin(sess);
    8080
    81         int const rc = async_req_1_1(exch, DEV_IFACE_ID(BATTERY_DEV_IFACE),
     81        errno_t const rc = async_req_1_1(exch, DEV_IFACE_ID(BATTERY_DEV_IFACE),
    8282            BATTERY_CHARGE_LEVEL_GET, &charge_level);
    8383
     
    129129
    130130        battery_status_t batt_status;
    131         const int rc = bops->battery_status_get(fun, &batt_status);
     131        const errno_t rc = bops->battery_status_get(fun, &batt_status);
    132132
    133133        if (rc != EOK)
     
    155155
    156156        int battery_level;
    157         const int rc = bops->battery_charge_level_get(fun, &battery_level);
     157        const errno_t rc = bops->battery_charge_level_get(fun, &battery_level);
    158158
    159159        if (rc != EOK)
  • uspace/lib/drv/generic/remote_clock_dev.c

    r132ab5d1 r5a6cc679  
    7575        ipc_callid_t cid;
    7676        struct tm t;
    77         int rc;
     77        errno_t rc;
    7878        size_t len;
    7979
     
    114114{
    115115        clock_dev_ops_t *clock_dev_ops = (clock_dev_ops_t *) ops;
    116         int          rc;
     116        errno_t      rc;
    117117        struct tm    t;
    118118        ipc_callid_t cid;
  • uspace/lib/drv/generic/remote_hw_res.c

    r132ab5d1 r5a6cc679  
    7979       
    8080        const int irq = DEV_IPC_GET_ARG1(*call);
    81         const int ret = hw_res_ops->enable_interrupt(fun, irq);
     81        const errno_t ret = hw_res_ops->enable_interrupt(fun, irq);
    8282        async_answer_0(callid, ret);
    8383}
     
    9494       
    9595        const int irq = DEV_IPC_GET_ARG1(*call);
    96         const int ret = hw_res_ops->disable_interrupt(fun, irq);
     96        const errno_t ret = hw_res_ops->disable_interrupt(fun, irq);
    9797        async_answer_0(callid, ret);
    9898}
     
    109109       
    110110        const int irq = DEV_IPC_GET_ARG1(*call);
    111         const int ret = hw_res_ops->enable_interrupt(fun, irq);
     111        const errno_t ret = hw_res_ops->enable_interrupt(fun, irq);
    112112        async_answer_0(callid, ret);
    113113}
     
    153153        const uint32_t size = DEV_IPC_GET_ARG3(*call);
    154154
    155         const int ret = hw_res_ops->dma_channel_setup(
     155        const errno_t ret = hw_res_ops->dma_channel_setup(
    156156            fun, channel, address, size, mode);
    157157        async_answer_0(callid, ret);
     
    169169        const unsigned channel = DEV_IPC_GET_ARG1(*call);
    170170        size_t remain = 0;
    171         const int ret = hw_res_ops->dma_channel_remain(fun, channel, &remain);
     171        const errno_t ret = hw_res_ops->dma_channel_remain(fun, channel, &remain);
    172172        async_answer_1(callid, ret, remain);
    173173}
  • uspace/lib/drv/generic/remote_ieee80211.c

    r132ab5d1 r5a6cc679  
    6262 *
    6363 */
    64 int ieee80211_get_scan_results(async_sess_t *dev_sess,
     64errno_t ieee80211_get_scan_results(async_sess_t *dev_sess,
    6565    ieee80211_scan_results_t *results, bool now)
    6666{
     
    7171        aid_t aid = async_send_2(exch, DEV_IFACE_ID(IEEE80211_DEV_IFACE),
    7272            IEEE80211_GET_SCAN_RESULTS, now, NULL);
    73         int rc = async_data_read_start(exch, results,
     73        errno_t rc = async_data_read_start(exch, results,
    7474            sizeof(ieee80211_scan_results_t));
    7575        async_exchange_end(exch);
    7676       
    77         int res;
     77        errno_t res;
    7878        async_wait_for(aid, &res);
    7979       
    8080        if(res != EOK)
    81                 return (int) res;
     81                return (errno_t) res;
    8282       
    8383        return rc;
     
    100100        size_t count;
    101101       
    102         int rc = inetcfg_get_link_list(&link_list, &count);
     102        errno_t rc = inetcfg_get_link_list(&link_list, &count);
    103103        if (rc != EOK)
    104104                return -1;
     
    126126 *
    127127 */
    128 int ieee80211_connect(async_sess_t *dev_sess, char *ssid_start, char *password)
     128errno_t ieee80211_connect(async_sess_t *dev_sess, char *ssid_start, char *password)
    129129{
    130130        assert(ssid_start);
    131131       
    132         int rc_orig;
     132        errno_t rc_orig;
    133133       
    134134        async_exch_t *exch = async_exchange_begin(dev_sess);
     
    137137            IEEE80211_CONNECT, NULL);
    138138       
    139         int rc = async_data_write_start(exch, ssid_start,
     139        errno_t rc = async_data_write_start(exch, ssid_start,
    140140            str_size(ssid_start) + 1);
    141141        if (rc != EOK) {
     
    144144               
    145145                if (rc_orig == EOK)
    146                         return (int) rc;
    147                
    148                 return (int) rc_orig;
     146                        return (errno_t) rc;
     147               
     148                return (errno_t) rc_orig;
    149149        }
    150150       
     
    159159               
    160160                if (rc_orig == EOK)
    161                         return (int) rc;
    162                
    163                 return (int) rc_orig;
     161                        return (errno_t) rc;
     162               
     163                return (errno_t) rc_orig;
    164164        }
    165165       
     
    182182        rc = dhcp_discover(link_id);
    183183       
    184         return (int) rc;
     184        return (errno_t) rc;
    185185}
    186186
     
    193193 *
    194194 */
    195 int ieee80211_disconnect(async_sess_t *dev_sess)
     195errno_t ieee80211_disconnect(async_sess_t *dev_sess)
    196196{
    197197        async_exch_t *exch = async_exchange_begin(dev_sess);
    198         int rc = async_req_1_0(exch, DEV_IFACE_ID(IEEE80211_DEV_IFACE),
     198        errno_t rc = async_req_1_0(exch, DEV_IFACE_ID(IEEE80211_DEV_IFACE),
    199199            IEEE80211_DISCONNECT);
    200200        async_exchange_end(exch);
     
    278278        bool now = IPC_GET_ARG2(*call);
    279279       
    280         int rc = ieee80211_iface->get_scan_results(fun, &scan_results, now);
     280        errno_t rc = ieee80211_iface->get_scan_results(fun, &scan_results, now);
    281281        if (rc == EOK) {
    282282                ipc_callid_t data_callid;
     
    324324        }
    325325       
    326         int rc = async_data_write_finalize(data_callid, ssid_start, len);
     326        errno_t rc = async_data_write_finalize(data_callid, ssid_start, len);
    327327        if (rc != EOK) {
    328328                async_answer_0(data_callid, EINVAL);
     
    360360        ieee80211_iface_t *ieee80211_iface = (ieee80211_iface_t *) iface;
    361361        assert(ieee80211_iface->disconnect);
    362         int rc = ieee80211_iface->disconnect(fun);
     362        errno_t rc = ieee80211_iface->disconnect(fun);
    363363        async_answer_0(callid, rc);
    364364}
  • uspace/lib/drv/generic/remote_led_dev.c

    r132ab5d1 r5a6cc679  
    7777        }
    7878       
    79         int rc = (*led_dev_ops->color_set)(fun, color);
     79        errno_t rc = (*led_dev_ops->color_set)(fun, color);
    8080        async_answer_0(callid, rc);
    8181}
  • uspace/lib/drv/generic/remote_nic.c

    r132ab5d1 r5a6cc679  
    9898 *
    9999 */
    100 int nic_send_frame(async_sess_t *dev_sess, void *data, size_t size)
     100errno_t nic_send_frame(async_sess_t *dev_sess, void *data, size_t size)
    101101{
    102102        async_exch_t *exch = async_exchange_begin(dev_sess);
     
    105105        aid_t req = async_send_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    106106            NIC_SEND_MESSAGE, &answer);
    107         int retval = async_data_write_start(exch, data, size);
     107        errno_t retval = async_data_write_start(exch, data, size);
    108108       
    109109        async_exchange_end(exch);
     
    126126 *
    127127 */
    128 int nic_callback_create(async_sess_t *dev_sess, async_port_handler_t cfun,
     128errno_t nic_callback_create(async_sess_t *dev_sess, async_port_handler_t cfun,
    129129    void *carg)
    130130{
    131131        ipc_call_t answer;
    132         int rc;
    133         int retval;
     132        errno_t rc;
     133        errno_t retval;
    134134       
    135135        async_exch_t *exch = async_exchange_begin(dev_sess);
     
    158158 *
    159159 */
    160 int nic_get_state(async_sess_t *dev_sess, nic_device_state_t *state)
     160errno_t nic_get_state(async_sess_t *dev_sess, nic_device_state_t *state)
    161161{
    162162        assert(state);
     
    165165       
    166166        async_exch_t *exch = async_exchange_begin(dev_sess);
    167         int rc = async_req_1_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     167        errno_t rc = async_req_1_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    168168            NIC_GET_STATE, &_state);
    169169        async_exchange_end(exch);
     
    182182 *
    183183 */
    184 int nic_set_state(async_sess_t *dev_sess, nic_device_state_t state)
    185 {
    186         async_exch_t *exch = async_exchange_begin(dev_sess);
    187         int rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     184errno_t nic_set_state(async_sess_t *dev_sess, nic_device_state_t state)
     185{
     186        async_exch_t *exch = async_exchange_begin(dev_sess);
     187        errno_t rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    188188            NIC_SET_STATE, state);
    189189        async_exchange_end(exch);
     
    200200 *
    201201 */
    202 int nic_get_address(async_sess_t *dev_sess, nic_address_t *address)
     202errno_t nic_get_address(async_sess_t *dev_sess, nic_address_t *address)
    203203{
    204204        assert(address);
     
    207207        aid_t aid = async_send_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    208208            NIC_GET_ADDRESS, NULL);
    209         int rc = async_data_read_start(exch, address, sizeof(nic_address_t));
    210         async_exchange_end(exch);
    211        
    212         int res;
     209        errno_t rc = async_data_read_start(exch, address, sizeof(nic_address_t));
     210        async_exchange_end(exch);
     211       
     212        errno_t res;
    213213        async_wait_for(aid, &res);
    214214       
     
    227227 *
    228228 */
    229 int nic_set_address(async_sess_t *dev_sess, const nic_address_t *address)
     229errno_t nic_set_address(async_sess_t *dev_sess, const nic_address_t *address)
    230230{
    231231        assert(address);
     
    234234        aid_t aid = async_send_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    235235            NIC_SET_ADDRESS, NULL);
    236         int rc = async_data_write_start(exch, address, sizeof(nic_address_t));
    237         async_exchange_end(exch);
    238        
    239         int res;
     236        errno_t rc = async_data_write_start(exch, address, sizeof(nic_address_t));
     237        async_exchange_end(exch);
     238       
     239        errno_t res;
    240240        async_wait_for(aid, &res);
    241241       
     
    254254 *
    255255 */
    256 int nic_get_stats(async_sess_t *dev_sess, nic_device_stats_t *stats)
     256errno_t nic_get_stats(async_sess_t *dev_sess, nic_device_stats_t *stats)
    257257{
    258258        assert(stats);
     
    260260        async_exch_t *exch = async_exchange_begin(dev_sess);
    261261       
    262         int rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     262        errno_t rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    263263            NIC_GET_STATS);
    264264        if (rc != EOK) {
     
    284284 *
    285285 */
    286 int nic_get_device_info(async_sess_t *dev_sess, nic_device_info_t *device_info)
     286errno_t nic_get_device_info(async_sess_t *dev_sess, nic_device_info_t *device_info)
    287287{
    288288        assert(device_info);
     
    292292        aid_t aid = async_send_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    293293            NIC_GET_DEVICE_INFO, NULL);
    294         int rc = async_data_read_start(exch, device_info, sizeof(nic_device_info_t));
    295         async_exchange_end(exch);
    296 
    297         int res;
     294        errno_t rc = async_data_read_start(exch, device_info, sizeof(nic_device_info_t));
     295        async_exchange_end(exch);
     296
     297        errno_t res;
    298298        async_wait_for(aid, &res);
    299299       
     
    312312 *
    313313 */
    314 int nic_get_cable_state(async_sess_t *dev_sess, nic_cable_state_t *cable_state)
     314errno_t nic_get_cable_state(async_sess_t *dev_sess, nic_cable_state_t *cable_state)
    315315{
    316316        assert(cable_state);
     
    319319       
    320320        async_exch_t *exch = async_exchange_begin(dev_sess);
    321         int rc = async_req_1_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     321        errno_t rc = async_req_1_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    322322            NIC_GET_CABLE_STATE, &_cable_state);
    323323        async_exchange_end(exch);
     
    338338 *
    339339 */
    340 int nic_get_operation_mode(async_sess_t *dev_sess, int *speed,
     340errno_t nic_get_operation_mode(async_sess_t *dev_sess, int *speed,
    341341   nic_channel_mode_t *duplex, nic_role_t *role)
    342342{
     
    346346       
    347347        async_exch_t *exch = async_exchange_begin(dev_sess);
    348         int rc = async_req_1_3(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     348        errno_t rc = async_req_1_3(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    349349            NIC_GET_OPERATION_MODE, &_speed, &_duplex, &_role);
    350350        async_exchange_end(exch);
     
    375375 *
    376376 */
    377 int nic_set_operation_mode(async_sess_t *dev_sess, int speed,
     377errno_t nic_set_operation_mode(async_sess_t *dev_sess, int speed,
    378378    nic_channel_mode_t duplex, nic_role_t role)
    379379{
    380380        async_exch_t *exch = async_exchange_begin(dev_sess);
    381         int rc = async_req_4_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     381        errno_t rc = async_req_4_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    382382            NIC_SET_OPERATION_MODE, (sysarg_t) speed, (sysarg_t) duplex,
    383383            (sysarg_t) role);
     
    400400 *
    401401 */
    402 int nic_autoneg_enable(async_sess_t *dev_sess, uint32_t advertisement)
    403 {
    404         async_exch_t *exch = async_exchange_begin(dev_sess);
    405         int rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     402errno_t nic_autoneg_enable(async_sess_t *dev_sess, uint32_t advertisement)
     403{
     404        async_exch_t *exch = async_exchange_begin(dev_sess);
     405        errno_t rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    406406            NIC_AUTONEG_ENABLE, (sysarg_t) advertisement);
    407407        async_exchange_end(exch);
     
    417417 *
    418418 */
    419 int nic_autoneg_disable(async_sess_t *dev_sess)
    420 {
    421         async_exch_t *exch = async_exchange_begin(dev_sess);
    422         int rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     419errno_t nic_autoneg_disable(async_sess_t *dev_sess)
     420{
     421        async_exch_t *exch = async_exchange_begin(dev_sess);
     422        errno_t rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    423423            NIC_AUTONEG_DISABLE);
    424424        async_exchange_end(exch);
     
    444444 *
    445445 */
    446 int nic_autoneg_probe(async_sess_t *dev_sess, uint32_t *our_advertisement,
     446errno_t nic_autoneg_probe(async_sess_t *dev_sess, uint32_t *our_advertisement,
    447447    uint32_t *their_advertisement, nic_result_t *result,
    448448    nic_result_t *their_result)
     
    454454       
    455455        async_exch_t *exch = async_exchange_begin(dev_sess);
    456         int rc = async_req_1_4(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     456        errno_t rc = async_req_1_4(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    457457            NIC_AUTONEG_PROBE, &_our_advertisement, &_their_advertisement,
    458458            &_result, &_their_result);
     
    481481 *
    482482 */
    483 int nic_autoneg_restart(async_sess_t *dev_sess)
    484 {
    485         async_exch_t *exch = async_exchange_begin(dev_sess);
    486         int rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     483errno_t nic_autoneg_restart(async_sess_t *dev_sess)
     484{
     485        async_exch_t *exch = async_exchange_begin(dev_sess);
     486        errno_t rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    487487            NIC_AUTONEG_RESTART);
    488488        async_exchange_end(exch);
     
    501501 *
    502502 */
    503 int nic_get_pause(async_sess_t *dev_sess, nic_result_t *we_send,
     503errno_t nic_get_pause(async_sess_t *dev_sess, nic_result_t *we_send,
    504504    nic_result_t *we_receive, uint16_t *pause)
    505505{
     
    509509       
    510510        async_exch_t *exch = async_exchange_begin(dev_sess);
    511         int rc = async_req_1_3(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     511        errno_t rc = async_req_1_3(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    512512            NIC_GET_PAUSE, &_we_send, &_we_receive, &_pause);
    513513        async_exchange_end(exch);
     
    539539 *
    540540 */
    541 int nic_set_pause(async_sess_t *dev_sess, int allow_send, int allow_receive,
     541errno_t nic_set_pause(async_sess_t *dev_sess, int allow_send, int allow_receive,
    542542    uint16_t pause)
    543543{
    544544        async_exch_t *exch = async_exchange_begin(dev_sess);
    545         int rc = async_req_4_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     545        errno_t rc = async_req_4_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    546546            NIC_SET_PAUSE, allow_send, allow_receive, pause);
    547547        async_exchange_end(exch);
     
    566566 *
    567567 */
    568 int nic_unicast_get_mode(async_sess_t *dev_sess, nic_unicast_mode_t *mode,
     568errno_t nic_unicast_get_mode(async_sess_t *dev_sess, nic_unicast_mode_t *mode,
    569569    size_t max_count, nic_address_t *address_list, size_t *address_count)
    570570{
     
    579579        async_exch_t *exch = async_exchange_begin(dev_sess);
    580580       
    581         int rc = async_req_2_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     581        errno_t rc = async_req_2_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    582582            NIC_UNICAST_GET_MODE, max_count, &_mode, &_address_count);
    583583        if (rc != EOK) {
     
    609609 *
    610610 */
    611 int nic_unicast_set_mode(async_sess_t *dev_sess, nic_unicast_mode_t mode,
     611errno_t nic_unicast_set_mode(async_sess_t *dev_sess, nic_unicast_mode_t mode,
    612612    const nic_address_t *address_list, size_t address_count)
    613613{
     
    620620            NIC_UNICAST_SET_MODE, (sysarg_t) mode, address_count, NULL);
    621621       
    622         int rc;
     622        errno_t rc;
    623623        if (address_count)
    624624                rc = async_data_write_start(exch, address_list,
     
    629629        async_exchange_end(exch);
    630630       
    631         int res;
     631        errno_t res;
    632632        async_wait_for(message_id, &res);
    633633       
     
    655655 *
    656656 */
    657 int nic_multicast_get_mode(async_sess_t *dev_sess, nic_multicast_mode_t *mode,
     657errno_t nic_multicast_get_mode(async_sess_t *dev_sess, nic_multicast_mode_t *mode,
    658658    size_t max_count, nic_address_t *address_list, size_t *address_count)
    659659{
     
    668668       
    669669        sysarg_t ac;
    670         int rc = async_req_2_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     670        errno_t rc = async_req_2_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    671671            NIC_MULTICAST_GET_MODE, max_count, &_mode, &ac);
    672672        if (rc != EOK) {
     
    697697 *
    698698 */
    699 int nic_multicast_set_mode(async_sess_t *dev_sess, nic_multicast_mode_t mode,
     699errno_t nic_multicast_set_mode(async_sess_t *dev_sess, nic_multicast_mode_t mode,
    700700    const nic_address_t *address_list, size_t address_count)
    701701{
     
    708708            NIC_MULTICAST_SET_MODE, (sysarg_t) mode, address_count, NULL);
    709709       
    710         int rc;
     710        errno_t rc;
    711711        if (address_count)
    712712                rc = async_data_write_start(exch, address_list,
     
    717717        async_exchange_end(exch);
    718718       
    719         int res;
     719        errno_t res;
    720720        async_wait_for(message_id, &res);
    721721       
     
    734734 *
    735735 */
    736 int nic_broadcast_get_mode(async_sess_t *dev_sess, nic_broadcast_mode_t *mode)
     736errno_t nic_broadcast_get_mode(async_sess_t *dev_sess, nic_broadcast_mode_t *mode)
    737737{
    738738        assert(mode);
     
    741741       
    742742        async_exch_t *exch = async_exchange_begin(dev_sess);
    743         int rc = async_req_1_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     743        errno_t rc = async_req_1_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    744744            NIC_BROADCAST_GET_MODE, &_mode);
    745745        async_exchange_end(exch);
     
    758758 *
    759759 */
    760 int nic_broadcast_set_mode(async_sess_t *dev_sess, nic_broadcast_mode_t mode)
    761 {
    762         async_exch_t *exch = async_exchange_begin(dev_sess);
    763         int rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     760errno_t nic_broadcast_set_mode(async_sess_t *dev_sess, nic_broadcast_mode_t mode)
     761{
     762        async_exch_t *exch = async_exchange_begin(dev_sess);
     763        errno_t rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    764764            NIC_BROADCAST_SET_MODE, mode);
    765765        async_exchange_end(exch);
     
    776776 *
    777777 */
    778 int nic_defective_get_mode(async_sess_t *dev_sess, uint32_t *mode)
     778errno_t nic_defective_get_mode(async_sess_t *dev_sess, uint32_t *mode)
    779779{
    780780        assert(mode);
     
    783783       
    784784        async_exch_t *exch = async_exchange_begin(dev_sess);
    785         int rc = async_req_1_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     785        errno_t rc = async_req_1_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    786786            NIC_DEFECTIVE_GET_MODE, &_mode);
    787787        async_exchange_end(exch);
     
    800800 *
    801801 */
    802 int nic_defective_set_mode(async_sess_t *dev_sess, uint32_t mode)
    803 {
    804         async_exch_t *exch = async_exchange_begin(dev_sess);
    805         int rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     802errno_t nic_defective_set_mode(async_sess_t *dev_sess, uint32_t mode)
     803{
     804        async_exch_t *exch = async_exchange_begin(dev_sess);
     805        errno_t rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    806806            NIC_DEFECTIVE_SET_MODE, mode);
    807807        async_exchange_end(exch);
     
    822822 *
    823823 */
    824 int nic_blocked_sources_get(async_sess_t *dev_sess, size_t max_count,
     824errno_t nic_blocked_sources_get(async_sess_t *dev_sess, size_t max_count,
    825825    nic_address_t *address_list, size_t *address_count)
    826826{
     
    831831       
    832832        sysarg_t ac;
    833         int rc = async_req_2_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     833        errno_t rc = async_req_2_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    834834            NIC_BLOCKED_SOURCES_GET, max_count, &ac);
    835835        if (rc != EOK) {
     
    858858 *
    859859 */
    860 int nic_blocked_sources_set(async_sess_t *dev_sess,
     860errno_t nic_blocked_sources_set(async_sess_t *dev_sess,
    861861    const nic_address_t *address_list, size_t address_count)
    862862{
     
    869869            NIC_BLOCKED_SOURCES_SET, address_count, NULL);
    870870       
    871         int rc;
     871        errno_t rc;
    872872        if (address_count)
    873873                rc = async_data_write_start(exch, address_list,
     
    878878        async_exchange_end(exch);
    879879       
    880         int res;
     880        errno_t res;
    881881        async_wait_for(message_id, &res);
    882882       
     
    895895 *
    896896 */
    897 int nic_vlan_get_mask(async_sess_t *dev_sess, nic_vlan_mask_t *mask)
     897errno_t nic_vlan_get_mask(async_sess_t *dev_sess, nic_vlan_mask_t *mask)
    898898{
    899899        assert(mask);
    900900       
    901901        async_exch_t *exch = async_exchange_begin(dev_sess);
    902         int rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     902        errno_t rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    903903            NIC_VLAN_GET_MASK);
    904904        if (rc != EOK) {
     
    923923 *
    924924 */
    925 int nic_vlan_set_mask(async_sess_t *dev_sess, const nic_vlan_mask_t *mask)
     925errno_t nic_vlan_set_mask(async_sess_t *dev_sess, const nic_vlan_mask_t *mask)
    926926{
    927927        async_exch_t *exch = async_exchange_begin(dev_sess);
     
    930930            NIC_VLAN_SET_MASK, mask != NULL, NULL);
    931931       
    932         int rc;
     932        errno_t rc;
    933933        if (mask != NULL)
    934934                rc = async_data_write_start(exch, mask, sizeof(nic_vlan_mask_t));
     
    938938        async_exchange_end(exch);
    939939       
    940         int res;
     940        errno_t res;
    941941        async_wait_for(message_id, &res);
    942942       
     
    963963 *
    964964 */
    965 int nic_vlan_set_tag(async_sess_t *dev_sess, uint16_t tag, bool add, bool strip)
    966 {
    967         async_exch_t *exch = async_exchange_begin(dev_sess);
    968         int rc = async_req_4_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     965errno_t nic_vlan_set_tag(async_sess_t *dev_sess, uint16_t tag, bool add, bool strip)
     966{
     967        async_exch_t *exch = async_exchange_begin(dev_sess);
     968        errno_t rc = async_req_4_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    969969            NIC_VLAN_SET_TAG, (sysarg_t) tag, (sysarg_t) add, (sysarg_t) strip);
    970970        async_exchange_end(exch);
     
    985985 *
    986986 */
    987 int nic_wol_virtue_add(async_sess_t *dev_sess, nic_wv_type_t type,
     987errno_t nic_wol_virtue_add(async_sess_t *dev_sess, nic_wv_type_t type,
    988988    const void *data, size_t length, nic_wv_id_t *id)
    989989{
     
    997997            NIC_WOL_VIRTUE_ADD, (sysarg_t) type, send_data, &result);
    998998       
    999         int res;
     999        errno_t res;
    10001000        if (send_data) {
    1001                 int rc = async_data_write_start(exch, data, length);
     1001                errno_t rc = async_data_write_start(exch, data, length);
    10021002                if (rc != EOK) {
    10031003                        async_exchange_end(exch);
     
    10221022 *
    10231023 */
    1024 int nic_wol_virtue_remove(async_sess_t *dev_sess, nic_wv_id_t id)
    1025 {
    1026         async_exch_t *exch = async_exchange_begin(dev_sess);
    1027         int rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     1024errno_t nic_wol_virtue_remove(async_sess_t *dev_sess, nic_wv_id_t id)
     1025{
     1026        async_exch_t *exch = async_exchange_begin(dev_sess);
     1027        errno_t rc = async_req_2_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    10281028            NIC_WOL_VIRTUE_REMOVE, (sysarg_t) id);
    10291029        async_exchange_end(exch);
     
    10451045 *
    10461046 */
    1047 int nic_wol_virtue_probe(async_sess_t *dev_sess, nic_wv_id_t id,
     1047errno_t nic_wol_virtue_probe(async_sess_t *dev_sess, nic_wv_id_t id,
    10481048    nic_wv_type_t *type, size_t max_length, void *data, size_t *length)
    10491049{
     
    10561056        async_exch_t *exch = async_exchange_begin(dev_sess);
    10571057       
    1058         int rc = async_req_3_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     1058        errno_t rc = async_req_3_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    10591059            NIC_WOL_VIRTUE_PROBE, (sysarg_t) id, max_length,
    10601060            &_type, &_length);
     
    10951095 *
    10961096 */
    1097 int nic_wol_virtue_list(async_sess_t *dev_sess, nic_wv_type_t type,
     1097errno_t nic_wol_virtue_list(async_sess_t *dev_sess, nic_wv_type_t type,
    10981098    size_t max_count, nic_wv_id_t *id_list, size_t *id_count)
    10991099{
     
    11041104       
    11051105        sysarg_t count;
    1106         int rc = async_req_3_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     1106        errno_t rc = async_req_3_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    11071107            NIC_WOL_VIRTUE_LIST, (sysarg_t) type, max_count, &count);
    11081108       
     
    11351135 *
    11361136 */
    1137 int nic_wol_virtue_get_caps(async_sess_t *dev_sess, nic_wv_type_t type,
     1137errno_t nic_wol_virtue_get_caps(async_sess_t *dev_sess, nic_wv_type_t type,
    11381138    int *count)
    11391139{
     
    11431143       
    11441144        async_exch_t *exch = async_exchange_begin(dev_sess);
    1145         int rc = async_req_2_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     1145        errno_t rc = async_req_2_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    11461146            NIC_WOL_VIRTUE_GET_CAPS, (sysarg_t) type, &_count);
    11471147        async_exchange_end(exch);
     
    11731173 *
    11741174 */
    1175 int nic_wol_load_info(async_sess_t *dev_sess, nic_wv_type_t *matched_type,
     1175errno_t nic_wol_load_info(async_sess_t *dev_sess, nic_wv_type_t *matched_type,
    11761176    size_t max_length, uint8_t *frame, size_t *frame_length)
    11771177{
     
    11861186        async_exch_t *exch = async_exchange_begin(dev_sess);
    11871187       
    1188         int rc = async_req_2_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     1188        errno_t rc = async_req_2_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    11891189            NIC_WOL_LOAD_INFO, max_length, &_matched_type, &_frame_length);
    11901190        if (rc != EOK) {
     
    12131213 *
    12141214 */
    1215 int nic_offload_probe(async_sess_t *dev_sess, uint32_t *supported,
     1215errno_t nic_offload_probe(async_sess_t *dev_sess, uint32_t *supported,
    12161216    uint32_t *active)
    12171217{
     
    12231223       
    12241224        async_exch_t *exch = async_exchange_begin(dev_sess);
    1225         int rc = async_req_1_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     1225        errno_t rc = async_req_1_2(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    12261226            NIC_OFFLOAD_PROBE, &_supported, &_active);
    12271227        async_exchange_end(exch);
     
    12411241 *
    12421242 */
    1243 int nic_offload_set(async_sess_t *dev_sess, uint32_t mask, uint32_t active)
    1244 {
    1245         async_exch_t *exch = async_exchange_begin(dev_sess);
    1246         int rc = async_req_3_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     1243errno_t nic_offload_set(async_sess_t *dev_sess, uint32_t mask, uint32_t active)
     1244{
     1245        async_exch_t *exch = async_exchange_begin(dev_sess);
     1246        errno_t rc = async_req_3_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    12471247            NIC_AUTONEG_RESTART, (sysarg_t) mask, (sysarg_t) active);
    12481248        async_exchange_end(exch);
     
    12611261 *
    12621262 */
    1263 int nic_poll_get_mode(async_sess_t *dev_sess, nic_poll_mode_t *mode,
     1263errno_t nic_poll_get_mode(async_sess_t *dev_sess, nic_poll_mode_t *mode,
    12641264    struct timeval *period)
    12651265{
     
    12701270        async_exch_t *exch = async_exchange_begin(dev_sess);
    12711271       
    1272         int rc = async_req_2_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
     1272        errno_t rc = async_req_2_1(exch, DEV_IFACE_ID(NIC_DEV_IFACE),
    12731273            NIC_POLL_GET_MODE, period != NULL, &_mode);
    12741274        if (rc != EOK) {
     
    12951295 *
    12961296 */
    1297 int nic_poll_set_mode(async_sess_t *dev_sess, nic_poll_mode_t mode,
     1297errno_t nic_poll_set_mode(async_sess_t *dev_sess, nic_poll_mode_t mode,
    12981298    const struct timeval *period)
    12991299{
     
    13031303            NIC_POLL_SET_MODE, (sysarg_t) mode, period != NULL, NULL);
    13041304       
    1305         int rc;
     1305        errno_t rc;
    13061306        if (period)
    13071307                rc = async_data_write_start(exch, period, sizeof(struct timeval));
     
    13111311        async_exchange_end(exch);
    13121312       
    1313         int res;
     1313        errno_t res;
    13141314        async_wait_for(message_id, &res);
    13151315       
     
    13271327 *
    13281328 */
    1329 int nic_poll_now(async_sess_t *dev_sess)
    1330 {
    1331         async_exch_t *exch = async_exchange_begin(dev_sess);
    1332         int rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE), NIC_POLL_NOW);
     1329errno_t nic_poll_now(async_sess_t *dev_sess)
     1330{
     1331        async_exch_t *exch = async_exchange_begin(dev_sess);
     1332        errno_t rc = async_req_1_0(exch, DEV_IFACE_ID(NIC_DEV_IFACE), NIC_POLL_NOW);
    13331333        async_exchange_end(exch);
    13341334       
     
    13441344        void *data;
    13451345        size_t size;
    1346         int rc;
     1346        errno_t rc;
    13471347       
    13481348        rc = async_data_write_accept(&data, false, 0, 0, 0, &size);
     
    13631363        assert(nic_iface->callback_create);
    13641364       
    1365         int rc = nic_iface->callback_create(dev);
     1365        errno_t rc = nic_iface->callback_create(dev);
    13661366        async_answer_0(callid, rc);
    13671367}
     
    13751375        nic_device_state_t state = NIC_STATE_MAX;
    13761376       
    1377         int rc = nic_iface->get_state(dev, &state);
     1377        errno_t rc = nic_iface->get_state(dev, &state);
    13781378        async_answer_1(callid, rc, state);
    13791379}
     
    13871387        nic_device_state_t state = (nic_device_state_t) IPC_GET_ARG2(*call);
    13881388       
    1389         int rc = nic_iface->set_state(dev, state);
     1389        errno_t rc = nic_iface->set_state(dev, state);
    13901390        async_answer_0(callid, rc);
    13911391}
     
    14001400        memset(&address, 0, sizeof(nic_address_t));
    14011401       
    1402         int rc = nic_iface->get_address(dev, &address);
     1402        errno_t rc = nic_iface->get_address(dev, &address);
    14031403        if (rc == EOK) {
    14041404                size_t max_len;
     
    14511451       
    14521452        if (nic_iface->set_address != NULL) {
    1453                 int rc = nic_iface->set_address(dev, &address);
     1453                errno_t rc = nic_iface->set_address(dev, &address);
    14541454                async_answer_0(callid, rc);
    14551455        } else
     
    14691469        memset(&stats, 0, sizeof(nic_device_stats_t));
    14701470       
    1471         int rc = nic_iface->get_stats(dev, &stats);
     1471        errno_t rc = nic_iface->get_stats(dev, &stats);
    14721472        if (rc == EOK) {
    14731473                ipc_callid_t data_callid;
     
    15041504        memset(&info, 0, sizeof(nic_device_info_t));
    15051505       
    1506         int rc = nic_iface->get_device_info(dev, &info);
     1506        errno_t rc = nic_iface->get_device_info(dev, &info);
    15071507        if (rc == EOK) {
    15081508                ipc_callid_t data_callid;
     
    15381538        nic_cable_state_t cs = NIC_CS_UNKNOWN;
    15391539       
    1540         int rc = nic_iface->get_cable_state(dev, &cs);
     1540        errno_t rc = nic_iface->get_cable_state(dev, &cs);
    15411541        async_answer_1(callid, rc, (sysarg_t) cs);
    15421542}
     
    15551555        nic_role_t role = NIC_ROLE_UNKNOWN;
    15561556       
    1557         int rc = nic_iface->get_operation_mode(dev, &speed, &duplex, &role);
     1557        errno_t rc = nic_iface->get_operation_mode(dev, &speed, &duplex, &role);
    15581558        async_answer_3(callid, rc, (sysarg_t) speed, (sysarg_t) duplex,
    15591559            (sysarg_t) role);
     
    15731573        nic_role_t role = (nic_role_t) IPC_GET_ARG4(*call);
    15741574       
    1575         int rc = nic_iface->set_operation_mode(dev, speed, duplex, role);
     1575        errno_t rc = nic_iface->set_operation_mode(dev, speed, duplex, role);
    15761576        async_answer_0(callid, rc);
    15771577}
     
    15881588        uint32_t advertisement = (uint32_t) IPC_GET_ARG2(*call);
    15891589       
    1590         int rc = nic_iface->autoneg_enable(dev, advertisement);
     1590        errno_t rc = nic_iface->autoneg_enable(dev, advertisement);
    15911591        async_answer_0(callid, rc);
    15921592}
     
    16011601        }
    16021602       
    1603         int rc = nic_iface->autoneg_disable(dev);
     1603        errno_t rc = nic_iface->autoneg_disable(dev);
    16041604        async_answer_0(callid, rc);
    16051605}
     
    16191619        nic_result_t their_result = NIC_RESULT_NOT_AVAILABLE;
    16201620       
    1621         int rc = nic_iface->autoneg_probe(dev, &our_adv, &their_adv, &result,
     1621        errno_t rc = nic_iface->autoneg_probe(dev, &our_adv, &their_adv, &result,
    16221622            &their_result);
    16231623        async_answer_4(callid, rc, our_adv, their_adv, (sysarg_t) result,
     
    16341634        }
    16351635       
    1636         int rc = nic_iface->autoneg_restart(dev);
     1636        errno_t rc = nic_iface->autoneg_restart(dev);
    16371637        async_answer_0(callid, rc);
    16381638}
     
    16511651        uint16_t pause;
    16521652       
    1653         int rc = nic_iface->get_pause(dev, &we_send, &we_receive, &pause);
     1653        errno_t rc = nic_iface->get_pause(dev, &we_send, &we_receive, &pause);
    16541654        async_answer_3(callid, rc, we_send, we_receive, pause);
    16551655}
     
    16681668        uint16_t pause = (uint16_t) IPC_GET_ARG4(*call);
    16691669       
    1670         int rc = nic_iface->set_pause(dev, allow_send, allow_receive,
     1670        errno_t rc = nic_iface->set_pause(dev, allow_send, allow_receive,
    16711671            pause);
    16721672        async_answer_0(callid, rc);
     
    16971697        size_t address_count = 0;
    16981698       
    1699         int rc = nic_iface->unicast_get_mode(dev, &mode, max_count, address_list,
     1699        errno_t rc = nic_iface->unicast_get_mode(dev, &mode, max_count, address_list,
    17001700            &address_count);
    17011701       
     
    17681768       
    17691769        if (nic_iface->unicast_set_mode != NULL) {
    1770                 int rc = nic_iface->unicast_set_mode(dev, mode, address_list,
     1770                errno_t rc = nic_iface->unicast_set_mode(dev, mode, address_list,
    17711771                    address_count);
    17721772                async_answer_0(callid, rc);
     
    18011801        size_t address_count = 0;
    18021802       
    1803         int rc = nic_iface->multicast_get_mode(dev, &mode, max_count, address_list,
     1803        errno_t rc = nic_iface->multicast_get_mode(dev, &mode, max_count, address_list,
    18041804            &address_count);
    18051805       
     
    18721872       
    18731873        if (nic_iface->multicast_set_mode != NULL) {
    1874                 int rc = nic_iface->multicast_set_mode(dev, mode, address_list,
     1874                errno_t rc = nic_iface->multicast_set_mode(dev, mode, address_list,
    18751875                    address_count);
    18761876                async_answer_0(callid, rc);
     
    18921892        nic_broadcast_mode_t mode = NIC_BROADCAST_ACCEPTED;
    18931893       
    1894         int rc = nic_iface->broadcast_get_mode(dev, &mode);
     1894        errno_t rc = nic_iface->broadcast_get_mode(dev, &mode);
    18951895        async_answer_1(callid, rc, mode);
    18961896}
     
    19071907        nic_broadcast_mode_t mode = IPC_GET_ARG2(*call);
    19081908       
    1909         int rc = nic_iface->broadcast_set_mode(dev, mode);
     1909        errno_t rc = nic_iface->broadcast_set_mode(dev, mode);
    19101910        async_answer_0(callid, rc);
    19111911}
     
    19221922        uint32_t mode = 0;
    19231923       
    1924         int rc = nic_iface->defective_get_mode(dev, &mode);
     1924        errno_t rc = nic_iface->defective_get_mode(dev, &mode);
    19251925        async_answer_1(callid, rc, mode);
    19261926}
     
    19371937        uint32_t mode = IPC_GET_ARG2(*call);
    19381938       
    1939         int rc = nic_iface->defective_set_mode(dev, mode);
     1939        errno_t rc = nic_iface->defective_set_mode(dev, mode);
    19401940        async_answer_0(callid, rc);
    19411941}
     
    19641964        size_t address_count = 0;
    19651965       
    1966         int rc = nic_iface->blocked_sources_get(dev, max_count, address_list,
     1966        errno_t rc = nic_iface->blocked_sources_get(dev, max_count, address_list,
    19671967            &address_count);
    19681968       
     
    20342034       
    20352035        if (nic_iface->blocked_sources_set != NULL) {
    2036                 int rc = nic_iface->blocked_sources_set(dev, address_list,
     2036                errno_t rc = nic_iface->blocked_sources_set(dev, address_list,
    20372037                    address_count);
    20382038                async_answer_0(callid, rc);
     
    20552055        memset(&vlan_mask, 0, sizeof(nic_vlan_mask_t));
    20562056       
    2057         int rc = nic_iface->vlan_get_mask(dev, &vlan_mask);
     2057        errno_t rc = nic_iface->vlan_get_mask(dev, &vlan_mask);
    20582058        if (rc == EOK) {
    20592059                ipc_callid_t data_callid;
     
    21112111       
    21122112        if (nic_iface->vlan_set_mask != NULL) {
    2113                 int rc = nic_iface->vlan_set_mask(dev, vlan_mask_pointer);
     2113                errno_t rc = nic_iface->vlan_set_mask(dev, vlan_mask_pointer);
    21142114                async_answer_0(callid, rc);
    21152115        } else
     
    21312131        bool strip = (int) IPC_GET_ARG4(*call);
    21322132       
    2133         int rc = nic_iface->vlan_set_tag(dev, tag, add, strip);
     2133        errno_t rc = nic_iface->vlan_set_tag(dev, tag, add, strip);
    21342134        async_answer_0(callid, rc);
    21352135}
     
    21802180        nic_wv_type_t type = (nic_wv_type_t) IPC_GET_ARG2(*call);
    21812181       
    2182         int rc = nic_iface->wol_virtue_add(dev, type, data, length, &id);
     2182        errno_t rc = nic_iface->wol_virtue_add(dev, type, data, length, &id);
    21832183        async_answer_1(callid, rc, (sysarg_t) id);
    21842184        free(data);
     
    21972197        nic_wv_id_t id = (nic_wv_id_t) IPC_GET_ARG2(*call);
    21982198       
    2199         int rc = nic_iface->wol_virtue_remove(dev, id);
     2199        errno_t rc = nic_iface->wol_virtue_remove(dev, id);
    22002200        async_answer_0(callid, rc);
    22012201}
     
    22282228        memset(data, 0, max_length);
    22292229       
    2230         int rc = nic_iface->wol_virtue_probe(dev, id, &type, max_length,
     2230        errno_t rc = nic_iface->wol_virtue_probe(dev, id, &type, max_length,
    22312231            data, &length);
    22322232       
     
    22782278        memset(id_list, 0, max_count * sizeof (nic_wv_id_t));
    22792279       
    2280         int rc = nic_iface->wol_virtue_list(dev, type, max_count, id_list,
     2280        errno_t rc = nic_iface->wol_virtue_list(dev, type, max_count, id_list,
    22812281            &count);
    22822282       
     
    23152315        nic_wv_type_t type = (nic_wv_type_t) IPC_GET_ARG2(*call);
    23162316       
    2317         int rc = nic_iface->wol_virtue_get_caps(dev, type, &count);
     2317        errno_t rc = nic_iface->wol_virtue_get_caps(dev, type, &count);
    23182318        async_answer_1(callid, rc, (sysarg_t) count);
    23192319}
     
    23432343        memset(data, 0, max_length);
    23442344       
    2345         int rc = nic_iface->wol_load_info(dev, &type, max_length, data,
     2345        errno_t rc = nic_iface->wol_load_info(dev, &type, max_length, data,
    23462346            &frame_length);
    23472347        if (rc == EOK) {
     
    23762376        uint32_t active = 0;
    23772377       
    2378         int rc = nic_iface->offload_probe(dev, &supported, &active);
     2378        errno_t rc = nic_iface->offload_probe(dev, &supported, &active);
    23792379        async_answer_2(callid, rc, supported, active);
    23802380}
     
    23922392        uint32_t active = (uint32_t) IPC_GET_ARG3(*call);
    23932393       
    2394         int rc = nic_iface->offload_set(dev, mask, active);
     2394        errno_t rc = nic_iface->offload_set(dev, mask, active);
    23952395        async_answer_0(callid, rc);
    23962396}
     
    24122412        };
    24132413       
    2414         int rc = nic_iface->poll_get_mode(dev, &mode, &period);
     2414        errno_t rc = nic_iface->poll_get_mode(dev, &mode, &period);
    24152415        if ((rc == EOK) && (request_data)) {
    24162416                size_t max_len;
     
    24702470       
    24712471        if (nic_iface->poll_set_mode != NULL) {
    2472                 int rc = nic_iface->poll_set_mode(dev, mode, period);
     2472                errno_t rc = nic_iface->poll_set_mode(dev, mode, period);
    24732473                async_answer_0(callid, rc);
    24742474        } else
     
    24852485        }
    24862486       
    2487         int rc = nic_iface->poll_now(dev);
     2487        errno_t rc = nic_iface->poll_now(dev);
    24882488        async_answer_0(callid, rc);
    24892489}
  • uspace/lib/drv/generic/remote_pci.c

    r132ab5d1 r5a6cc679  
    5151} pci_dev_iface_funcs_t;
    5252
    53 int pci_config_space_read_8(async_sess_t *sess, uint32_t address, uint8_t *val)
     53errno_t pci_config_space_read_8(async_sess_t *sess, uint32_t address, uint8_t *val)
    5454{
    5555        sysarg_t res = 0;
    5656       
    5757        async_exch_t *exch = async_exchange_begin(sess);
    58         int rc = async_req_2_1(exch, DEV_IFACE_ID(PCI_DEV_IFACE),
     58        errno_t rc = async_req_2_1(exch, DEV_IFACE_ID(PCI_DEV_IFACE),
    5959            IPC_M_CONFIG_SPACE_READ_8, address, &res);
    6060        async_exchange_end(exch);
     
    6464}
    6565
    66 int pci_config_space_read_16(async_sess_t *sess, uint32_t address,
     66errno_t pci_config_space_read_16(async_sess_t *sess, uint32_t address,
    6767    uint16_t *val)
    6868{
     
    7070       
    7171        async_exch_t *exch = async_exchange_begin(sess);
    72         int rc = async_req_2_1(exch, DEV_IFACE_ID(PCI_DEV_IFACE),
     72        errno_t rc = async_req_2_1(exch, DEV_IFACE_ID(PCI_DEV_IFACE),
    7373            IPC_M_CONFIG_SPACE_READ_16, address, &res);
    7474        async_exchange_end(exch);
     
    7878}
    7979
    80 int pci_config_space_read_32(async_sess_t *sess, uint32_t address,
     80errno_t pci_config_space_read_32(async_sess_t *sess, uint32_t address,
    8181    uint32_t *val)
    8282{
     
    8484       
    8585        async_exch_t *exch = async_exchange_begin(sess);
    86         int rc = async_req_2_1(exch, DEV_IFACE_ID(PCI_DEV_IFACE),
     86        errno_t rc = async_req_2_1(exch, DEV_IFACE_ID(PCI_DEV_IFACE),
    8787            IPC_M_CONFIG_SPACE_READ_32, address, &res);
    8888        async_exchange_end(exch);
     
    9292}
    9393
    94 int pci_config_space_write_8(async_sess_t *sess, uint32_t address, uint8_t val)
    95 {
    96         async_exch_t *exch = async_exchange_begin(sess);
    97         int rc = async_req_3_0(exch, DEV_IFACE_ID(PCI_DEV_IFACE),
     94errno_t pci_config_space_write_8(async_sess_t *sess, uint32_t address, uint8_t val)
     95{
     96        async_exch_t *exch = async_exchange_begin(sess);
     97        errno_t rc = async_req_3_0(exch, DEV_IFACE_ID(PCI_DEV_IFACE),
    9898            IPC_M_CONFIG_SPACE_WRITE_8, address, val);
    9999        async_exchange_end(exch);
     
    102102}
    103103
    104 int pci_config_space_write_16(async_sess_t *sess, uint32_t address,
     104errno_t pci_config_space_write_16(async_sess_t *sess, uint32_t address,
    105105    uint16_t val)
    106106{
    107107        async_exch_t *exch = async_exchange_begin(sess);
    108         int rc = async_req_3_0(exch, DEV_IFACE_ID(PCI_DEV_IFACE),
     108        errno_t rc = async_req_3_0(exch, DEV_IFACE_ID(PCI_DEV_IFACE),
    109109            IPC_M_CONFIG_SPACE_WRITE_16, address, val);
    110110        async_exchange_end(exch);
     
    113113}
    114114
    115 int pci_config_space_write_32(async_sess_t *sess, uint32_t address,
     115errno_t pci_config_space_write_32(async_sess_t *sess, uint32_t address,
    116116    uint32_t val)
    117117{
    118118        async_exch_t *exch = async_exchange_begin(sess);
    119         int rc = async_req_3_0(exch, DEV_IFACE_ID(PCI_DEV_IFACE),
     119        errno_t rc = async_req_3_0(exch, DEV_IFACE_ID(PCI_DEV_IFACE),
    120120            IPC_M_CONFIG_SPACE_WRITE_32, address, val);
    121121        async_exchange_end(exch);
     
    160160        uint32_t address = DEV_IPC_GET_ARG1(*call);
    161161        uint8_t value;
    162         int ret = pci_iface->config_space_read_8(fun, address, &value);
     162        errno_t ret = pci_iface->config_space_read_8(fun, address, &value);
    163163        if (ret != EOK) {
    164164                async_answer_0(callid, ret);
     
    178178        uint32_t address = DEV_IPC_GET_ARG1(*call);
    179179        uint16_t value;
    180         int ret = pci_iface->config_space_read_16(fun, address, &value);
     180        errno_t ret = pci_iface->config_space_read_16(fun, address, &value);
    181181        if (ret != EOK) {
    182182                async_answer_0(callid, ret);
     
    195195        uint32_t address = DEV_IPC_GET_ARG1(*call);
    196196        uint32_t value;
    197         int ret = pci_iface->config_space_read_32(fun, address, &value);
     197        errno_t ret = pci_iface->config_space_read_32(fun, address, &value);
    198198        if (ret != EOK) {
    199199                async_answer_0(callid, ret);
     
    213213        uint32_t address = DEV_IPC_GET_ARG1(*call);
    214214        uint8_t value = DEV_IPC_GET_ARG2(*call);
    215         int ret = pci_iface->config_space_write_8(fun, address, value);
     215        errno_t ret = pci_iface->config_space_write_8(fun, address, value);
    216216        if (ret != EOK) {
    217217                async_answer_0(callid, ret);
     
    231231        uint32_t address = DEV_IPC_GET_ARG1(*call);
    232232        uint16_t value = DEV_IPC_GET_ARG2(*call);
    233         int ret = pci_iface->config_space_write_16(fun, address, value);
     233        errno_t ret = pci_iface->config_space_write_16(fun, address, value);
    234234        if (ret != EOK) {
    235235                async_answer_0(callid, ret);
     
    249249        uint32_t address = DEV_IPC_GET_ARG1(*call);
    250250        uint32_t value = DEV_IPC_GET_ARG2(*call);
    251         int ret = pci_iface->config_space_write_32(fun, address, value);
     251        errno_t ret = pci_iface->config_space_write_32(fun, address, value);
    252252        if (ret != EOK) {
    253253                async_answer_0(callid, ret);
  • uspace/lib/drv/generic/remote_usb.c

    r132ab5d1 r5a6cc679  
    7070 * @return Error code.
    7171 */
    72 int usb_get_my_description(async_exch_t *exch, usb_device_desc_t *desc)
     72errno_t usb_get_my_description(async_exch_t *exch, usb_device_desc_t *desc)
    7373{
    7474        if (!exch)
     
    7777        usb_device_desc_t tmp_desc;
    7878
    79         const int ret = async_req_1_5(exch, DEV_IFACE_ID(USB_DEV_IFACE),
     79        const errno_t ret = async_req_1_5(exch, DEV_IFACE_ID(USB_DEV_IFACE),
    8080            IPC_M_USB_GET_MY_DESCRIPTION,
    8181            (sysarg_t *) &tmp_desc.address,
     
    114114
    115115        usb_device_desc_t desc;
    116         const int ret = usb_iface->get_my_description(fun, &desc);
     116        const errno_t ret = usb_iface->get_my_description(fun, &desc);
    117117        if (ret != EOK) {
    118118                async_answer_0(callid, ret);
  • uspace/lib/drv/generic/remote_usbhc.c

    r132ab5d1 r5a6cc679  
    104104 *
    105105 */
    106 int usbhc_device_remove(async_exch_t *exch, unsigned port)
     106errno_t usbhc_device_remove(async_exch_t *exch, unsigned port)
    107107{
    108108        if (!exch)
     
    112112}
    113113
    114 int usbhc_register_endpoint(async_exch_t *exch, usb_pipe_desc_t *pipe_desc,
     114errno_t usbhc_register_endpoint(async_exch_t *exch, usb_pipe_desc_t *pipe_desc,
    115115    const usb_endpoint_descriptors_t *desc)
    116116{
     
    153153}
    154154
    155 int usbhc_unregister_endpoint(async_exch_t *exch, const usb_pipe_desc_t *pipe_desc)
     155errno_t usbhc_unregister_endpoint(async_exch_t *exch, const usb_pipe_desc_t *pipe_desc)
    156156{
    157157        if (!exch)
     
    178178}
    179179
    180 int usbhc_read(async_exch_t *exch, usb_endpoint_t endpoint, uint64_t setup,
     180errno_t usbhc_read(async_exch_t *exch, usb_endpoint_t endpoint, uint64_t setup,
    181181    void *data, size_t size, size_t *rec_size)
    182182{
     
    208208
    209209        /* Wait for the answer. */
    210         int data_request_rc;
    211         int opening_request_rc;
     210        errno_t data_request_rc;
     211        errno_t opening_request_rc;
    212212        async_wait_for(data_request, &data_request_rc);
    213213        async_wait_for(opening_request, &opening_request_rc);
     
    216216                /* Prefer the return code of the opening request. */
    217217                if (opening_request_rc != EOK) {
    218                         return (int) opening_request_rc;
     218                        return (errno_t) opening_request_rc;
    219219                } else {
    220                         return (int) data_request_rc;
     220                        return (errno_t) data_request_rc;
    221221                }
    222222        }
    223223        if (opening_request_rc != EOK) {
    224                 return (int) opening_request_rc;
     224                return (errno_t) opening_request_rc;
    225225        }
    226226
     
    229229}
    230230
    231 int usbhc_write(async_exch_t *exch, usb_endpoint_t endpoint, uint64_t setup,
     231errno_t usbhc_write(async_exch_t *exch, usb_endpoint_t endpoint, uint64_t setup,
    232232    const void *data, size_t size)
    233233{
     
    248248        /* Send the data if any. */
    249249        if (size > 0) {
    250                 const int ret = async_data_write_start(exch, data, size);
     250                const errno_t ret = async_data_write_start(exch, data, size);
    251251                if (ret != EOK) {
    252252                        async_forget(opening_request);
     
    256256
    257257        /* Wait for the answer. */
    258         int opening_request_rc;
     258        errno_t opening_request_rc;
    259259        async_wait_for(opening_request, &opening_request_rc);
    260260
    261         return (int) opening_request_rc;
     261        return (errno_t) opening_request_rc;
    262262}
    263263
     
    433433}
    434434
    435 static int callback_out(void *arg, int error, size_t transferred_size)
     435static errno_t callback_out(void *arg, int error, size_t transferred_size)
    436436{
    437437        async_transaction_t *trans = arg;
    438438
    439         const int err = async_answer_0(trans->caller, error);
     439        const errno_t err = async_answer_0(trans->caller, error);
    440440
    441441        async_transaction_destroy(trans);
     
    444444}
    445445
    446 static int callback_in(void *arg, int error, size_t transferred_size)
     446static errno_t callback_in(void *arg, int error, size_t transferred_size)
    447447{
    448448        async_transaction_t *trans = arg;
     
    457457        }
    458458
    459         const int err = async_answer_0(trans->caller, error);
     459        const errno_t err = async_answer_0(trans->caller, error);
    460460        async_transaction_destroy(trans);
    461461        return err;
     
    507507        }};
    508508
    509         const int rc = usbhc_iface->read(
     509        const errno_t rc = usbhc_iface->read(
    510510            fun, target, setup, trans->buffer, size, callback_in, trans);
    511511
     
    545545        size_t size = 0;
    546546        if (data_buffer_len > 0) {
    547                 const int rc = async_data_write_accept(&trans->buffer, false,
     547                const errno_t rc = async_data_write_accept(&trans->buffer, false,
    548548                    1, data_buffer_len, 0, &size);
    549549
     
    562562        }};
    563563
    564         const int rc = usbhc_iface->write(
     564        const errno_t rc = usbhc_iface->write(
    565565            fun, target, setup, trans->buffer, size, callback_out, trans);
    566566
  • uspace/lib/drv/generic/remote_usbhid.c

    r132ab5d1 r5a6cc679  
    9797 *
    9898 */
    99 int usbhid_dev_get_event_length(async_sess_t *dev_sess, size_t *size)
     99errno_t usbhid_dev_get_event_length(async_sess_t *dev_sess, size_t *size)
    100100{
    101101        if (!dev_sess)
     
    105105       
    106106        sysarg_t len;
    107         int rc = async_req_1_1(exch, DEV_IFACE_ID(USBHID_DEV_IFACE),
     107        errno_t rc = async_req_1_1(exch, DEV_IFACE_ID(USBHID_DEV_IFACE),
    108108            IPC_M_USBHID_GET_EVENT_LENGTH, &len);
    109109       
     
    132132 *
    133133 */
    134 int usbhid_dev_get_event(async_sess_t *dev_sess, uint8_t *buf,
     134errno_t usbhid_dev_get_event(async_sess_t *dev_sess, uint8_t *buf,
    135135    size_t size, size_t *actual_size, int *event_nr, unsigned int flags)
    136136{
     
    174174        }
    175175       
    176         int data_request_rc;
    177         int opening_request_rc;
     176        errno_t data_request_rc;
     177        errno_t opening_request_rc;
    178178        async_wait_for(data_request, &data_request_rc);
    179179        async_wait_for(opening_request, &opening_request_rc);
     
    182182                /* Prefer return code of the opening request. */
    183183                if (opening_request_rc != EOK)
    184                         return (int) opening_request_rc;
     184                        return (errno_t) opening_request_rc;
    185185                else
    186                         return (int) data_request_rc;
     186                        return (errno_t) data_request_rc;
    187187        }
    188188       
    189189        if (opening_request_rc != EOK)
    190                 return (int) opening_request_rc;
     190                return (errno_t) opening_request_rc;
    191191       
    192192        size_t act_size = IPC_GET_ARG2(data_request_call);
     
    204204}
    205205
    206 int usbhid_dev_get_report_descriptor_length(async_sess_t *dev_sess,
     206errno_t usbhid_dev_get_report_descriptor_length(async_sess_t *dev_sess,
    207207    size_t *size)
    208208{
     
    213213       
    214214        sysarg_t arg_size;
    215         int rc = async_req_1_1(exch, DEV_IFACE_ID(USBHID_DEV_IFACE),
     215        errno_t rc = async_req_1_1(exch, DEV_IFACE_ID(USBHID_DEV_IFACE),
    216216            IPC_M_USBHID_GET_REPORT_DESCRIPTOR_LENGTH, &arg_size);
    217217       
     
    226226}
    227227
    228 int usbhid_dev_get_report_descriptor(async_sess_t *dev_sess, uint8_t *buf,
     228errno_t usbhid_dev_get_report_descriptor(async_sess_t *dev_sess, uint8_t *buf,
    229229    size_t size, size_t *actual_size)
    230230{
     
    259259        }
    260260       
    261         int data_request_rc;
    262         int opening_request_rc;
     261        errno_t data_request_rc;
     262        errno_t opening_request_rc;
    263263        async_wait_for(data_request, &data_request_rc);
    264264        async_wait_for(opening_request, &opening_request_rc);
     
    267267                /* Prefer return code of the opening request. */
    268268                if (opening_request_rc != EOK)
    269                         return (int) opening_request_rc;
     269                        return (errno_t) opening_request_rc;
    270270                else
    271                         return (int) data_request_rc;
     271                        return (errno_t) data_request_rc;
    272272        }
    273273       
    274274        if (opening_request_rc != EOK)
    275                 return (int) opening_request_rc;
     275                return (errno_t) opening_request_rc;
    276276       
    277277        size_t act_size = IPC_GET_ARG2(data_request_call);
     
    362362        }
    363363
    364         int rc;
     364        errno_t rc;
    365365
    366366        uint8_t *data = malloc(len);
     
    438438
    439439        size_t act_len = 0;
    440         int rc = hid_iface->get_report_descriptor(fun, descriptor, len,
     440        errno_t rc = hid_iface->get_report_descriptor(fun, descriptor, len,
    441441            &act_len);
    442442        if (act_len > len) {
  • uspace/lib/drv/include/ahci_iface.h

    r132ab5d1 r5a6cc679  
    4343extern async_sess_t* ahci_get_sess(devman_handle_t, char **);
    4444
    45 extern int ahci_get_sata_device_name(async_sess_t *, size_t, char *);
    46 extern int ahci_get_num_blocks(async_sess_t *, uint64_t *);
    47 extern int ahci_get_block_size(async_sess_t *, size_t *);
    48 extern int ahci_read_blocks(async_sess_t *, uint64_t, size_t, void *);
    49 extern int ahci_write_blocks(async_sess_t *, uint64_t, size_t, void *);
     45extern errno_t ahci_get_sata_device_name(async_sess_t *, size_t, char *);
     46extern errno_t ahci_get_num_blocks(async_sess_t *, uint64_t *);
     47extern errno_t ahci_get_block_size(async_sess_t *, size_t *);
     48extern errno_t ahci_read_blocks(async_sess_t *, uint64_t, size_t, void *);
     49extern errno_t ahci_write_blocks(async_sess_t *, uint64_t, size_t, void *);
    5050
    5151/** AHCI device communication interface. */
    5252typedef struct {
    53         int (*get_sata_device_name)(ddf_fun_t *, size_t, char *);
    54         int (*get_num_blocks)(ddf_fun_t *, uint64_t *);
    55         int (*get_block_size)(ddf_fun_t *, size_t *);
    56         int (*read_blocks)(ddf_fun_t *, uint64_t, size_t, void *);
    57         int (*write_blocks)(ddf_fun_t *, uint64_t, size_t, void *);
     53        errno_t (*get_sata_device_name)(ddf_fun_t *, size_t, char *);
     54        errno_t (*get_num_blocks)(ddf_fun_t *, uint64_t *);
     55        errno_t (*get_block_size)(ddf_fun_t *, size_t *);
     56        errno_t (*read_blocks)(ddf_fun_t *, uint64_t, size_t, void *);
     57        errno_t (*write_blocks)(ddf_fun_t *, uint64_t, size_t, void *);
    5858} ahci_iface_t;
    5959
  • uspace/lib/drv/include/audio_mixer_iface.h

    r132ab5d1 r5a6cc679  
    4343#include "ddf/driver.h"
    4444
    45 int audio_mixer_get_info(async_exch_t *, const char **, unsigned *);
    46 int audio_mixer_get_item_info(async_exch_t *, unsigned,
     45errno_t audio_mixer_get_info(async_exch_t *, const char **, unsigned *);
     46errno_t audio_mixer_get_item_info(async_exch_t *, unsigned,
    4747    const char **, unsigned *);
    48 int audio_mixer_get_item_level(async_exch_t *, unsigned, unsigned *);
    49 int audio_mixer_set_item_level(async_exch_t *, unsigned, unsigned);
     48errno_t audio_mixer_get_item_level(async_exch_t *, unsigned, unsigned *);
     49errno_t audio_mixer_set_item_level(async_exch_t *, unsigned, unsigned);
    5050
    5151
    5252/** Audio mixer communication interface. */
    5353typedef struct {
    54         int (*get_info)(ddf_fun_t *, const char **, unsigned *);
    55         int (*get_item_info)(ddf_fun_t *, unsigned, const char **, unsigned *);
    56         int (*get_item_level)(ddf_fun_t *, unsigned, unsigned *);
    57         int (*set_item_level)(ddf_fun_t *, unsigned, unsigned);
     54        errno_t (*get_info)(ddf_fun_t *, const char **, unsigned *);
     55        errno_t (*get_item_info)(ddf_fun_t *, unsigned, const char **, unsigned *);
     56        errno_t (*get_item_level)(ddf_fun_t *, unsigned, unsigned *);
     57        errno_t (*set_item_level)(ddf_fun_t *, unsigned, unsigned);
    5858} audio_mixer_iface_t;
    5959
  • uspace/lib/drv/include/audio_pcm_iface.h

    r132ab5d1 r5a6cc679  
    8080void audio_pcm_close(audio_pcm_sess_t *);
    8181
    82 int audio_pcm_get_info_str(audio_pcm_sess_t *, const char **);
    83 int audio_pcm_test_format(audio_pcm_sess_t *, unsigned *, unsigned *,
     82errno_t audio_pcm_get_info_str(audio_pcm_sess_t *, const char **);
     83errno_t audio_pcm_test_format(audio_pcm_sess_t *, unsigned *, unsigned *,
    8484    pcm_sample_format_t *);
    85 int audio_pcm_query_cap(audio_pcm_sess_t *, audio_cap_t, sysarg_t *);
    86 int audio_pcm_register_event_callback(audio_pcm_sess_t *,
     85errno_t audio_pcm_query_cap(audio_pcm_sess_t *, audio_cap_t, sysarg_t *);
     86errno_t audio_pcm_register_event_callback(audio_pcm_sess_t *,
    8787    async_port_handler_t, void *);
    88 int audio_pcm_unregister_event_callback(audio_pcm_sess_t *);
     88errno_t audio_pcm_unregister_event_callback(audio_pcm_sess_t *);
    8989
    90 int audio_pcm_get_buffer(audio_pcm_sess_t *, void **, size_t *);
    91 int audio_pcm_get_buffer_pos(audio_pcm_sess_t *, size_t *);
    92 int audio_pcm_release_buffer(audio_pcm_sess_t *);
     90errno_t audio_pcm_get_buffer(audio_pcm_sess_t *, void **, size_t *);
     91errno_t audio_pcm_get_buffer_pos(audio_pcm_sess_t *, size_t *);
     92errno_t audio_pcm_release_buffer(audio_pcm_sess_t *);
    9393
    94 int audio_pcm_start_playback_fragment(audio_pcm_sess_t *, unsigned,
     94errno_t audio_pcm_start_playback_fragment(audio_pcm_sess_t *, unsigned,
    9595    unsigned, unsigned, pcm_sample_format_t);
    96 int audio_pcm_last_playback_fragment(audio_pcm_sess_t *);
     96errno_t audio_pcm_last_playback_fragment(audio_pcm_sess_t *);
    9797
    98 int audio_pcm_start_playback(audio_pcm_sess_t *,
     98errno_t audio_pcm_start_playback(audio_pcm_sess_t *,
    9999    unsigned, unsigned, pcm_sample_format_t);
    100 int audio_pcm_stop_playback_immediate(audio_pcm_sess_t *);
    101 int audio_pcm_stop_playback(audio_pcm_sess_t *);
     100errno_t audio_pcm_stop_playback_immediate(audio_pcm_sess_t *);
     101errno_t audio_pcm_stop_playback(audio_pcm_sess_t *);
    102102
    103 int audio_pcm_start_capture_fragment(audio_pcm_sess_t *, unsigned,
     103errno_t audio_pcm_start_capture_fragment(audio_pcm_sess_t *, unsigned,
    104104    unsigned, unsigned, pcm_sample_format_t);
    105 int audio_pcm_last_capture_fragment(audio_pcm_sess_t *);
     105errno_t audio_pcm_last_capture_fragment(audio_pcm_sess_t *);
    106106
    107 int audio_pcm_start_capture(audio_pcm_sess_t *,
     107errno_t audio_pcm_start_capture(audio_pcm_sess_t *,
    108108    unsigned, unsigned, pcm_sample_format_t);
    109 int audio_pcm_stop_capture_immediate(audio_pcm_sess_t *);
    110 int audio_pcm_stop_capture(audio_pcm_sess_t *);
     109errno_t audio_pcm_stop_capture_immediate(audio_pcm_sess_t *);
     110errno_t audio_pcm_stop_capture(audio_pcm_sess_t *);
    111111
    112112/** Audio pcm communication interface. */
    113113typedef struct {
    114         int (*get_info_str)(ddf_fun_t *, const char **);
    115         int (*test_format)(ddf_fun_t *, unsigned *, unsigned *,
     114        errno_t (*get_info_str)(ddf_fun_t *, const char **);
     115        errno_t (*test_format)(ddf_fun_t *, unsigned *, unsigned *,
    116116            pcm_sample_format_t *);
    117117        unsigned (*query_cap)(ddf_fun_t *, audio_cap_t);
    118         int (*get_buffer_pos)(ddf_fun_t *, size_t *);
    119         int (*get_buffer)(ddf_fun_t *, void **, size_t *);
    120         int (*release_buffer)(ddf_fun_t *);
    121         int (*set_event_session)(ddf_fun_t *, async_sess_t *);
     118        errno_t (*get_buffer_pos)(ddf_fun_t *, size_t *);
     119        errno_t (*get_buffer)(ddf_fun_t *, void **, size_t *);
     120        errno_t (*release_buffer)(ddf_fun_t *);
     121        errno_t (*set_event_session)(ddf_fun_t *, async_sess_t *);
    122122        async_sess_t * (*get_event_session)(ddf_fun_t *);
    123         int (*start_playback)(ddf_fun_t *, unsigned,
     123        errno_t (*start_playback)(ddf_fun_t *, unsigned,
    124124            unsigned, unsigned, pcm_sample_format_t);
    125         int (*stop_playback)(ddf_fun_t *, bool);
    126         int (*start_capture)(ddf_fun_t *, unsigned,
     125        errno_t (*stop_playback)(ddf_fun_t *, bool);
     126        errno_t (*start_capture)(ddf_fun_t *, unsigned,
    127127            unsigned, unsigned, pcm_sample_format_t);
    128         int (*stop_capture)(ddf_fun_t *, bool);
     128        errno_t (*stop_capture)(ddf_fun_t *, bool);
    129129} audio_pcm_iface_t;
    130130
  • uspace/lib/drv/include/battery_iface.h

    r132ab5d1 r5a6cc679  
    4949} battery_dev_method_t;
    5050
    51 extern int battery_status_get(async_sess_t *, battery_status_t *);
    52 extern int battery_charge_level_get(async_sess_t *, int *);
     51extern errno_t battery_status_get(async_sess_t *, battery_status_t *);
     52extern errno_t battery_charge_level_get(async_sess_t *, int *);
    5353
    5454#endif
  • uspace/lib/drv/include/ddf/driver.h

    r132ab5d1 r5a6cc679  
    5656         * device.
    5757         */
    58         int (*open)(ddf_fun_t *);
     58        errno_t (*open)(ddf_fun_t *);
    5959       
    6060        /**
     
    8888typedef struct driver_ops {
    8989        /** Callback method for passing a new device to the device driver */
    90         int (*dev_add)(ddf_dev_t *);
     90        errno_t (*dev_add)(ddf_dev_t *);
    9191       
    9292        /** Ask driver to remove a device */
    93         int (*dev_remove)(ddf_dev_t *);
     93        errno_t (*dev_remove)(ddf_dev_t *);
    9494       
    9595        /** Inform driver a device disappeared */
    96         int (*dev_gone)(ddf_dev_t *);
     96        errno_t (*dev_gone)(ddf_dev_t *);
    9797       
    9898        /** Ask driver to online a specific function */
    99         int (*fun_online)(ddf_fun_t *);
     99        errno_t (*fun_online)(ddf_fun_t *);
    100100       
    101101        /** Ask driver to offline a specific function */
    102         int (*fun_offline)(ddf_fun_t *);
     102        errno_t (*fun_offline)(ddf_fun_t *);
    103103} driver_ops_t;
    104104
     
    124124extern void *ddf_fun_data_get(ddf_fun_t *);
    125125extern const char *ddf_fun_get_name(ddf_fun_t *);
    126 extern int ddf_fun_set_name(ddf_fun_t *, const char *);
     126extern errno_t ddf_fun_set_name(ddf_fun_t *, const char *);
    127127extern ddf_dev_t *ddf_fun_get_dev(ddf_fun_t *);
    128 extern int ddf_fun_bind(ddf_fun_t *);
    129 extern int ddf_fun_unbind(ddf_fun_t *);
    130 extern int ddf_fun_online(ddf_fun_t *);
    131 extern int ddf_fun_offline(ddf_fun_t *);
    132 extern int ddf_fun_add_match_id(ddf_fun_t *, const char *, int);
     128extern errno_t ddf_fun_bind(ddf_fun_t *);
     129extern errno_t ddf_fun_unbind(ddf_fun_t *);
     130extern errno_t ddf_fun_online(ddf_fun_t *);
     131extern errno_t ddf_fun_offline(ddf_fun_t *);
     132extern errno_t ddf_fun_add_match_id(ddf_fun_t *, const char *, int);
    133133extern void ddf_fun_set_ops(ddf_fun_t *, const ddf_dev_ops_t *);
    134134extern void ddf_fun_set_conn_handler(ddf_fun_t *, async_port_handler_t);
    135 extern int ddf_fun_add_to_category(ddf_fun_t *, const char *);
     135extern errno_t ddf_fun_add_to_category(ddf_fun_t *, const char *);
    136136
    137137#endif
  • uspace/lib/drv/include/ddf/interrupt.h

    r132ab5d1 r5a6cc679  
    5050typedef void interrupt_handler_t(ipc_call_t *, ddf_dev_t *);
    5151
    52 extern int register_interrupt_handler(ddf_dev_t *, int, interrupt_handler_t *,
     52extern errno_t register_interrupt_handler(ddf_dev_t *, int, interrupt_handler_t *,
    5353    const irq_code_t *, cap_handle_t *);
    54 extern int unregister_interrupt_handler(ddf_dev_t *, cap_handle_t);
     54extern errno_t unregister_interrupt_handler(ddf_dev_t *, cap_handle_t);
    5555
    5656#endif
  • uspace/lib/drv/include/ddf/log.h

    r132ab5d1 r5a6cc679  
    3737#include <io/verify.h>
    3838
    39 extern int ddf_log_init(const char *);
     39extern errno_t ddf_log_init(const char *);
    4040extern void ddf_msg(log_level_t, const char *, ...)
    4141    PRINTF_ATTRIBUTE(2, 3);
  • uspace/lib/drv/include/ieee80211_iface.h

    r132ab5d1 r5a6cc679  
    3939#include <async.h>
    4040
    41 extern int ieee80211_get_scan_results(async_sess_t *,
     41extern errno_t ieee80211_get_scan_results(async_sess_t *,
    4242    ieee80211_scan_results_t *, bool);
    43 extern int ieee80211_connect(async_sess_t *, char *, char *);
    44 extern int ieee80211_disconnect(async_sess_t *);
     43extern errno_t ieee80211_connect(async_sess_t *, char *, char *);
     44extern errno_t ieee80211_disconnect(async_sess_t *);
    4545
    4646#endif
  • uspace/lib/drv/include/nic_iface.h

    r132ab5d1 r5a6cc679  
    4747} nic_event_t;
    4848
    49 extern int nic_send_frame(async_sess_t *, void *, size_t);
    50 extern int nic_callback_create(async_sess_t *, async_port_handler_t, void *);
    51 extern int nic_get_state(async_sess_t *, nic_device_state_t *);
    52 extern int nic_set_state(async_sess_t *, nic_device_state_t);
    53 extern int nic_get_address(async_sess_t *, nic_address_t *);
    54 extern int nic_set_address(async_sess_t *, const nic_address_t *);
    55 extern int nic_get_stats(async_sess_t *, nic_device_stats_t *);
    56 extern int nic_get_device_info(async_sess_t *, nic_device_info_t *);
    57 extern int nic_get_cable_state(async_sess_t *, nic_cable_state_t *);
     49extern errno_t nic_send_frame(async_sess_t *, void *, size_t);
     50extern errno_t nic_callback_create(async_sess_t *, async_port_handler_t, void *);
     51extern errno_t nic_get_state(async_sess_t *, nic_device_state_t *);
     52extern errno_t nic_set_state(async_sess_t *, nic_device_state_t);
     53extern errno_t nic_get_address(async_sess_t *, nic_address_t *);
     54extern errno_t nic_set_address(async_sess_t *, const nic_address_t *);
     55extern errno_t nic_get_stats(async_sess_t *, nic_device_stats_t *);
     56extern errno_t nic_get_device_info(async_sess_t *, nic_device_info_t *);
     57extern errno_t nic_get_cable_state(async_sess_t *, nic_cable_state_t *);
    5858
    59 extern int nic_get_operation_mode(async_sess_t *, int *, nic_channel_mode_t *,
     59extern errno_t nic_get_operation_mode(async_sess_t *, int *, nic_channel_mode_t *,
    6060    nic_role_t *);
    61 extern int nic_set_operation_mode(async_sess_t *, int, nic_channel_mode_t,
     61extern errno_t nic_set_operation_mode(async_sess_t *, int, nic_channel_mode_t,
    6262    nic_role_t);
    63 extern int nic_autoneg_enable(async_sess_t *, uint32_t);
    64 extern int nic_autoneg_disable(async_sess_t *);
    65 extern int nic_autoneg_probe(async_sess_t *, uint32_t *, uint32_t *,
     63extern errno_t nic_autoneg_enable(async_sess_t *, uint32_t);
     64extern errno_t nic_autoneg_disable(async_sess_t *);
     65extern errno_t nic_autoneg_probe(async_sess_t *, uint32_t *, uint32_t *,
    6666    nic_result_t *, nic_result_t *);
    67 extern int nic_autoneg_restart(async_sess_t *);
    68 extern int nic_get_pause(async_sess_t *, nic_result_t *, nic_result_t *,
     67extern errno_t nic_autoneg_restart(async_sess_t *);
     68extern errno_t nic_get_pause(async_sess_t *, nic_result_t *, nic_result_t *,
    6969    uint16_t *);
    70 extern int nic_set_pause(async_sess_t *, int, int, uint16_t);
     70extern errno_t nic_set_pause(async_sess_t *, int, int, uint16_t);
    7171
    72 extern int nic_unicast_get_mode(async_sess_t *, nic_unicast_mode_t *, size_t,
     72extern errno_t nic_unicast_get_mode(async_sess_t *, nic_unicast_mode_t *, size_t,
    7373    nic_address_t *, size_t *);
    74 extern int nic_unicast_set_mode(async_sess_t *, nic_unicast_mode_t,
     74extern errno_t nic_unicast_set_mode(async_sess_t *, nic_unicast_mode_t,
    7575    const nic_address_t *, size_t);
    76 extern int nic_multicast_get_mode(async_sess_t *, nic_multicast_mode_t *,
     76extern errno_t nic_multicast_get_mode(async_sess_t *, nic_multicast_mode_t *,
    7777    size_t, nic_address_t *, size_t *);
    78 extern int nic_multicast_set_mode(async_sess_t *, nic_multicast_mode_t,
     78extern errno_t nic_multicast_set_mode(async_sess_t *, nic_multicast_mode_t,
    7979    const nic_address_t *, size_t);
    80 extern int nic_broadcast_get_mode(async_sess_t *, nic_broadcast_mode_t *);
    81 extern int nic_broadcast_set_mode(async_sess_t *, nic_broadcast_mode_t);
    82 extern int nic_defective_get_mode(async_sess_t *, uint32_t *);
    83 extern int nic_defective_set_mode(async_sess_t *, uint32_t);
    84 extern int nic_blocked_sources_get(async_sess_t *, size_t, nic_address_t *,
     80extern errno_t nic_broadcast_get_mode(async_sess_t *, nic_broadcast_mode_t *);
     81extern errno_t nic_broadcast_set_mode(async_sess_t *, nic_broadcast_mode_t);
     82extern errno_t nic_defective_get_mode(async_sess_t *, uint32_t *);
     83extern errno_t nic_defective_set_mode(async_sess_t *, uint32_t);
     84extern errno_t nic_blocked_sources_get(async_sess_t *, size_t, nic_address_t *,
    8585    size_t *);
    86 extern int nic_blocked_sources_set(async_sess_t *, const nic_address_t *,
     86extern errno_t nic_blocked_sources_set(async_sess_t *, const nic_address_t *,
    8787    size_t);
    8888
    89 extern int nic_vlan_get_mask(async_sess_t *, nic_vlan_mask_t *);
    90 extern int nic_vlan_set_mask(async_sess_t *, const nic_vlan_mask_t *);
    91 extern int nic_vlan_set_tag(async_sess_t *, uint16_t, bool, bool);
     89extern errno_t nic_vlan_get_mask(async_sess_t *, nic_vlan_mask_t *);
     90extern errno_t nic_vlan_set_mask(async_sess_t *, const nic_vlan_mask_t *);
     91extern errno_t nic_vlan_set_tag(async_sess_t *, uint16_t, bool, bool);
    9292
    93 extern int nic_wol_virtue_add(async_sess_t *, nic_wv_type_t, const void *,
     93extern errno_t nic_wol_virtue_add(async_sess_t *, nic_wv_type_t, const void *,
    9494    size_t, nic_wv_id_t *);
    95 extern int nic_wol_virtue_remove(async_sess_t *, nic_wv_id_t);
    96 extern int nic_wol_virtue_probe(async_sess_t *, nic_wv_id_t, nic_wv_type_t *,
     95extern errno_t nic_wol_virtue_remove(async_sess_t *, nic_wv_id_t);
     96extern errno_t nic_wol_virtue_probe(async_sess_t *, nic_wv_id_t, nic_wv_type_t *,
    9797    size_t, void *, size_t *);
    98 extern int nic_wol_virtue_list(async_sess_t *, nic_wv_type_t, size_t,
     98extern errno_t nic_wol_virtue_list(async_sess_t *, nic_wv_type_t, size_t,
    9999    nic_wv_id_t *, size_t *);
    100 extern int nic_wol_virtue_get_caps(async_sess_t *, nic_wv_type_t, int *);
    101 extern int nic_wol_load_info(async_sess_t *, nic_wv_type_t *, size_t, uint8_t *,
     100extern errno_t nic_wol_virtue_get_caps(async_sess_t *, nic_wv_type_t, int *);
     101extern errno_t nic_wol_load_info(async_sess_t *, nic_wv_type_t *, size_t, uint8_t *,
    102102    size_t *);
    103103
    104 extern int nic_offload_probe(async_sess_t *, uint32_t *, uint32_t *);
    105 extern int nic_offload_set(async_sess_t *, uint32_t, uint32_t);
     104extern errno_t nic_offload_probe(async_sess_t *, uint32_t *, uint32_t *);
     105extern errno_t nic_offload_set(async_sess_t *, uint32_t, uint32_t);
    106106
    107 extern int nic_poll_get_mode(async_sess_t *, nic_poll_mode_t *,
     107extern errno_t nic_poll_get_mode(async_sess_t *, nic_poll_mode_t *,
    108108    struct timeval *);
    109 extern int nic_poll_set_mode(async_sess_t *, nic_poll_mode_t,
     109extern errno_t nic_poll_set_mode(async_sess_t *, nic_poll_mode_t,
    110110    const struct timeval *);
    111 extern int nic_poll_now(async_sess_t *);
     111extern errno_t nic_poll_now(async_sess_t *);
    112112
    113113#endif
  • uspace/lib/drv/include/ops/battery_dev.h

    r132ab5d1 r5a6cc679  
    4040
    4141typedef struct {
    42         int (*battery_status_get)(ddf_fun_t *, battery_status_t *);
    43         int (*battery_charge_level_get)(ddf_fun_t *, int *);
     42        errno_t (*battery_status_get)(ddf_fun_t *, battery_status_t *);
     43        errno_t (*battery_charge_level_get)(ddf_fun_t *, int *);
    4444} battery_dev_ops_t;
    4545
  • uspace/lib/drv/include/ops/clock_dev.h

    r132ab5d1 r5a6cc679  
    4040
    4141typedef struct {
    42         int (*time_get)(ddf_fun_t *, struct tm *);
    43         int (*time_set)(ddf_fun_t *, struct tm *);
     42        errno_t (*time_get)(ddf_fun_t *, struct tm *);
     43        errno_t (*time_set)(ddf_fun_t *, struct tm *);
    4444} clock_dev_ops_t;
    4545
  • uspace/lib/drv/include/ops/hw_res.h

    r132ab5d1 r5a6cc679  
    4444typedef struct {
    4545        hw_resource_list_t *(*get_resource_list)(ddf_fun_t *);
    46         int (*enable_interrupt)(ddf_fun_t *, int);
    47         int (*disable_interrupt)(ddf_fun_t *, int);
    48         int (*clear_interrupt)(ddf_fun_t *, int);
    49         int (*dma_channel_setup)(ddf_fun_t *, unsigned, uint32_t, uint32_t, uint8_t);
    50         int (*dma_channel_remain)(ddf_fun_t *, unsigned, size_t *);
     46        errno_t (*enable_interrupt)(ddf_fun_t *, int);
     47        errno_t (*disable_interrupt)(ddf_fun_t *, int);
     48        errno_t (*clear_interrupt)(ddf_fun_t *, int);
     49        errno_t (*dma_channel_setup)(ddf_fun_t *, unsigned, uint32_t, uint32_t, uint8_t);
     50        errno_t (*dma_channel_remain)(ddf_fun_t *, unsigned, size_t *);
    5151} hw_res_ops_t;
    5252
  • uspace/lib/drv/include/ops/ieee80211.h

    r132ab5d1 r5a6cc679  
    5151         *
    5252         */
    53         int (*get_scan_results)(ddf_fun_t *, ieee80211_scan_results_t *, bool);
     53        errno_t (*get_scan_results)(ddf_fun_t *, ieee80211_scan_results_t *, bool);
    5454       
    5555        /** Connect IEEE 802.11 device to specified network.
     
    6262         *
    6363         */
    64         int (*connect)(ddf_fun_t *, char *, char *);
     64        errno_t (*connect)(ddf_fun_t *, char *, char *);
    6565       
    6666        /** Disconnect IEEE 802.11 device from network.
     
    7171         *
    7272         */
    73         int (*disconnect)(ddf_fun_t *);
     73        errno_t (*disconnect)(ddf_fun_t *);
    7474} ieee80211_iface_t;
    7575
  • uspace/lib/drv/include/ops/led_dev.h

    r132ab5d1 r5a6cc679  
    4040
    4141typedef struct {
    42         int (*color_set)(ddf_fun_t *, pixel_t);
     42        errno_t (*color_set)(ddf_fun_t *, pixel_t);
    4343} led_dev_ops_t;
    4444
  • uspace/lib/drv/include/ops/nic.h

    r132ab5d1 r5a6cc679  
    4444typedef struct nic_iface {
    4545        /** Mandatory methods */
    46         int (*send_frame)(ddf_fun_t *, void *, size_t);
    47         int (*callback_create)(ddf_fun_t *);
    48         int (*get_state)(ddf_fun_t *, nic_device_state_t *);
    49         int (*set_state)(ddf_fun_t *, nic_device_state_t);
    50         int (*get_address)(ddf_fun_t *, nic_address_t *);
     46        errno_t (*send_frame)(ddf_fun_t *, void *, size_t);
     47        errno_t (*callback_create)(ddf_fun_t *);
     48        errno_t (*get_state)(ddf_fun_t *, nic_device_state_t *);
     49        errno_t (*set_state)(ddf_fun_t *, nic_device_state_t);
     50        errno_t (*get_address)(ddf_fun_t *, nic_address_t *);
    5151       
    5252        /** Optional methods */
    53         int (*set_address)(ddf_fun_t *, const nic_address_t *);
    54         int (*get_stats)(ddf_fun_t *, nic_device_stats_t *);
    55         int (*get_device_info)(ddf_fun_t *, nic_device_info_t *);
    56         int (*get_cable_state)(ddf_fun_t *, nic_cable_state_t *);
     53        errno_t (*set_address)(ddf_fun_t *, const nic_address_t *);
     54        errno_t (*get_stats)(ddf_fun_t *, nic_device_stats_t *);
     55        errno_t (*get_device_info)(ddf_fun_t *, nic_device_info_t *);
     56        errno_t (*get_cable_state)(ddf_fun_t *, nic_cable_state_t *);
    5757       
    58         int (*get_operation_mode)(ddf_fun_t *, int *, nic_channel_mode_t *,
     58        errno_t (*get_operation_mode)(ddf_fun_t *, int *, nic_channel_mode_t *,
    5959            nic_role_t *);
    60         int (*set_operation_mode)(ddf_fun_t *, int, nic_channel_mode_t,
     60        errno_t (*set_operation_mode)(ddf_fun_t *, int, nic_channel_mode_t,
    6161            nic_role_t);
    62         int (*autoneg_enable)(ddf_fun_t *, uint32_t);
    63         int (*autoneg_disable)(ddf_fun_t *);
    64         int (*autoneg_probe)(ddf_fun_t *, uint32_t *, uint32_t *,
     62        errno_t (*autoneg_enable)(ddf_fun_t *, uint32_t);
     63        errno_t (*autoneg_disable)(ddf_fun_t *);
     64        errno_t (*autoneg_probe)(ddf_fun_t *, uint32_t *, uint32_t *,
    6565            nic_result_t *, nic_result_t *);
    66         int (*autoneg_restart)(ddf_fun_t *);
    67         int (*get_pause)(ddf_fun_t *, nic_result_t *, nic_result_t *,
     66        errno_t (*autoneg_restart)(ddf_fun_t *);
     67        errno_t (*get_pause)(ddf_fun_t *, nic_result_t *, nic_result_t *,
    6868                uint16_t *);
    69         int (*set_pause)(ddf_fun_t *, int, int, uint16_t);
     69        errno_t (*set_pause)(ddf_fun_t *, int, int, uint16_t);
    7070       
    71         int (*unicast_get_mode)(ddf_fun_t *, nic_unicast_mode_t *, size_t,
     71        errno_t (*unicast_get_mode)(ddf_fun_t *, nic_unicast_mode_t *, size_t,
    7272            nic_address_t *, size_t *);
    73         int (*unicast_set_mode)(ddf_fun_t *, nic_unicast_mode_t,
     73        errno_t (*unicast_set_mode)(ddf_fun_t *, nic_unicast_mode_t,
    7474            const nic_address_t *, size_t);
    75         int (*multicast_get_mode)(ddf_fun_t *, nic_multicast_mode_t *, size_t,
     75        errno_t (*multicast_get_mode)(ddf_fun_t *, nic_multicast_mode_t *, size_t,
    7676            nic_address_t *, size_t *);
    77         int (*multicast_set_mode)(ddf_fun_t *, nic_multicast_mode_t,
     77        errno_t (*multicast_set_mode)(ddf_fun_t *, nic_multicast_mode_t,
    7878            const nic_address_t *, size_t);
    79         int (*broadcast_get_mode)(ddf_fun_t *, nic_broadcast_mode_t *);
    80         int (*broadcast_set_mode)(ddf_fun_t *, nic_broadcast_mode_t);
    81         int (*defective_get_mode)(ddf_fun_t *, uint32_t *);
    82         int (*defective_set_mode)(ddf_fun_t *, uint32_t);
    83         int (*blocked_sources_get)(ddf_fun_t *, size_t, nic_address_t *,
     79        errno_t (*broadcast_get_mode)(ddf_fun_t *, nic_broadcast_mode_t *);
     80        errno_t (*broadcast_set_mode)(ddf_fun_t *, nic_broadcast_mode_t);
     81        errno_t (*defective_get_mode)(ddf_fun_t *, uint32_t *);
     82        errno_t (*defective_set_mode)(ddf_fun_t *, uint32_t);
     83        errno_t (*blocked_sources_get)(ddf_fun_t *, size_t, nic_address_t *,
    8484            size_t *);
    85         int (*blocked_sources_set)(ddf_fun_t *, const nic_address_t *, size_t);
     85        errno_t (*blocked_sources_set)(ddf_fun_t *, const nic_address_t *, size_t);
    8686       
    87         int (*vlan_get_mask)(ddf_fun_t *, nic_vlan_mask_t *);
    88         int (*vlan_set_mask)(ddf_fun_t *, const nic_vlan_mask_t *);
    89         int (*vlan_set_tag)(ddf_fun_t *, uint16_t, bool, bool);
     87        errno_t (*vlan_get_mask)(ddf_fun_t *, nic_vlan_mask_t *);
     88        errno_t (*vlan_set_mask)(ddf_fun_t *, const nic_vlan_mask_t *);
     89        errno_t (*vlan_set_tag)(ddf_fun_t *, uint16_t, bool, bool);
    9090       
    91         int (*wol_virtue_add)(ddf_fun_t *, nic_wv_type_t, const void *,
     91        errno_t (*wol_virtue_add)(ddf_fun_t *, nic_wv_type_t, const void *,
    9292            size_t, nic_wv_id_t *);
    93         int (*wol_virtue_remove)(ddf_fun_t *, nic_wv_id_t);
    94         int (*wol_virtue_probe)(ddf_fun_t *, nic_wv_id_t, nic_wv_type_t *,
     93        errno_t (*wol_virtue_remove)(ddf_fun_t *, nic_wv_id_t);
     94        errno_t (*wol_virtue_probe)(ddf_fun_t *, nic_wv_id_t, nic_wv_type_t *,
    9595            size_t, void *, size_t *);
    96         int (*wol_virtue_list)(ddf_fun_t *, nic_wv_type_t, size_t,
     96        errno_t (*wol_virtue_list)(ddf_fun_t *, nic_wv_type_t, size_t,
    9797            nic_wv_id_t *, size_t *);
    98         int (*wol_virtue_get_caps)(ddf_fun_t *, nic_wv_type_t, int *);
    99         int (*wol_load_info)(ddf_fun_t *, nic_wv_type_t *, size_t,
     98        errno_t (*wol_virtue_get_caps)(ddf_fun_t *, nic_wv_type_t, int *);
     99        errno_t (*wol_load_info)(ddf_fun_t *, nic_wv_type_t *, size_t,
    100100            uint8_t *, size_t *);
    101101       
    102         int (*offload_probe)(ddf_fun_t *, uint32_t *, uint32_t *);
    103         int (*offload_set)(ddf_fun_t *, uint32_t, uint32_t);
     102        errno_t (*offload_probe)(ddf_fun_t *, uint32_t *, uint32_t *);
     103        errno_t (*offload_set)(ddf_fun_t *, uint32_t, uint32_t);
    104104       
    105         int (*poll_get_mode)(ddf_fun_t *, nic_poll_mode_t *,
     105        errno_t (*poll_get_mode)(ddf_fun_t *, nic_poll_mode_t *,
    106106            struct timeval *);
    107         int (*poll_set_mode)(ddf_fun_t *, nic_poll_mode_t,
     107        errno_t (*poll_set_mode)(ddf_fun_t *, nic_poll_mode_t,
    108108            const struct timeval *);
    109         int (*poll_now)(ddf_fun_t *);
     109        errno_t (*poll_now)(ddf_fun_t *);
    110110} nic_iface_t;
    111111
  • uspace/lib/drv/include/pci_dev_iface.h

    r132ab5d1 r5a6cc679  
    4545#define PCI_BASE_CLASS  0x0B
    4646
    47 extern int pci_config_space_read_8(async_sess_t *, uint32_t, uint8_t *);
    48 extern int pci_config_space_read_16(async_sess_t *, uint32_t, uint16_t *);
    49 extern int pci_config_space_read_32(async_sess_t *, uint32_t, uint32_t *);
     47extern errno_t pci_config_space_read_8(async_sess_t *, uint32_t, uint8_t *);
     48extern errno_t pci_config_space_read_16(async_sess_t *, uint32_t, uint16_t *);
     49extern errno_t pci_config_space_read_32(async_sess_t *, uint32_t, uint32_t *);
    5050
    51 extern int pci_config_space_write_8(async_sess_t *, uint32_t, uint8_t);
    52 extern int pci_config_space_write_16(async_sess_t *, uint32_t, uint16_t);
    53 extern int pci_config_space_write_32(async_sess_t *, uint32_t, uint32_t);
     51extern errno_t pci_config_space_write_8(async_sess_t *, uint32_t, uint8_t);
     52extern errno_t pci_config_space_write_16(async_sess_t *, uint32_t, uint16_t);
     53extern errno_t pci_config_space_write_32(async_sess_t *, uint32_t, uint32_t);
    5454
    5555/** PCI device communication interface. */
    5656typedef struct {
    57         int (*config_space_read_8)(ddf_fun_t *, uint32_t address, uint8_t *data);
    58         int (*config_space_read_16)(ddf_fun_t *, uint32_t address, uint16_t *data);
    59         int (*config_space_read_32)(ddf_fun_t *, uint32_t address, uint32_t *data);
     57        errno_t (*config_space_read_8)(ddf_fun_t *, uint32_t address, uint8_t *data);
     58        errno_t (*config_space_read_16)(ddf_fun_t *, uint32_t address, uint16_t *data);
     59        errno_t (*config_space_read_32)(ddf_fun_t *, uint32_t address, uint32_t *data);
    6060
    61         int (*config_space_write_8)(ddf_fun_t *, uint32_t address, uint8_t data);
    62         int (*config_space_write_16)(ddf_fun_t *, uint32_t address, uint16_t data);
    63         int (*config_space_write_32)(ddf_fun_t *, uint32_t address, uint32_t data);
     61        errno_t (*config_space_write_8)(ddf_fun_t *, uint32_t address, uint8_t data);
     62        errno_t (*config_space_write_16)(ddf_fun_t *, uint32_t address, uint16_t data);
     63        errno_t (*config_space_write_32)(ddf_fun_t *, uint32_t address, uint32_t data);
    6464} pci_dev_iface_t;
    6565
  • uspace/lib/drv/include/usb_iface.h

    r132ab5d1 r5a6cc679  
    5656extern void usb_dev_disconnect(usb_dev_session_t *);
    5757
    58 extern int usb_get_my_description(async_exch_t *, usb_device_desc_t *);
     58extern errno_t usb_get_my_description(async_exch_t *, usb_device_desc_t *);
    5959
    6060/** USB device communication interface. */
    6161typedef struct {
    62         int (*get_my_description)(ddf_fun_t *, usb_device_desc_t *);
     62        errno_t (*get_my_description)(ddf_fun_t *, usb_device_desc_t *);
    6363} usb_iface_t;
    6464
  • uspace/lib/drv/include/usbhc_iface.h

    r132ab5d1 r5a6cc679  
    139139} usb_endpoint_descriptors_t;
    140140
    141 extern int usbhc_reserve_default_address(async_exch_t *);
    142 extern int usbhc_release_default_address(async_exch_t *);
     141extern errno_t usbhc_reserve_default_address(async_exch_t *);
     142extern errno_t usbhc_release_default_address(async_exch_t *);
    143143
    144 extern int usbhc_device_enumerate(async_exch_t *, unsigned, usb_speed_t);
    145 extern int usbhc_device_remove(async_exch_t *, unsigned);
     144extern errno_t usbhc_device_enumerate(async_exch_t *, unsigned, usb_speed_t);
     145extern errno_t usbhc_device_remove(async_exch_t *, unsigned);
    146146
    147 extern int usbhc_register_endpoint(async_exch_t *, usb_pipe_desc_t *, const usb_endpoint_descriptors_t *);
    148 extern int usbhc_unregister_endpoint(async_exch_t *, const usb_pipe_desc_t *);
     147extern errno_t usbhc_register_endpoint(async_exch_t *, usb_pipe_desc_t *, const usb_endpoint_descriptors_t *);
     148extern errno_t usbhc_unregister_endpoint(async_exch_t *, const usb_pipe_desc_t *);
    149149
    150 extern int usbhc_read(async_exch_t *, usb_endpoint_t, uint64_t, void *, size_t,
     150extern errno_t usbhc_read(async_exch_t *, usb_endpoint_t, uint64_t, void *, size_t,
    151151    size_t *);
    152 extern int usbhc_write(async_exch_t *, usb_endpoint_t, uint64_t, const void *,
     152extern errno_t usbhc_write(async_exch_t *, usb_endpoint_t, uint64_t, const void *,
    153153    size_t);
    154154
    155155/** Callback for outgoing transfer */
    156 typedef int (*usbhc_iface_transfer_callback_t)(void *, int, size_t);
     156typedef errno_t (*usbhc_iface_transfer_callback_t)(void *, int, size_t);
    157157
    158158/** USB device communication interface. */
     
    166166        int (*unregister_endpoint)(ddf_fun_t *, const usb_pipe_desc_t *);
    167167
    168         int (*read)(ddf_fun_t *, usb_target_t,
     168        errno_t (*read)(ddf_fun_t *, usb_target_t,
    169169                uint64_t, char *, size_t,
    170170                usbhc_iface_transfer_callback_t, void *);
    171         int (*write)(ddf_fun_t *, usb_target_t,
     171        errno_t (*write)(ddf_fun_t *, usb_target_t,
    172172                uint64_t, const char *, size_t,
    173173                usbhc_iface_transfer_callback_t, void *);
  • uspace/lib/drv/include/usbhid_iface.h

    r132ab5d1 r5a6cc679  
    3939#include "ddf/driver.h"
    4040
    41 extern int usbhid_dev_get_event_length(async_sess_t *, size_t *);
    42 extern int usbhid_dev_get_event(async_sess_t *, uint8_t *, size_t, size_t *,
     41extern errno_t usbhid_dev_get_event_length(async_sess_t *, size_t *);
     42extern errno_t usbhid_dev_get_event(async_sess_t *, uint8_t *, size_t, size_t *,
    4343    int *, unsigned int);
    44 extern int usbhid_dev_get_report_descriptor_length(async_sess_t *, size_t *);
    45 extern int usbhid_dev_get_report_descriptor(async_sess_t *, uint8_t *, size_t,
     44extern errno_t usbhid_dev_get_report_descriptor_length(async_sess_t *, size_t *);
     45extern errno_t usbhid_dev_get_report_descriptor(async_sess_t *, uint8_t *, size_t,
    4646    size_t *);
    4747
     
    6363         * @return Error code.
    6464         */
    65         int (*get_event)(ddf_fun_t *fun, uint8_t *buffer, size_t size,
     65        errno_t (*get_event)(ddf_fun_t *fun, uint8_t *buffer, size_t size,
    6666            size_t *act_size, int *event_nr, unsigned int flags);
    6767       
     
    8181         * @return Error code.
    8282         */
    83         int (*get_report_descriptor)(ddf_fun_t *fun, uint8_t *desc,
     83        errno_t (*get_report_descriptor)(ddf_fun_t *fun, uint8_t *desc,
    8484            size_t size, size_t *act_size);
    8585} usbhid_iface_t;
Note: See TracChangeset for help on using the changeset viewer.