Changes in kernel/generic/src/udebug/udebug_ipc.c [63e27ef:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/udebug/udebug_ipc.c
r63e27ef rb7fd2a0 51 51 #include <udebug/udebug_ipc.h> 52 52 53 int udebug_request_preprocess(call_t *call, phone_t *phone)53 errno_t udebug_request_preprocess(call_t *call, phone_t *phone) 54 54 { 55 55 switch (IPC_GET_ARG1(call->data)) { … … 71 71 static void udebug_receive_begin(call_t *call) 72 72 { 73 int rc; 74 75 rc = udebug_begin(call); 76 if (rc < 0) { 73 errno_t rc; 74 bool active; 75 76 rc = udebug_begin(call, &active); 77 if (rc != EOK) { 77 78 IPC_SET_RETVAL(call->data, rc); 78 79 ipc_answer(&TASK->kb.box, call); … … 84 85 * send a reply. 85 86 */ 86 if ( rc != 0) {87 IPC_SET_RETVAL(call->data, 0);87 if (active) { 88 IPC_SET_RETVAL(call->data, EOK); 88 89 ipc_answer(&TASK->kb.box, call); 89 90 } … … 97 98 static void udebug_receive_end(call_t *call) 98 99 { 99 int rc;100 errno_t rc; 100 101 101 102 rc = udebug_end(); … … 112 113 static void udebug_receive_set_evmask(call_t *call) 113 114 { 114 int rc;115 errno_t rc; 115 116 udebug_evmask_t mask; 116 117 … … 131 132 { 132 133 thread_t *t; 133 int rc;134 errno_t rc; 134 135 135 136 t = (thread_t *)IPC_GET_ARG2(call->data); 136 137 137 138 rc = udebug_go(t, call); 138 if (rc < 0) {139 if (rc != EOK) { 139 140 IPC_SET_RETVAL(call->data, rc); 140 141 ipc_answer(&TASK->kb.box, call); … … 151 152 { 152 153 thread_t *t; 153 int rc;154 errno_t rc; 154 155 155 156 t = (thread_t *)IPC_GET_ARG2(call->data); … … 171 172 void *buffer; 172 173 size_t copied, needed; 173 int rc;174 errno_t rc; 174 175 175 176 uspace_addr = IPC_GET_ARG2(call->data); /* Destination address */ … … 181 182 */ 182 183 rc = udebug_thread_read(&buffer, buf_size, &copied, &needed); 183 if (rc < 0) {184 if (rc != EOK) { 184 185 IPC_SET_RETVAL(call->data, rc); 185 186 ipc_answer(&TASK->kb.box, call); … … 306 307 thread_t *t; 307 308 sysarg_t uspace_addr; 308 int rc;309 errno_t rc; 309 310 void *buffer; 310 311 … … 345 346 sysarg_t to_copy; 346 347 void *buffer = NULL; 347 int rc;348 errno_t rc; 348 349 349 350 t = (thread_t *) IPC_GET_ARG2(call->data); 350 351 351 352 rc = udebug_regs_read(t, &buffer); 352 if (rc < 0) {353 if (rc != EOK) { 353 354 IPC_SET_RETVAL(call->data, rc); 354 355 ipc_answer(&TASK->kb.box, call); … … 389 390 unsigned size; 390 391 void *buffer = NULL; 391 int rc;392 errno_t rc; 392 393 393 394 uspace_dst = IPC_GET_ARG2(call->data); … … 396 397 397 398 rc = udebug_mem_read(uspace_src, size, &buffer); 398 if (rc < 0) {399 if (rc != EOK) { 399 400 IPC_SET_RETVAL(call->data, rc); 400 401 ipc_answer(&TASK->kb.box, call);
Note:
See TracChangeset
for help on using the changeset viewer.