Signed-off-by: Markus Armbruster <arm...@redhat.com>
Reviewed-by: BenoƮt Canet <benoit.ca...@nodalink.com>
Reviewed-by: Max Reitz <mre...@redhat.com>
Reviewed-by: Kevin Wolf <kw...@redhat.com>
---
 block/block-backend.c     | 1 -
 blockdev.c                | 5 ++---
 include/sysemu/blockdev.h | 1 -
 3 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/block/block-backend.c b/block/block-backend.c
index 58ae634..a3e613b 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -106,7 +106,6 @@ static void drive_info_del(DriveInfo *dinfo)
         return;
     }
     qemu_opts_del(dinfo->opts);
-    g_free(dinfo->id);
     g_free(dinfo->serial);
     g_free(dinfo);
 }
diff --git a/blockdev.c b/blockdev.c
index c126809..cdefbb0 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -223,7 +223,7 @@ bool drive_check_orphaned(void)
             dinfo->type != IF_NONE) {
             fprintf(stderr, "Warning: Orphaned drive without device: "
                     "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);
             rs = true;
         }
@@ -519,7 +519,6 @@ static BlockBackend *blockdev_init(const char *file, QDict 
*bs_opts,
     }
 
     dinfo = g_malloc0(sizeof(*dinfo));
-    dinfo->id = g_strdup(qemu_opts_id(opts));
     blk_set_legacy_dinfo(blk, dinfo);
 
     if (!file || !*file) {
@@ -553,7 +552,7 @@ static BlockBackend *blockdev_init(const char *file, QDict 
*bs_opts,
 
     if (ret < 0) {
         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);
         goto err;
     }
diff --git a/include/sysemu/blockdev.h b/include/sysemu/blockdev.h
index eabc5c7..0c70c29 100644
--- a/include/sysemu/blockdev.h
+++ b/include/sysemu/blockdev.h
@@ -30,7 +30,6 @@ typedef enum {
 } BlockInterfaceType;
 
 struct DriveInfo {
-    char *id;
     const char *devaddr;
     BlockInterfaceType type;
     int bus;
-- 
1.9.3


Reply via email to