Changeset c8211849 in mainline for uspace/lib/c/generic/io/con_srv.c
- Timestamp:
- 2017-12-08T21:03:35Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a99cbc1e
- Parents:
- c19a5a59
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-07 23:08:49)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-08 21:03:35)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/io/con_srv.c
rc19a5a59 rc8211849 93 93 } 94 94 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) { 97 98 async_answer_0(rcallid, rc); 98 99 async_answer_0(callid, rc); … … 101 102 } 102 103 103 async_data_read_finalize(rcallid, buf, size);104 async_data_read_finalize(rcallid, buf, nread); 104 105 free(buf); 105 106 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); 110 108 } 111 109 … … 128 126 } 129 127 130 rc = srv->srvs->ops->write(srv, data, size); 128 size_t nwritten = 0; 129 rc = srv->srvs->ops->write(srv, data, size, &nwritten); 131 130 free(data); 132 131 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); 137 133 } 138 134
Note:
See TracChangeset
for help on using the changeset viewer.