]> Git Repo - qemu.git/blobdiff - device-hotplug.c
tests: ACPI test blobs update due to PCI0._CRS changes
[qemu.git] / device-hotplug.c
index ebfa6b1016d81d44f0292fc43494ea5e7fd64be1..833d8748d5c31cb9641727af17a7195612309a66 100644 (file)
@@ -24,6 +24,7 @@
 
 #include "hw/hw.h"
 #include "hw/boards.h"
+#include "sysemu/block-backend.h"
 #include "sysemu/blockdev.h"
 #include "qemu/config-file.h"
 #include "sysemu/sysemu.h"
@@ -40,7 +41,7 @@ DriveInfo *add_init_drive(const char *optstr)
         return NULL;
 
     mc = MACHINE_GET_CLASS(current_machine);
-    dinfo = drive_init(opts, mc->qemu_machine->block_default_type);
+    dinfo = drive_new(opts, mc->block_default_type);
     if (!dinfo) {
         qemu_opts_del(opts);
         return NULL;
@@ -49,7 +50,7 @@ DriveInfo *add_init_drive(const char *optstr)
     return dinfo;
 }
 
-void drive_hot_add(Monitor *mon, const QDict *qdict)
+void hmp_drive_add(Monitor *mon, const QDict *qdict)
 {
     DriveInfo *dinfo = NULL;
     const char *opts = qdict_get_str(qdict, "opts");
@@ -76,6 +77,6 @@ void drive_hot_add(Monitor *mon, const QDict *qdict)
 
 err:
     if (dinfo) {
-        drive_put_ref(dinfo);
+        blk_unref(blk_by_legacy_dinfo(dinfo));
     }
 }
This page took 0.021462 seconds and 4 git commands to generate.