Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/netif/lo/lo.c

    r2e236901 r25271006  
    3737#include <async.h>
    3838#include <errno.h>
     39#include <err.h>
    3940#include <stdio.h>
    4041#include <str.h>
     
    8283int netif_get_device_stats(device_id_t device_id, device_stats_ref stats)
    8384{
     85        ERROR_DECLARE;
     86
    8487        netif_device_t *device;
    85         int rc;
    8688
    8789        if (!stats)
    8890                return EBADMEM;
    89         rc = find_device(device_id, &device);
    90         if (rc != EOK)
    91                 return rc;
     91        ERROR_PROPAGATE(find_device(device_id, &device));
    9292        memcpy(stats, (device_stats_ref) device->specific,
    9393            sizeof(device_stats_t));
     
    164164int netif_probe_message(device_id_t device_id, int irq, uintptr_t io)
    165165{
     166        ERROR_DECLARE;
     167
    166168        netif_device_t *device;
    167         int rc;
    168169
    169170        // create a new device
    170         rc = create(device_id, &device);
    171         if (rc != EOK)
    172                 return rc;
     171        ERROR_PROPAGATE(create(device_id, &device));
    173172        // print the settings
    174173        printf("%s: Device created (id: %d)\n", NAME, device->device_id);
     
    178177int netif_send_message(device_id_t device_id, packet_t packet, services_t sender)
    179178{
     179        ERROR_DECLARE;
     180
    180181        netif_device_t *device;
    181182        size_t length;
    182183        packet_t next;
    183184        int phone;
    184         int rc;
    185 
    186         rc = find_device(device_id, &device);
    187         if (rc != EOK)
    188                 return EOK;
     185
     186        ERROR_PROPAGATE(find_device(device_id, &device));
    189187        if (device->state != NETIF_ACTIVE) {
    190188                netif_pq_release(packet_get_id(packet));
     
    261259int main(int argc, char *argv[])
    262260{
    263         int rc;
     261        ERROR_DECLARE;
    264262       
    265263        /* Start the module */
    266         rc = netif_module_start(netif_client_connection);
    267         return rc;
     264        ERROR_PROPAGATE(netif_module_start(netif_client_connection));
     265        return EOK;
    268266}
    269267
Note: See TracChangeset for help on using the changeset viewer.