Fork us on GitHub Follow us on Facebook Follow us on Twitter

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


Ignore:
Timestamp:
2012-08-15T14:44:59Z (9 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master
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/ata_bd/ata_bd.c

    r4802dd7 r135486d  
    104104static void ata_bd_connection(ipc_callid_t iid, ipc_call_t *icall, void *);
    105105
    106 static int ata_bd_open(bd_srv_t *);
     106static int ata_bd_open(bd_srvs_t *, bd_srv_t *);
    107107static int ata_bd_close(bd_srv_t *);
    108108static int ata_bd_read_blocks(bd_srv_t *, uint64_t ba, size_t cnt, void *buf,
     
    146146static disk_t *bd_srv_disk(bd_srv_t *bd)
    147147{
    148         return (disk_t *)bd->arg;
     148        return (disk_t *)bd->srvs->sarg;
    149149}
    150150
     
    312312        }
    313313
    314         bd_conn(iid, icall, &ata_disk[disk_id].bd);
     314        bd_conn(iid, icall, &ata_disk[disk_id].bds);
    315315}
    316316
     
    336336        fibril_mutex_initialize(&d->lock);
    337337
    338         bd_srv_init(&d->bd);
    339         d->bd.ops = &ata_bd_ops;
    340         d->bd.arg = d;
     338        bd_srvs_init(&d->bds);
     339        d->bds.ops = &ata_bd_ops;
     340        d->bds.sarg = d;
    341341
    342342        /* Try identify command. */
     
    467467}
    468468
    469 static int ata_bd_open(bd_srv_t *bd)
     469static int ata_bd_open(bd_srvs_t *bds, bd_srv_t *bd)
    470470{
    471471        return EOK;
Note: See TracChangeset for help on using the changeset viewer.