Changes in uspace/srv/ns/clonable.c [3e6a98c5:566992e1] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/ns/clonable.c
r3e6a98c5 r566992e1 46 46 typedef struct { 47 47 link_t link; 48 s ysarg_t service;49 i pc_call_t call;48 service_t service; 49 iface_t iface; 50 50 ipc_callid_t callid; 51 sysarg_t arg3; 51 52 } cs_req_t; 52 53 … … 61 62 62 63 /** Return true if @a service is clonable. */ 63 bool service_clonable( int service)64 bool service_clonable(service_t service) 64 65 { 65 return (service == SERVICE_LOAD );66 return (service == SERVICE_LOADER); 66 67 } 67 68 … … 73 74 * 74 75 */ 75 void register_clonable(s ysarg_t service, sysarg_t phone, ipc_call_t *call,76 void register_clonable(service_t service, sysarg_t phone, ipc_call_t *call, 76 77 ipc_callid_t callid) 77 78 { 78 link_t *req_link; 79 80 req_link = list_first(&cs_req); 79 link_t *req_link = list_first(&cs_req); 81 80 if (req_link == NULL) { 82 81 /* There was no pending connection request. */ … … 90 89 91 90 /* Currently we can only handle a single type of clonable service. */ 92 assert(csr->service == SERVICE_LOAD );91 assert(csr->service == SERVICE_LOADER); 93 92 94 93 ipc_answer_0(callid, EOK); 95 94 96 ipc_forward_fast(csr->callid, phone, IPC_GET_ARG2(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); 98 97 99 98 free(csr); … … 104 103 * 105 104 * @param service Service to be connected to. 105 * @param iface Interface to be connected to. 106 106 * @param call Pointer to call structure. 107 107 * @param callid Call ID of the request. … … 110 110 * 111 111 */ 112 void connect_to_clonable(s ysarg_t service, ipc_call_t *call,112 void connect_to_clonable(service_t service, iface_t iface, ipc_call_t *call, 113 113 ipc_callid_t callid) 114 114 { 115 assert(service == SERVICE_LOAD );115 assert(service == SERVICE_LOADER); 116 116 117 117 cs_req_t *csr = malloc(sizeof(cs_req_t)); … … 132 132 link_initialize(&csr->link); 133 133 csr->service = service; 134 csr-> call = *call;134 csr->iface = iface; 135 135 csr->callid = callid; 136 csr->arg3 = IPC_GET_ARG3(*call); 136 137 137 138 /*
Note:
See TracChangeset
for help on using the changeset viewer.