]> Git Repo - qemu.git/commitdiff
block: Code motion to get rid of stubs/blockdev.c
authorMarkus Armbruster <[email protected]>
Tue, 7 Oct 2014 11:59:07 +0000 (13:59 +0200)
committerKevin Wolf <[email protected]>
Mon, 20 Oct 2014 11:41:26 +0000 (13:41 +0200)
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: BenoĆ®t Canet <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Reviewed-by: Kevin Wolf <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
block/block-backend.c
blockdev.c
include/sysemu/blockdev.h
stubs/Makefile.objs
stubs/blockdev.c [deleted file]

index edaf73c1d71dc67df0fba937a5f45bd6e14fde71..d4bdd48e03061724c822e3e93209418330af2784 100644 (file)
@@ -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.
index 24d40f95b1128d1cf112128a75989810650c3711..a00461df7b30a2a69329b821d7af178237a79b43 100644 (file)
@@ -284,17 +284,6 @@ void drive_del(DriveInfo *dinfo)
     blk_unref(blk);
 }
 
-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);
-}
-
 typedef struct {
     QEMUBH *bh;
     BlockDriverState *bs;
index c814a90be57720cf5db4b81d0549698ce84947c1..ccd4bf487e2e53d9bd7303b0798c34adfb3cb819 100644 (file)
@@ -65,7 +65,6 @@ QemuOpts *drive_add(BlockInterfaceType type, int index, const char *file,
                     const char *optstr);
 DriveInfo *drive_new(QemuOpts *arg, BlockInterfaceType block_default_type);
 void drive_del(DriveInfo *dinfo);
-void drive_info_del(DriveInfo *dinfo);
 
 /* device-hotplug */
 
index c0b1f6a320f0c8f5f668952f4a8d4f4aa1b45162..5e347d04bd3c3e1ffc89273f466d7298e3982ede 100644 (file)
@@ -1,6 +1,5 @@
 stub-obj-y += arch-query-cpu-def.o
 stub-obj-y += bdrv-commit-all.o
-stub-obj-y += blockdev.o
 stub-obj-y += chr-baum-init.o
 stub-obj-y += chr-msmouse.o
 stub-obj-y += chr-testdev.o
diff --git a/stubs/blockdev.c b/stubs/blockdev.c
deleted file mode 100644 (file)
index 5d0a79c..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#include <assert.h>
-#include "sysemu/blockdev.h"
-
-DriveInfo *drive_get_by_blockdev(BlockDriverState *bs)
-{
-    return NULL;
-}
-
-void drive_info_del(DriveInfo *dinfo)
-{
-    assert(!dinfo);
-}
This page took 0.034023 seconds and 4 git commands to generate.