From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZcK9-00054p-L8 for qemu-devel@nongnu.org; Thu, 02 Oct 2014 05:05:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZcK3-0002TR-KG for qemu-devel@nongnu.org; Thu, 02 Oct 2014 05:05:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16100) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZcK3-0002T7-Bz for qemu-devel@nongnu.org; Thu, 02 Oct 2014 05:05:15 -0400 From: Markus Armbruster Date: Thu, 2 Oct 2014 11:04:53 +0200 Message-Id: <1412240698-21695-19-git-send-email-armbru@redhat.com> In-Reply-To: <1412240698-21695-1-git-send-email-armbru@redhat.com> References: <1412240698-21695-1-git-send-email-armbru@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH v5 18/23] blockdev: Drop superfluous DriveInfo member id List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, benoit.canet@nodalink.com, stefanha@redhat.com, mreitz@redhat.com Signed-off-by: Markus Armbruster Reviewed-by: Beno=C3=AEt Canet Reviewed-by: Max Reitz Reviewed-by: Kevin Wolf --- block/block-backend.c | 1 - blockdev.c | 3 +-- include/sysemu/blockdev.h | 1 - 3 files changed, 1 insertion(+), 4 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 f4f9e04..b102fe0 100644 --- a/blockdev.c +++ b/blockdev.c @@ -458,7 +458,6 @@ static BlockBackend *blockdev_init(const char *file, = QDict *bs_opts, } =20 dinfo =3D g_malloc0(sizeof(*dinfo)); - dinfo->id =3D g_strdup(qemu_opts_id(opts)); blk_set_legacy_dinfo(blk, dinfo); =20 if (!file || !*file) { @@ -492,7 +491,7 @@ static BlockBackend *blockdev_init(const char *file, = QDict *bs_opts, =20 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 f66b89a..27a40d5 100644 --- a/include/sysemu/blockdev.h +++ b/include/sysemu/blockdev.h @@ -30,7 +30,6 @@ typedef enum { } BlockInterfaceType; =20 struct DriveInfo { - char *id; const char *devaddr; BlockInterfaceType type; int bus; --=20 1.9.3