Changeset cf2af94 in mainline for uspace/srv/bd/file_bd/file_bd.c


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/file_bd/file_bd.c

    ra49c4002 rcf2af94  
    4141#include <stdio.h>
    4242#include <unistd.h>
    43 #include <ipc/ipc.h>
    4443#include <ipc/bd.h>
    4544#include <async.h>
     
    120119        rc = devmap_device_register(device_name, &devmap_handle);
    121120        if (rc != EOK) {
    122                 devmap_hangup_phone(DEVMAP_DRIVER);
    123121                printf(NAME ": Unable to register device '%s'.\n",
    124122                        device_name);
     
    177175        ipc_callid_t callid;
    178176        ipc_call_t call;
    179         ipcarg_t method;
     177        sysarg_t method;
    180178        size_t comm_size;
    181         int flags;
     179        unsigned int flags;
    182180        int retval;
    183181        uint64_t ba;
     
    185183
    186184        /* Answer the IPC_M_CONNECT_ME_TO call. */
    187         ipc_answer_0(iid, EOK);
     185        async_answer_0(iid, EOK);
    188186
    189187        if (!async_share_out_receive(&callid, &comm_size, &flags)) {
    190                 ipc_answer_0(callid, EHANGUP);
     188                async_answer_0(callid, EHANGUP);
    191189                return;
    192190        }
     
    194192        fs_va = as_get_mappable_page(comm_size);
    195193        if (fs_va == NULL) {
    196                 ipc_answer_0(callid, EHANGUP);
     194                async_answer_0(callid, EHANGUP);
    197195                return;
    198196        }
     
    202200        while (1) {
    203201                callid = async_get_call(&call);
    204                 method = IPC_GET_METHOD(call);
     202                method = IPC_GET_IMETHOD(call);
    205203                switch (method) {
    206204                case IPC_M_PHONE_HUNGUP:
    207205                        /* The other side has hung up. */
    208                         ipc_answer_0(callid, EOK);
     206                        async_answer_0(callid, EOK);
    209207                        return;
    210208                case BD_READ_BLOCKS:
     
    229227                        break;
    230228                case BD_GET_BLOCK_SIZE:
    231                         ipc_answer_1(callid, EOK, block_size);
     229                        async_answer_1(callid, EOK, block_size);
    232230                        continue;
    233231                case BD_GET_NUM_BLOCKS:
    234                         ipc_answer_2(callid, EOK, LOWER32(num_blocks),
     232                        async_answer_2(callid, EOK, LOWER32(num_blocks),
    235233                            UPPER32(num_blocks));
    236234                        continue;
     
    239237                        break;
    240238                }
    241                 ipc_answer_0(callid, retval);
     239                async_answer_0(callid, retval);
    242240        }
    243241}
Note: See TracChangeset for help on using the changeset viewer.