#include "qemu/config-file.h"
#include "hw/qdev.h"
#include "qemu/event_notifier.h"
+#include "sysemu/block-backend.h"
#include "emulator.h"
#include "emul_state.h"
gchar *sdcard_img = g_path_get_basename(file);
gchar *sdcard_device_id = g_strdup_printf("device_id_%s", sdcard_img);
gchar *sdcard_drive_id = g_strdup_printf("drive_id_%s", sdcard_img);
+ DriveInfo* dinfo = NULL;
g_free(sdcard_img);
qmp_marshal_input_blockdev_add(default_mon, qdict, NULL);
+ dinfo = g_malloc0(sizeof(*dinfo));
+ dinfo->type = IF_VIRTIO;
+ blk_set_legacy_dinfo(blk_by_name(sdcard_device_id), dinfo);
+
QDECREF(qdict);
qdict = qdict_new();