diff options
author | Markus Armbruster <armbru@redhat.com> | 2014-10-07 13:59:07 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-10-20 13:41:26 +0200 |
commit | 8fb3c76c949f34f29c5252ee339fbe1cbfcc3234 (patch) | |
tree | 587c7562205c9166c6501b87fbb05de9d5b31559 /block/block-backend.c | |
parent | 18e46a033d67060c1430740cf8084b702955ae8f (diff) |
block: Code motion to get rid of stubs/blockdev.c
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: BenoƮt Canet <benoit.canet@nodalink.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block/block-backend.c')
-rw-r--r-- | block/block-backend.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/block/block-backend.c b/block/block-backend.c index edaf73c1d7..d4bdd48e03 100644 --- a/block/block-backend.c +++ b/block/block-backend.c @@ -22,6 +22,8 @@ struct BlockBackend { QTAILQ_ENTRY(BlockBackend) link; /* for blk_backends */ }; +static void drive_info_del(DriveInfo *dinfo); + /* All the BlockBackends (except for hidden ones) */ static QTAILQ_HEAD(, BlockBackend) blk_backends = QTAILQ_HEAD_INITIALIZER(blk_backends); @@ -93,6 +95,17 @@ static void blk_delete(BlockBackend *blk) g_free(blk); } +static void drive_info_del(DriveInfo *dinfo) +{ + if (!dinfo) { + return; + } + qemu_opts_del(dinfo->opts); + g_free(dinfo->id); + g_free(dinfo->serial); + g_free(dinfo); +} + /* * Increment @blk's reference count. * @blk must not be null. |