Ignore:
Timestamp:
2011-02-09T11:46:47Z (14 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
cb15135a
Parents:
a49c4002 (diff), 0b37882 (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

Local modifications:

  • change pipefs and ext2 to build again (use async_* calls instead of ipc_*)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/part/mbr_part/mbr_part.c

    ra49c4002 rcf2af94  
    5757#include <stdlib.h>
    5858#include <unistd.h>
    59 #include <ipc/ipc.h>
    6059#include <ipc/bd.h>
    6160#include <async.h>
     
    242241                rc = devmap_device_register(name, &dev);
    243242                if (rc != EOK) {
    244                         devmap_hangup_phone(DEVMAP_DRIVER);
    245243                        printf(NAME ": Unable to register device %s.\n", name);
    246244                        return rc;
     
    393391        ipc_callid_t callid;
    394392        ipc_call_t call;
    395         ipcarg_t method;
     393        sysarg_t method;
    396394        devmap_handle_t dh;
    397         int flags;
     395        unsigned int flags;
    398396        int retval;
    399397        uint64_t ba;
     
    414412
    415413        if (part == NULL) {
    416                 ipc_answer_0(iid, EINVAL);
     414                async_answer_0(iid, EINVAL);
    417415                return;
    418416        }
     
    421419
    422420        /* Answer the IPC_M_CONNECT_ME_TO call. */
    423         ipc_answer_0(iid, EOK);
     421        async_answer_0(iid, EOK);
    424422
    425423        if (!async_share_out_receive(&callid, &comm_size, &flags)) {
    426                 ipc_answer_0(callid, EHANGUP);
     424                async_answer_0(callid, EHANGUP);
    427425                return;
    428426        }
     
    430428        fs_va = as_get_mappable_page(comm_size);
    431429        if (fs_va == NULL) {
    432                 ipc_answer_0(callid, EHANGUP);
     430                async_answer_0(callid, EHANGUP);
    433431                return;
    434432        }
     
    438436        while (1) {
    439437                callid = async_get_call(&call);
    440                 method = IPC_GET_METHOD(call);
     438                method = IPC_GET_IMETHOD(call);
    441439                switch (method) {
    442440                case IPC_M_PHONE_HUNGUP:
    443441                        /* The other side has hung up. */
    444                         ipc_answer_0(callid, EOK);
     442                        async_answer_0(callid, EOK);
    445443                        return;
    446444                case BD_READ_BLOCKS:
     
    465463                        break;
    466464                case BD_GET_BLOCK_SIZE:
    467                         ipc_answer_1(callid, EOK, block_size);
     465                        async_answer_1(callid, EOK, block_size);
    468466                        continue;
    469467                case BD_GET_NUM_BLOCKS:
    470                         ipc_answer_2(callid, EOK, LOWER32(part->length),
     468                        async_answer_2(callid, EOK, LOWER32(part->length),
    471469                            UPPER32(part->length));
    472470                        continue;
     
    475473                        break;
    476474                }
    477                 ipc_answer_0(callid, retval);
     475                async_answer_0(callid, retval);
    478476        }
    479477}
Note: See TracChangeset for help on using the changeset viewer.