Am 05.10.2016 um 20:01 hat Max Reitz geschrieben: > On 05.10.2016 11:26, Kevin Wolf wrote: > > Almost all block devices are qdevified by now. This allows us to go back > > from the BlockBackend to the DeviceState. xen_disk is the last device > > that is missing. We'll remember in the BlockBackend if a xen_disk is > > attached and can then disable any features that require going from a BB > > to the DeviceState. > > > > While at it, clearly mark the function used by xen_disk as legacy even > > in its name, not just in TODO comments. > > > > Signed-off-by: Kevin Wolf <[email protected]>
> > +/*
> > + * Attach device model @dev to @blk.
> > * @blk must not have a device model attached already.
> > * TODO qdevified devices don't use this, remove when devices are qdevified
> > */
> > -void blk_attach_dev_nofail(BlockBackend *blk, void *dev)
> > +void blk_attach_dev_legacy(BlockBackend *blk, void *dev)
> > {
> > if (blk_attach_dev(blk, dev) < 0) {
>
> I'd make this a blk_do_attach_dev(), but it's not syntactically wrong,
> so the choice is up to you.
Thanks for catching this, what you suggest is what I intended. Maybe we
should just enable the gcc --do-what-i-mean option.
Kevin
pgpr9Yj16k8nP.pgp
Description: PGP signature
