Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/block/usbmast/main.c

    rb7fd2a0 rcde999a  
    7777};
    7878
    79 static errno_t usbmast_fun_create(usbmast_dev_t *mdev, unsigned lun);
     79static int usbmast_fun_create(usbmast_dev_t *mdev, unsigned lun);
    8080static void usbmast_bd_connection(ipc_callid_t iid, ipc_call_t *icall,
    8181    void *arg);
    8282
    83 static errno_t usbmast_bd_open(bd_srvs_t *, bd_srv_t *);
    84 static errno_t usbmast_bd_close(bd_srv_t *);
    85 static errno_t usbmast_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *, size_t);
    86 static errno_t usbmast_bd_sync_cache(bd_srv_t *, aoff64_t, size_t);
    87 static errno_t usbmast_bd_write_blocks(bd_srv_t *, aoff64_t, size_t, const void *, size_t);
    88 static errno_t usbmast_bd_get_block_size(bd_srv_t *, size_t *);
    89 static errno_t usbmast_bd_get_num_blocks(bd_srv_t *, aoff64_t *);
     83static int usbmast_bd_open(bd_srvs_t *, bd_srv_t *);
     84static int usbmast_bd_close(bd_srv_t *);
     85static int usbmast_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *, size_t);
     86static int usbmast_bd_sync_cache(bd_srv_t *, aoff64_t, size_t);
     87static int usbmast_bd_write_blocks(bd_srv_t *, aoff64_t, size_t, const void *, size_t);
     88static int usbmast_bd_get_block_size(bd_srv_t *, size_t *);
     89static int usbmast_bd_get_num_blocks(bd_srv_t *, aoff64_t *);
    9090
    9191static bd_ops_t usbmast_bd_ops = {
     
    109109 * @return Error code.
    110110 */
    111 static errno_t usbmast_device_gone(usb_device_t *dev)
     111static int usbmast_device_gone(usb_device_t *dev)
    112112{
    113113        usbmast_dev_t *mdev = usb_device_data_get(dev);
     
    115115
    116116        for (size_t i = 0; i < mdev->lun_count; ++i) {
    117                 const errno_t rc = ddf_fun_unbind(mdev->luns[i]);
     117                const int rc = ddf_fun_unbind(mdev->luns[i]);
    118118                if (rc != EOK) {
    119119                        usb_log_error("Failed to unbind LUN function %zu: "
     
    133133 * @return Error code.
    134134 */
    135 static errno_t usbmast_device_remove(usb_device_t *dev)
     135static int usbmast_device_remove(usb_device_t *dev)
    136136{
    137137        //TODO: flush buffers, or whatever.
     
    145145 * @return Error code.
    146146 */
    147 static errno_t usbmast_device_add(usb_device_t *dev)
    148 {
    149         errno_t rc;
     147static int usbmast_device_add(usb_device_t *dev)
     148{
     149        int rc;
    150150        usbmast_dev_t *mdev = NULL;
    151151        unsigned i;
     
    199199                if (mdev->luns[i] == NULL)
    200200                        continue;
    201                 const errno_t rc = ddf_fun_unbind(mdev->luns[i]);
     201                const int rc = ddf_fun_unbind(mdev->luns[i]);
    202202                if (rc != EOK) {
    203203                        usb_log_warning("Failed to unbind LUN function %zu: "
     
    218218 * @return              EOK on success or an error code.
    219219 */
    220 static errno_t usbmast_fun_create(usbmast_dev_t *mdev, unsigned lun)
    221 {
    222         errno_t rc;
     220static int usbmast_fun_create(usbmast_dev_t *mdev, unsigned lun)
     221{
     222        int rc;
    223223        char *fun_name = NULL;
    224224        ddf_fun_t *fun = NULL;
     
    327327
    328328/** Open device. */
    329 static errno_t usbmast_bd_open(bd_srvs_t *bds, bd_srv_t *bd)
     329static int usbmast_bd_open(bd_srvs_t *bds, bd_srv_t *bd)
    330330{
    331331        return EOK;
     
    333333
    334334/** Close device. */
    335 static errno_t usbmast_bd_close(bd_srv_t *bd)
     335static int usbmast_bd_close(bd_srv_t *bd)
    336336{
    337337        return EOK;
     
    339339
    340340/** Read blocks from the device. */
    341 static errno_t usbmast_bd_read_blocks(bd_srv_t *bd, uint64_t ba, size_t cnt, void *buf,
     341static int usbmast_bd_read_blocks(bd_srv_t *bd, uint64_t ba, size_t cnt, void *buf,
    342342    size_t size)
    343343{
     
    351351
    352352/** Synchronize blocks to nonvolatile storage. */
    353 static errno_t usbmast_bd_sync_cache(bd_srv_t *bd, uint64_t ba, size_t cnt)
     353static int usbmast_bd_sync_cache(bd_srv_t *bd, uint64_t ba, size_t cnt)
    354354{
    355355        usbmast_fun_t *mfun = bd_srv_usbmast(bd);
     
    359359
    360360/** Write blocks to the device. */
    361 static errno_t usbmast_bd_write_blocks(bd_srv_t *bd, uint64_t ba, size_t cnt,
     361static int usbmast_bd_write_blocks(bd_srv_t *bd, uint64_t ba, size_t cnt,
    362362    const void *buf, size_t size)
    363363{
     
    371371
    372372/** Get device block size. */
    373 static errno_t usbmast_bd_get_block_size(bd_srv_t *bd, size_t *rsize)
     373static int usbmast_bd_get_block_size(bd_srv_t *bd, size_t *rsize)
    374374{
    375375        usbmast_fun_t *mfun = bd_srv_usbmast(bd);
     
    379379
    380380/** Get number of blocks on device. */
    381 static errno_t usbmast_bd_get_num_blocks(bd_srv_t *bd, aoff64_t *rnb)
     381static int usbmast_bd_get_num_blocks(bd_srv_t *bd, aoff64_t *rnb)
    382382{
    383383        usbmast_fun_t *mfun = bd_srv_usbmast(bd);
Note: See TracChangeset for help on using the changeset viewer.