Changeset 135486d in mainline for uspace/srv/bd/sata_bd/sata_bd.c


Ignore:
Timestamp:
2012-08-15T14:44:59Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
affaf2e, b546231
Parents:
4802dd7
Message:

Allow more than one client connection to block device.

File:
1 edited

Legend:

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

    r4802dd7 r135486d  
    5757static int disk_count;
    5858
    59 static int sata_bd_open(bd_srv_t *);
     59static int sata_bd_open(bd_srvs_t *, bd_srv_t *);
    6060static int sata_bd_close(bd_srv_t *);
    6161static int sata_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *, size_t);
     
    7575static sata_bd_dev_t *bd_srv_sata(bd_srv_t *bd)
    7676{
    77         return (sata_bd_dev_t *)bd->arg;
     77        return (sata_bd_dev_t *)bd->srvs->sarg;
    7878}
    7979
     
    104104                ahci_get_num_blocks(disk[disk_count].sess, &disk[disk_count].blocks);
    105105               
    106                 bd_srv_init(&disk[disk_count].bd);
    107                 disk[disk_count].bd.ops = &sata_bd_ops;
    108                 disk[disk_count].bd.arg = &disk[disk_count];
     106                bd_srvs_init(&disk[disk_count].bds);
     107                disk[disk_count].bds.ops = &sata_bd_ops;
     108                disk[disk_count].bds.sarg = &disk[disk_count];
    109109               
    110110                printf("Device %s - %s , blocks: %lu, block_size: %lu\n",
     
    183183        }
    184184
    185         bd_conn(iid, icall, &disk[disk_id].bd);
     185        bd_conn(iid, icall, &disk[disk_id].bds);
    186186}
    187187
    188188/** Open device. */
    189 static int sata_bd_open(bd_srv_t *bd)
     189static int sata_bd_open(bd_srvs_t *bds, bd_srv_t *bd)
    190190{
    191191        return EOK;
Note: See TracChangeset for help on using the changeset viewer.