#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"
return NULL;
mc = MACHINE_GET_CLASS(current_machine);
- dinfo = drive_init(opts, mc->block_default_type);
+ dinfo = drive_new(opts, mc->block_default_type);
if (!dinfo) {
qemu_opts_del(opts);
return NULL;
err:
if (dinfo) {
- drive_put_ref(dinfo);
+ blk_unref(blk_by_legacy_dinfo(dinfo));
}
}