Changeset b7a4d06 in mainline for uspace/lib/c/generic/vbd.c


Ignore:
Timestamp:
2015-07-18T12:55:12Z (10 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c43db5f
Parents:
70815a24
Message:

Most of extended (but not logical) partition support.

File:
1 edited

Legend:

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

    r70815a24 rb7a4d06  
    264264{
    265265        async_exch_t *exch;
    266         sysarg_t index;
    267         sysarg_t b0_lo, b0_hi;
    268         sysarg_t nb_lo, nb_hi;
    269         int retval;
    270 
    271         exch = async_exchange_begin(vbd->sess);
    272         retval = async_req_1_5(exch, VBD_PART_GET_INFO, part, &index,
    273             &b0_lo, &b0_hi, &nb_lo, &nb_hi);
    274         async_exchange_end(exch);
    275 
    276         if (retval != EOK)
    277                 return EIO;
    278 
    279         pinfo->index = index;
    280         pinfo->block0 = MERGE_LOUP32(b0_lo, b0_hi);
    281         pinfo->nblocks = MERGE_LOUP32(nb_lo, nb_hi);
     266        sysarg_t retval;
     267        ipc_call_t answer;
     268
     269        exch = async_exchange_begin(vbd->sess);
     270        aid_t req = async_send_1(exch, VBD_PART_GET_INFO, part, &answer);
     271        int rc = async_data_read_start(exch, pinfo, sizeof(vbd_part_info_t));
     272        async_exchange_end(exch);
     273
     274        if (rc != EOK) {
     275                async_forget(req);
     276                return EIO;
     277        }
     278
     279        async_wait_for(req, &retval);
     280        if (retval != EOK)
     281                return EIO;
     282
    282283        return EOK;
    283284}
Note: See TracChangeset for help on using the changeset viewer.