Changeset fe1776c2 in mainline for uspace/lib/drv/generic/remote_char_dev.c
- Timestamp:
- 2011-02-11T12:41:11Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d81ef61c
- Parents:
- 78d1525 (diff), 5d4193c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/remote_char_dev.c
r78d1525 rfe1776c2 33 33 */ 34 34 35 #include <ipc/ipc.h>36 35 #include <async.h> 37 36 #include <errno.h> … … 81 80 if (!async_data_read_receive(&cid, &len)) { 82 81 /* TODO handle protocol error. */ 83 ipc_answer_0(callid, EINVAL);82 async_answer_0(callid, EINVAL); 84 83 return; 85 84 } … … 87 86 if (!char_dev_ops->read) { 88 87 async_data_read_finalize(cid, NULL, 0); 89 ipc_answer_0(callid, ENOTSUP);88 async_answer_0(callid, ENOTSUP); 90 89 return; 91 90 } … … 100 99 /* Some error occured. */ 101 100 async_data_read_finalize(cid, buf, 0); 102 ipc_answer_0(callid, ret);101 async_answer_0(callid, ret); 103 102 return; 104 103 } … … 106 105 /* The operation was successful, return the number of data read. */ 107 106 async_data_read_finalize(cid, buf, ret); 108 ipc_answer_1(callid, EOK, ret);107 async_answer_1(callid, EOK, ret); 109 108 } 110 109 … … 128 127 if (!async_data_write_receive(&cid, &len)) { 129 128 /* TODO handle protocol error. */ 130 ipc_answer_0(callid, EINVAL);129 async_answer_0(callid, EINVAL); 131 130 return; 132 131 } … … 134 133 if (!char_dev_ops->write) { 135 134 async_data_write_finalize(cid, NULL, 0); 136 ipc_answer_0(callid, ENOTSUP);135 async_answer_0(callid, ENOTSUP); 137 136 return; 138 137 } … … 148 147 if (ret < 0) { 149 148 /* Some error occured. */ 150 ipc_answer_0(callid, ret);149 async_answer_0(callid, ret); 151 150 } else { 152 151 /* … … 154 153 * written. 155 154 */ 156 ipc_answer_1(callid, EOK, ret);155 async_answer_1(callid, EOK, ret); 157 156 } 158 157 }
Note:
See TracChangeset
for help on using the changeset viewer.