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