Benoît Canet writes:
>> +DriveInfo *blk_legacy_dinfo(BlockBackend *blk)
>> +{
>> +return blk->legacy_dinfo;
>> +}
>> +
>> +/*
>> + * Set @blk's DriveInfo to @dinfo, and return it.
>> + * @blk must not have a DriveInfo set already.
>
>> + * No other BlockBackend may have the same DriveInfo set
> +DriveInfo *blk_legacy_dinfo(BlockBackend *blk)
> +{
> +return blk->legacy_dinfo;
> +}
> +
> +/*
> + * Set @blk's DriveInfo to @dinfo, and return it.
> + * @blk must not have a DriveInfo set already.
> + * No other BlockBackend may have the same DriveInfo set.
Must we try to assert this ?
Th
Make the BlockBackend own the DriveInfo. Change blockdev_init() to
return the BlockBackend instead of the DriveInfo.
Signed-off-by: Markus Armbruster
---
block.c | 3 --
block/block-backend.c | 38
blockdev.c| 73 ++