Changeset 9cfbf2f in mainline for uspace/srv/ns/clonable.c


Ignore:
Timestamp:
2015-08-22T03:53:34Z (9 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
57dea62
Parents:
1a522e5
Message:

improve code readability
coding style

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/ns/clonable.c

    r1a522e5 r9cfbf2f  
    4646typedef struct {
    4747        link_t link;
    48         sysarg_t service;
    49         ipc_call_t call;
     48        service_t service;
     49        iface_t iface;
    5050        ipc_callid_t callid;
     51        sysarg_t arg3;
    5152} cs_req_t;
    5253
     
    6162
    6263/** Return true if @a service is clonable. */
    63 bool service_clonable(int service)
     64bool service_clonable(service_t service)
    6465{
    6566        return (service == SERVICE_LOAD);
     
    7374 *
    7475 */
    75 void register_clonable(sysarg_t service, sysarg_t phone, ipc_call_t *call,
     76void register_clonable(service_t service, sysarg_t phone, ipc_call_t *call,
    7677    ipc_callid_t callid)
    7778{
    78         link_t *req_link;
    79 
    80         req_link = list_first(&cs_req);
     79        link_t *req_link = list_first(&cs_req);
    8180        if (req_link == NULL) {
    8281                /* There was no pending connection request. */
     
    9493        ipc_answer_0(callid, EOK);
    9594       
    96         ipc_forward_fast(csr->callid, phone, IPC_GET_ARG1(csr->call),
    97             IPC_GET_ARG3(csr->call), 0, IPC_FF_NONE);
     95        ipc_forward_fast(csr->callid, phone, csr->iface, csr->arg3, 0,
     96            IPC_FF_NONE);
    9897       
    9998        free(csr);
     
    104103 *
    105104 * @param service Service to be connected to.
     105 * @param iface   Interface to be connected to.
    106106 * @param call    Pointer to call structure.
    107107 * @param callid  Call ID of the request.
     
    110110 *
    111111 */
    112 void connect_to_clonable(sysarg_t service, ipc_call_t *call,
     112void connect_to_clonable(service_t service, iface_t iface, ipc_call_t *call,
    113113    ipc_callid_t callid)
    114114{
     
    132132        link_initialize(&csr->link);
    133133        csr->service = service;
    134         csr->call = *call;
     134        csr->iface = iface;
    135135        csr->callid = callid;
     136        csr->arg3 = IPC_GET_ARG3(*call);
    136137       
    137138        /*
Note: See TracChangeset for help on using the changeset viewer.