Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 0b81cad0 in mainline for uspace/srv/net/nil/eth/eth_module.c


Ignore:
Timestamp:
2010-11-06T00:19:13Z (11 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master
Children:
1712f87
Parents:
0485135 (diff), 0578271 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge from lp:~jakub/helenos/net.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/nil/eth/eth_module.c

    r0485135 r0b81cad0  
    4040#include <async.h>
    4141#include <stdio.h>
    42 #include <err.h>
     42#include <errno.h>
    4343
    4444#include <ipc/ipc.h>
     
    5252int nil_module_start_standalone(async_client_conn_t client_connection)
    5353{
    54         ERROR_DECLARE;
     54        ipcarg_t phonehash;
     55        int rc;
    5556       
    5657        async_set_client_connection(client_connection);
    5758        int net_phone = net_connect_module();
    58         ERROR_PROPAGATE(pm_init());
     59
     60        rc = pm_init();
     61        if (rc != EOK)
     62                return rc;
    5963       
    60         ipcarg_t phonehash;
    61         if (ERROR_OCCURRED(nil_initialize(net_phone)) ||
    62             ERROR_OCCURRED(REGISTER_ME(SERVICE_ETHERNET, &phonehash))) {
    63                 pm_destroy();
    64                 return ERROR_CODE;
    65         }
     64        rc = nil_initialize(net_phone);
     65        if (rc != EOK)
     66                goto out;
     67
     68        rc = REGISTER_ME(SERVICE_ETHERNET, &phonehash);
     69        if (rc != EOK)
     70                goto out;
    6671       
    6772        async_manager();
    68        
     73
     74out:
    6975        pm_destroy();
    70         return EOK;
     76        return rc;
    7177}
    7278
Note: See TracChangeset for help on using the changeset viewer.