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/part/guid_part/guid_part.c

    r4802dd7 r135486d  
    8383        /** Service representing the partition (outbound device) */
    8484        service_id_t dsid;
    85         /** Block device server structure */
    86         bd_srv_t bd;
     85        /** Block device service structure */
     86        bd_srvs_t bds;
    8787        /** Points to next partition structure. */
    8888        struct part *next;
     
    104104static int gpt_bsa_translate(part_t *p, aoff64_t ba, size_t cnt, aoff64_t *gba);
    105105
    106 static int gpt_bd_open(bd_srv_t *);
     106static int gpt_bd_open(bd_srvs_t *, bd_srv_t *);
    107107static int gpt_bd_close(bd_srv_t *);
    108108static int gpt_bd_read_blocks(bd_srv_t *, aoff64_t, size_t, void *, size_t);
     
    122122static part_t *bd_srv_part(bd_srv_t *bd)
    123123{
    124         return (part_t *)bd->arg;
     124        return (part_t *)bd->srvs->sarg;
    125125}
    126126
     
    325325        }
    326326
    327         bd_srv_init(&part->bd);
    328         part->bd.ops = &gpt_bd_ops;
    329         part->bd.arg = part;
     327        bd_srvs_init(&part->bds);
     328        part->bds.ops = &gpt_bd_ops;
     329        part->bds.sarg = part;
    330330
    331331        part->dsid = 0;
     
    357357        assert(part->present == true);
    358358
    359         bd_conn(iid, icall, &part->bd);
     359        bd_conn(iid, icall, &part->bds);
    360360}
    361361
    362362/** Open device. */
    363 static int gpt_bd_open(bd_srv_t *bd)
     363static int gpt_bd_open(bd_srvs_t *bds, bd_srv_t *bd)
    364364{
    365365        return EOK;
Note: See TracChangeset for help on using the changeset viewer.