Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/udebug/udebug_ipc.c

    r63e27ef rb7fd2a0  
    5151#include <udebug/udebug_ipc.h>
    5252
    53 int udebug_request_preprocess(call_t *call, phone_t *phone)
     53errno_t udebug_request_preprocess(call_t *call, phone_t *phone)
    5454{
    5555        switch (IPC_GET_ARG1(call->data)) {
     
    7171static void udebug_receive_begin(call_t *call)
    7272{
    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) {
    7778                IPC_SET_RETVAL(call->data, rc);
    7879                ipc_answer(&TASK->kb.box, call);
     
    8485         * send a reply.
    8586         */
    86         if (rc != 0) {
    87                 IPC_SET_RETVAL(call->data, 0);
     87        if (active) {
     88                IPC_SET_RETVAL(call->data, EOK);
    8889                ipc_answer(&TASK->kb.box, call);
    8990        }
     
    9798static void udebug_receive_end(call_t *call)
    9899{
    99         int rc;
     100        errno_t rc;
    100101
    101102        rc = udebug_end();
     
    112113static void udebug_receive_set_evmask(call_t *call)
    113114{
    114         int rc;
     115        errno_t rc;
    115116        udebug_evmask_t mask;
    116117
     
    131132{
    132133        thread_t *t;
    133         int rc;
     134        errno_t rc;
    134135
    135136        t = (thread_t *)IPC_GET_ARG2(call->data);
    136137
    137138        rc = udebug_go(t, call);
    138         if (rc < 0) {
     139        if (rc != EOK) {
    139140                IPC_SET_RETVAL(call->data, rc);
    140141                ipc_answer(&TASK->kb.box, call);
     
    151152{
    152153        thread_t *t;
    153         int rc;
     154        errno_t rc;
    154155
    155156        t = (thread_t *)IPC_GET_ARG2(call->data);
     
    171172        void *buffer;
    172173        size_t copied, needed;
    173         int rc;
     174        errno_t rc;
    174175
    175176        uspace_addr = IPC_GET_ARG2(call->data); /* Destination address */
     
    181182         */
    182183        rc = udebug_thread_read(&buffer, buf_size, &copied, &needed);
    183         if (rc < 0) {
     184        if (rc != EOK) {
    184185                IPC_SET_RETVAL(call->data, rc);
    185186                ipc_answer(&TASK->kb.box, call);
     
    306307        thread_t *t;
    307308        sysarg_t uspace_addr;
    308         int rc;
     309        errno_t rc;
    309310        void *buffer;
    310311
     
    345346        sysarg_t to_copy;
    346347        void *buffer = NULL;
    347         int rc;
     348        errno_t rc;
    348349
    349350        t = (thread_t *) IPC_GET_ARG2(call->data);
    350351
    351352        rc = udebug_regs_read(t, &buffer);
    352         if (rc < 0) {
     353        if (rc != EOK) {
    353354                IPC_SET_RETVAL(call->data, rc);
    354355                ipc_answer(&TASK->kb.box, call);
     
    389390        unsigned size;
    390391        void *buffer = NULL;
    391         int rc;
     392        errno_t rc;
    392393
    393394        uspace_dst = IPC_GET_ARG2(call->data);
     
    396397
    397398        rc = udebug_mem_read(uspace_src, size, &buffer);
    398         if (rc < 0) {
     399        if (rc != EOK) {
    399400                IPC_SET_RETVAL(call->data, rc);
    400401                ipc_answer(&TASK->kb.box, call);
Note: See TracChangeset for help on using the changeset viewer.