Changeset 8b5690f in mainline for uspace/srv/bd/file_bd/file_bd.c


Ignore:
Timestamp:
2011-02-03T05:11:01Z (13 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ba38f72c
Parents:
22027b6e (diff), 86d7bfa (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/srv/bd/file_bd/file_bd.c

    r22027b6e r8b5690f  
    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);
     
    179177        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        }
     
    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.