Changeset bfc5577a in mainline
- Timestamp:
- 2012-04-18T20:10:55Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a44b58c
- Parents:
- f4ebaf3c
- Location:
- uspace/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/device/clock_dev.c
rf4ebaf3c rbfc5577a 49 49 clock_dev_time_get(async_sess_t *sess, struct tm *t) 50 50 { 51 ipc_call_t answer;52 51 aid_t req; 53 52 int ret; … … 56 55 57 56 req = async_send_1(exch, DEV_IFACE_ID(CLOCK_DEV_IFACE), 58 CLOCK_DEV_TIME_GET, &answer);57 CLOCK_DEV_TIME_GET, NULL); 59 58 ret = async_data_read_start(exch, t, sizeof(*t)); 60 59 … … 69 68 70 69 async_wait_for(req, &rc); 71 if ((int) rc != EOK) 72 return ret; 73 74 return (int) IPC_GET_ARG1(answer); 70 return (int)rc; 75 71 } 76 72 … … 85 81 clock_dev_time_set(async_sess_t *sess, struct tm *t) 86 82 { 87 ipc_call_t answer;88 83 aid_t req; 89 84 int ret; … … 92 87 93 88 req = async_send_1(exch, DEV_IFACE_ID(CLOCK_DEV_IFACE), 94 CLOCK_DEV_TIME_SET, &answer);89 CLOCK_DEV_TIME_SET, NULL); 95 90 ret = async_data_write_start(exch, t, sizeof(*t)); 96 91 … … 105 100 106 101 async_wait_for(req, &rc); 107 if ((int) rc != EOK) 108 return ret; 109 110 return (int) IPC_GET_ARG1(answer); 102 return (int)rc; 111 103 } 112 104 -
uspace/lib/drv/generic/remote_clock_dev.c
rf4ebaf3c rbfc5577a 96 96 async_data_read_finalize(cid, NULL, 0); 97 97 async_answer_0(callid, rc); 98 return; 98 99 } 99 100 100 101 /* The operation was successful */ 101 102 async_data_read_finalize(cid, &t, sizeof(struct tm)); 102 async_answer_ 1(callid, EOK, rc);103 async_answer_0(callid, rc); 103 104 } 104 105 … … 133 134 134 135 rc = (*clock_dev_ops->time_set)(fun, &t); 135 if (rc < 0) {136 /* Some error occurred */137 async_answer_0(callid, rc);138 return;139 }140 136 141 async_answer_ 1(callid, EOK, rc);137 async_answer_0(callid, rc); 142 138 } 143 139
Note:
See TracChangeset
for help on using the changeset viewer.