+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 ?
This would
Benoît Canet benoit.ca...@nodalink.com 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
Make the BlockBackend own the DriveInfo. Change blockdev_init() to
return the BlockBackend instead of the DriveInfo.
Signed-off-by: Markus Armbruster arm...@redhat.com
---
block.c | 3 --
block/block-backend.c | 38
blockdev.c| 73