Changeset b7fd2a0 in mainline for uspace/srv/bd/sata_bd/sata_bd.c
- Timestamp:
- 2018-01-13T03:10:29Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a53ed3a
- Parents:
- 36f0738
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/bd/sata_bd/sata_bd.c
r36f0738 rb7fd2a0 60 60 static int disk_count; 61 61 62 static int sata_bd_open(bd_srvs_t *, bd_srv_t *);63 static int sata_bd_close(bd_srv_t *);64 static int sata_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *, size_t);65 static int sata_bd_write_blocks(bd_srv_t *, aoff64_t, size_t, const void *, size_t);66 static int sata_bd_get_block_size(bd_srv_t *, size_t *);67 static int sata_bd_get_num_blocks(bd_srv_t *, aoff64_t *);62 static errno_t sata_bd_open(bd_srvs_t *, bd_srv_t *); 63 static errno_t sata_bd_close(bd_srv_t *); 64 static errno_t sata_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *, size_t); 65 static errno_t sata_bd_write_blocks(bd_srv_t *, aoff64_t, size_t, const void *, size_t); 66 static errno_t sata_bd_get_block_size(bd_srv_t *, size_t *); 67 static errno_t sata_bd_get_num_blocks(bd_srv_t *, aoff64_t *); 68 68 69 69 static bd_ops_t sata_bd_ops = { … … 88 88 * 89 89 */ 90 static int scan_device_tree(devman_handle_t funh)90 static errno_t scan_device_tree(devman_handle_t funh) 91 91 { 92 92 devman_handle_t devh; 93 93 devman_handle_t *cfuns; 94 94 size_t count, i; 95 int rc;95 errno_t rc; 96 96 97 97 /* If device is SATA, add device to the disk array. */ … … 148 148 * 149 149 */ 150 static int get_sata_disks(void)150 static errno_t get_sata_disks(void) 151 151 { 152 152 devman_handle_t root_fun; 153 int rc;153 errno_t rc; 154 154 155 155 disk_count = 0; … … 190 190 191 191 /** Open device. */ 192 static int sata_bd_open(bd_srvs_t *bds, bd_srv_t *bd)192 static errno_t sata_bd_open(bd_srvs_t *bds, bd_srv_t *bd) 193 193 { 194 194 return EOK; … … 196 196 197 197 /** Close device. */ 198 static int sata_bd_close(bd_srv_t *bd)198 static errno_t sata_bd_close(bd_srv_t *bd) 199 199 { 200 200 return EOK; … … 202 202 203 203 /** Read blocks from partition. */ 204 static int sata_bd_read_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt, void *buf,204 static errno_t sata_bd_read_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt, void *buf, 205 205 size_t size) 206 206 { … … 214 214 215 215 /** Write blocks to partition. */ 216 static int sata_bd_write_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt,216 static errno_t sata_bd_write_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt, 217 217 const void *buf, size_t size) 218 218 { … … 226 226 227 227 /** Get device block size. */ 228 static int sata_bd_get_block_size(bd_srv_t *bd, size_t *rsize)228 static errno_t sata_bd_get_block_size(bd_srv_t *bd, size_t *rsize) 229 229 { 230 230 sata_bd_dev_t *sbd = bd_srv_sata(bd); … … 235 235 236 236 /** Get number of blocks on device. */ 237 static int sata_bd_get_num_blocks(bd_srv_t *bd, aoff64_t *rnb)237 static errno_t sata_bd_get_num_blocks(bd_srv_t *bd, aoff64_t *rnb) 238 238 { 239 239 sata_bd_dev_t *sbd = bd_srv_sata(bd); … … 246 246 int main(int argc, char **argv) 247 247 { 248 int rc;248 errno_t rc; 249 249 category_id_t disk_cat; 250 250
Note:
See TracChangeset
for help on using the changeset viewer.