Changes in uspace/lib/drv/generic/remote_ahci.c [58563585:1d6dd2a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/drv/generic/remote_ahci.c
r58563585 r1d6dd2a 39 39 #include <stdio.h> 40 40 #include <macros.h> 41 #include <str.h> 41 42 #include "ahci_iface.h" 42 43 #include "ddf/driver.h" … … 65 66 66 67 char devn[MAX_NAME_LENGTH]; 67 int rc = devman_fun_get_name(funh, devn, MAX_NAME_LENGTH);68 errno_t rc = devman_fun_get_name(funh, devn, MAX_NAME_LENGTH); 68 69 if (rc != EOK) 69 70 return NULL; … … 83 84 } 84 85 85 int ahci_get_sata_device_name(async_sess_t *sess, size_t sata_dev_name_length,86 errno_t ahci_get_sata_device_name(async_sess_t *sess, size_t sata_dev_name_length, 86 87 char *sata_dev_name) 87 88 { … … 95 96 async_data_read_start(exch, sata_dev_name, sata_dev_name_length); 96 97 97 sysarg_t rc;98 errno_t rc; 98 99 async_wait_for(req, &rc); 99 100 … … 101 102 } 102 103 103 int ahci_get_num_blocks(async_sess_t *sess, uint64_t *blocks)104 errno_t ahci_get_num_blocks(async_sess_t *sess, uint64_t *blocks) 104 105 { 105 106 async_exch_t *exch = async_exchange_begin(sess); … … 109 110 sysarg_t blocks_hi; 110 111 sysarg_t blocks_lo; 111 int rc = async_req_1_2(exch, DEV_IFACE_ID(AHCI_DEV_IFACE),112 errno_t rc = async_req_1_2(exch, DEV_IFACE_ID(AHCI_DEV_IFACE), 112 113 IPC_M_AHCI_GET_NUM_BLOCKS, &blocks_hi, &blocks_lo); 113 114 … … 122 123 } 123 124 124 int ahci_get_block_size(async_sess_t *sess, size_t *blocks_size)125 errno_t ahci_get_block_size(async_sess_t *sess, size_t *blocks_size) 125 126 { 126 127 async_exch_t *exch = async_exchange_begin(sess); … … 129 130 130 131 sysarg_t bs; 131 int rc = async_req_1_1(exch, DEV_IFACE_ID(AHCI_DEV_IFACE),132 errno_t rc = async_req_1_1(exch, DEV_IFACE_ID(AHCI_DEV_IFACE), 132 133 IPC_M_AHCI_GET_BLOCK_SIZE, &bs); 133 134 … … 140 141 } 141 142 142 int ahci_read_blocks(async_sess_t *sess, uint64_t blocknum, size_t count,143 errno_t ahci_read_blocks(async_sess_t *sess, uint64_t blocknum, size_t count, 143 144 void *buf) 144 145 { … … 155 156 async_exchange_end(exch); 156 157 157 sysarg_t rc;158 errno_t rc; 158 159 async_wait_for(req, &rc); 159 160 … … 161 162 } 162 163 163 int ahci_write_blocks(async_sess_t *sess, uint64_t blocknum, size_t count,164 errno_t ahci_write_blocks(async_sess_t *sess, uint64_t blocknum, size_t count, 164 165 void* buf) 165 166 { … … 175 176 async_exchange_end(exch); 176 177 177 sysarg_t rc;178 errno_t rc; 178 179 async_wait_for(req, &rc); 179 180 … … 227 228 } 228 229 229 const int ret = ahci_iface->get_sata_device_name(fun,230 const errno_t ret = ahci_iface->get_sata_device_name(fun, 230 231 sata_dev_name_length, sata_dev_name); 231 232 … … 251 252 252 253 uint64_t blocks; 253 const int ret = ahci_iface->get_num_blocks(fun, &blocks);254 const errno_t ret = ahci_iface->get_num_blocks(fun, &blocks); 254 255 255 256 if (ret != EOK) … … 270 271 271 272 size_t blocks; 272 const int ret = ahci_iface->get_block_size(fun, &blocks);273 const errno_t ret = ahci_iface->get_block_size(fun, &blocks); 273 274 274 275 if (ret != EOK) … … 302 303 const size_t cnt = (size_t) DEV_IPC_GET_ARG3(*call); 303 304 304 const int ret = ahci_iface->read_blocks(fun, blocknum, cnt, buf);305 const errno_t ret = ahci_iface->read_blocks(fun, blocknum, cnt, buf); 305 306 306 307 async_answer_0(callid, ret); … … 331 332 const size_t cnt = (size_t) DEV_IPC_GET_ARG3(*call); 332 333 333 const int ret = ahci_iface->write_blocks(fun, blocknum, cnt, buf);334 const errno_t ret = ahci_iface->write_blocks(fun, blocknum, cnt, buf); 334 335 335 336 async_answer_0(callid, ret);
Note:
See TracChangeset
for help on using the changeset viewer.