Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/io/con_srv.c

    r8d2dd7f2 rc8211849  
    9393        }
    9494
    95         rc = srv->srvs->ops->read(srv, buf, size);
    96         if (rc < 0) {
     95        size_t nread;
     96        rc = srv->srvs->ops->read(srv, buf, size, &nread);
     97        if (rc != EOK) {
    9798                async_answer_0(rcallid, rc);
    9899                async_answer_0(callid, rc);
     
    101102        }
    102103
    103         async_data_read_finalize(rcallid, buf, size);
     104        async_data_read_finalize(rcallid, buf, nread);
    104105        free(buf);
    105106
    106         if (rc >= 0)
    107                 async_answer_1(callid, EOK, rc);
    108         else
    109                 async_answer_0(callid, rc);
     107        async_answer_1(callid, EOK, nread);
    110108}
    111109
     
    128126        }
    129127
    130         rc = srv->srvs->ops->write(srv, data, size);
     128        size_t nwritten = 0;
     129        rc = srv->srvs->ops->write(srv, data, size, &nwritten);
    131130        free(data);
    132131
    133         if (rc >= 0)
    134                 async_answer_1(callid, EOK, rc);
    135         else
    136                 async_answer_0(callid, rc);
     132        async_answer_1(callid, rc, nwritten);
    137133}
    138134
Note: See TracChangeset for help on using the changeset viewer.