Changeset 73ac2e9 in mainline for uspace/srv/net/net/net.c


Ignore:
Timestamp:
2011-01-12T14:32:59Z (13 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
797b704
Parents:
fe5a9fc
Message:

slightly improve error handling

File:
1 edited

Legend:

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

    rfe5a9fc r73ac2e9  
    4545#include <stdio.h>
    4646#include <str.h>
     47#include <str_error.h>
    4748
    4849#include <ipc/ipc.h>
     
    333334                return rc;
    334335       
    335        
    336336        rc = net_initialize(client_connection);
    337337        if (rc != EOK)
     
    592592                rc = start_device(netif);
    593593                if (rc != EOK) {
     594                        printf("%s: Error starting interface %s (%s)\n", NAME,
     595                            netif->name, str_error(rc));
    594596                        measured_strings_destroy(&netif->configuration);
    595597                        netifs_exclude_index(&net_globals.netifs, index);
     598                       
    596599                        return rc;
    597600                }
     
    710713int main(int argc, char *argv[])
    711714{
    712         int rc;
    713        
    714         rc = net_module_start(net_client_connection);
    715         if (rc != EOK) {
    716                 fprintf(stderr, "%s: net_module_start error %i\n", NAME, rc);
    717                 return rc;
    718         }
    719        
    720         return EOK;
     715        return net_module_start(net_client_connection);
    721716}
    722717
Note: See TracChangeset for help on using the changeset viewer.