mirror of https://github.com/xemu-project/xemu.git
blockdev: Drop superfluous DriveInfo member id
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>
This commit is contained in:
parent
b8864be5f3
commit
d3aeb1b7da
|
@ -106,7 +106,6 @@ static void drive_info_del(DriveInfo *dinfo)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
qemu_opts_del(dinfo->opts);
|
qemu_opts_del(dinfo->opts);
|
||||||
g_free(dinfo->id);
|
|
||||||
g_free(dinfo->serial);
|
g_free(dinfo->serial);
|
||||||
g_free(dinfo);
|
g_free(dinfo);
|
||||||
}
|
}
|
||||||
|
|
|
@ -223,7 +223,7 @@ bool drive_check_orphaned(void)
|
||||||
dinfo->type != IF_NONE) {
|
dinfo->type != IF_NONE) {
|
||||||
fprintf(stderr, "Warning: Orphaned drive without device: "
|
fprintf(stderr, "Warning: Orphaned drive without device: "
|
||||||
"id=%s,file=%s,if=%s,bus=%d,unit=%d\n",
|
"id=%s,file=%s,if=%s,bus=%d,unit=%d\n",
|
||||||
dinfo->id, blk_bs(blk)->filename, if_name[dinfo->type],
|
blk_name(blk), blk_bs(blk)->filename, if_name[dinfo->type],
|
||||||
dinfo->bus, dinfo->unit);
|
dinfo->bus, dinfo->unit);
|
||||||
rs = true;
|
rs = true;
|
||||||
}
|
}
|
||||||
|
@ -519,7 +519,6 @@ static BlockBackend *blockdev_init(const char *file, QDict *bs_opts,
|
||||||
}
|
}
|
||||||
|
|
||||||
dinfo = g_malloc0(sizeof(*dinfo));
|
dinfo = g_malloc0(sizeof(*dinfo));
|
||||||
dinfo->id = g_strdup(qemu_opts_id(opts));
|
|
||||||
blk_set_legacy_dinfo(blk, dinfo);
|
blk_set_legacy_dinfo(blk, dinfo);
|
||||||
|
|
||||||
if (!file || !*file) {
|
if (!file || !*file) {
|
||||||
|
@ -553,7 +552,7 @@ static BlockBackend *blockdev_init(const char *file, QDict *bs_opts,
|
||||||
|
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
error_setg(errp, "could not open disk image %s: %s",
|
error_setg(errp, "could not open disk image %s: %s",
|
||||||
file ?: dinfo->id, error_get_pretty(error));
|
file ?: blk_name(blk), error_get_pretty(error));
|
||||||
error_free(error);
|
error_free(error);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,6 @@ typedef enum {
|
||||||
} BlockInterfaceType;
|
} BlockInterfaceType;
|
||||||
|
|
||||||
struct DriveInfo {
|
struct DriveInfo {
|
||||||
char *id;
|
|
||||||
const char *devaddr;
|
const char *devaddr;
|
||||||
BlockInterfaceType type;
|
BlockInterfaceType type;
|
||||||
int bus;
|
int bus;
|
||||||
|
|
Loading…
Reference in New Issue