Changeset 0773396 in mainline for uspace/lib/c/generic/inetcfg.c


Ignore:
Timestamp:
2013-12-25T13:05:25Z (10 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
bc54126c
Parents:
f4a47e52 (diff), 6946f23 (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 mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/inetcfg.c

    rf4a47e52 r0773396  
    267267}
    268268
     269int inetcfg_link_add(sysarg_t link_id)
     270{
     271        async_exch_t *exch = async_exchange_begin(inetcfg_sess);
     272
     273        int rc = async_req_1_0(exch, INETCFG_LINK_ADD, link_id);
     274        async_exchange_end(exch);
     275
     276        return rc;
     277}
     278
    269279int inetcfg_link_get(sysarg_t link_id, inet_link_info_t *linfo)
    270280{
     
    279289        aid_t req = async_send_1(exch, INETCFG_LINK_GET, link_id, &answer);
    280290        aid_t dreq = async_data_read(exch, name_buf, LOC_NAME_MAXLEN, &dreply);
     291        int rc = async_data_read_start(exch, &linfo->mac_addr, sizeof(addr48_t));
    281292        async_wait_for(dreq, &dretval);
    282293
    283294        async_exchange_end(exch);
    284295
    285         if (dretval != EOK) {
     296        if (dretval != EOK || rc != EOK) {
    286297                async_forget(req);
    287298                return dretval;
     
    302313
    303314        return EOK;
     315}
     316
     317int inetcfg_link_remove(sysarg_t link_id)
     318{
     319        async_exch_t *exch = async_exchange_begin(inetcfg_sess);
     320
     321        int rc = async_req_1_0(exch, INETCFG_LINK_REMOVE, link_id);
     322        async_exchange_end(exch);
     323
     324        return rc;
    304325}
    305326
Note: See TracChangeset for help on using the changeset viewer.