Changeset 5a6cc679 in mainline for uspace/srv/bd/sata_bd/sata_bd.c


Ignore:
Timestamp:
2018-01-31T02:21:24Z (8 years ago)
Author:
Jenda <jenda.jzqk73@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a0a9cc2
Parents:
132ab5d1
Message:

Merge commit '50f19b7ee8e94570b5c63896736c4eb49cfa18db' into forwardport

Not all ints are converted to errno_t in xhci tree yet, however it compiles and works :)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/bd/sata_bd/sata_bd.c

    r132ab5d1 r5a6cc679  
    6060static int disk_count;
    6161
    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 *);
     62static errno_t sata_bd_open(bd_srvs_t *, bd_srv_t *);
     63static errno_t sata_bd_close(bd_srv_t *);
     64static errno_t sata_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *, size_t);
     65static errno_t sata_bd_write_blocks(bd_srv_t *, aoff64_t, size_t, const void *, size_t);
     66static errno_t sata_bd_get_block_size(bd_srv_t *, size_t *);
     67static errno_t sata_bd_get_num_blocks(bd_srv_t *, aoff64_t *);
    6868
    6969static bd_ops_t sata_bd_ops = {
     
    8888 *
    8989 */
    90 static int scan_device_tree(devman_handle_t funh)
     90static errno_t scan_device_tree(devman_handle_t funh)
    9191{
    9292        devman_handle_t devh;
    9393        devman_handle_t *cfuns;
    9494        size_t count, i;
    95         int rc;
     95        errno_t rc;
    9696               
    9797        /* If device is SATA, add device to the disk array. */
     
    148148 *
    149149 */
    150 static int get_sata_disks(void)
     150static errno_t get_sata_disks(void)
    151151{
    152152        devman_handle_t root_fun;
    153         int rc;
     153        errno_t rc;
    154154       
    155155        disk_count = 0;
     
    190190
    191191/** Open device. */
    192 static int sata_bd_open(bd_srvs_t *bds, bd_srv_t *bd)
     192static errno_t sata_bd_open(bd_srvs_t *bds, bd_srv_t *bd)
    193193{
    194194        return EOK;
     
    196196
    197197/** Close device. */
    198 static int sata_bd_close(bd_srv_t *bd)
     198static errno_t sata_bd_close(bd_srv_t *bd)
    199199{
    200200        return EOK;
     
    202202
    203203/** Read blocks from partition. */
    204 static int sata_bd_read_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt, void *buf,
     204static errno_t sata_bd_read_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt, void *buf,
    205205    size_t size)
    206206{
     
    214214
    215215/** Write blocks to partition. */
    216 static int sata_bd_write_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt,
     216static errno_t sata_bd_write_blocks(bd_srv_t *bd, aoff64_t ba, size_t cnt,
    217217    const void *buf, size_t size)
    218218{
     
    226226
    227227/** Get device block size. */
    228 static int sata_bd_get_block_size(bd_srv_t *bd, size_t *rsize)
     228static errno_t sata_bd_get_block_size(bd_srv_t *bd, size_t *rsize)
    229229{
    230230        sata_bd_dev_t *sbd = bd_srv_sata(bd);
     
    235235
    236236/** Get number of blocks on device. */
    237 static int sata_bd_get_num_blocks(bd_srv_t *bd, aoff64_t *rnb)
     237static errno_t sata_bd_get_num_blocks(bd_srv_t *bd, aoff64_t *rnb)
    238238{
    239239        sata_bd_dev_t *sbd = bd_srv_sata(bd);
     
    246246int main(int argc, char **argv)
    247247{
    248         int rc;
     248        errno_t rc;
    249249        category_id_t disk_cat;
    250250       
Note: See TracChangeset for help on using the changeset viewer.