Changeset 8b5690f in mainline for uspace/srv/bd/gxe_bd/gxe_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/gxe_bd/gxe_bd.c

    r22027b6e r8b5690f  
    3939#include <libarch/ddi.h>
    4040#include <ddi.h>
    41 #include <ipc/ipc.h>
    4241#include <ipc/bd.h>
    4342#include <async.h>
     
    145144                rc = devmap_device_register(name, &devmap_handle[i]);
    146145                if (rc != EOK) {
    147                         devmap_hangup_phone(DEVMAP_DRIVER);
    148146                        printf(NAME ": Unable to register device %s.\n", name);
    149147                        return rc;
     
    162160        sysarg_t method;
    163161        devmap_handle_t dh;
    164         int flags;
     162        unsigned int flags;
    165163        int retval;
    166164        uint64_t ba;
     
    178176
    179177        if (disk_id < 0) {
    180                 ipc_answer_0(iid, EINVAL);
     178                async_answer_0(iid, EINVAL);
    181179                return;
    182180        }
    183181
    184182        /* Answer the IPC_M_CONNECT_ME_TO call. */
    185         ipc_answer_0(iid, EOK);
     183        async_answer_0(iid, EOK);
    186184
    187185        if (!async_share_out_receive(&callid, &comm_size, &flags)) {
    188                 ipc_answer_0(callid, EHANGUP);
     186                async_answer_0(callid, EHANGUP);
    189187                return;
    190188        }
    191189
    192190        if (comm_size < block_size) {
    193                 ipc_answer_0(callid, EHANGUP);
     191                async_answer_0(callid, EHANGUP);
    194192                return;
    195193        }
     
    197195        fs_va = as_get_mappable_page(comm_size);
    198196        if (fs_va == NULL) {
    199                 ipc_answer_0(callid, EHANGUP);
     197                async_answer_0(callid, EHANGUP);
    200198                return;
    201199        }
     
    209207                case IPC_M_PHONE_HUNGUP:
    210208                        /* The other side has hung up. */
    211                         ipc_answer_0(callid, EOK);
     209                        async_answer_0(callid, EOK);
    212210                        return;
    213211                case BD_READ_BLOCKS:
     
    232230                        break;
    233231                case BD_GET_BLOCK_SIZE:
    234                         ipc_answer_1(callid, EOK, block_size);
     232                        async_answer_1(callid, EOK, block_size);
    235233                        continue;
    236234                case BD_GET_NUM_BLOCKS:
     
    241239                        break;
    242240                }
    243                 ipc_answer_0(callid, retval);
     241                async_answer_0(callid, retval);
    244242        }
    245243}
Note: See TracChangeset for help on using the changeset viewer.