From patchwork Tue Sep 30 19:25:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 395094 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id E926614012B for ; Wed, 1 Oct 2014 05:36:30 +1000 (EST) Received: from localhost ([::1]:45420 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZ3Do-00011X-QV for incoming@patchwork.ozlabs.org; Tue, 30 Sep 2014 15:36:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZ33m-0001pE-PB for qemu-devel@nongnu.org; Tue, 30 Sep 2014 15:26:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XZ33h-0000t8-07 for qemu-devel@nongnu.org; Tue, 30 Sep 2014 15:26:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:9392) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XZ33g-0000sZ-O9 for qemu-devel@nongnu.org; Tue, 30 Sep 2014 15:26:00 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8UJPwj4002392 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 30 Sep 2014 15:25:58 -0400 Received: from blackfin.pond.sub.org (ovpn-116-54.ams2.redhat.com [10.36.116.54]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s8UJPrHd005533 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 30 Sep 2014 15:25:58 -0400 Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id C65343043FC1; Tue, 30 Sep 2014 21:25:46 +0200 (CEST) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Tue, 30 Sep 2014 21:25:39 +0200 Message-Id: <1412105144-532-19-git-send-email-armbru@redhat.com> In-Reply-To: <1412105144-532-1-git-send-email-armbru@redhat.com> References: <1412105144-532-1-git-send-email-armbru@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-MIME-Autoconverted: from 8bit to quoted-printable by mx1.redhat.com id s8UJPwj4002392 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, benoit.canet@nodalink.com, stefanha@redhat.com, mreitz@redhat.com Subject: [Qemu-devel] [PATCH v4 18/23] blockdev: Drop superfluous DriveInfo member id X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Signed-off-by: Markus Armbruster Reviewed-by: BenoƮt 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, } dinfo = g_malloc0(sizeof(*dinfo)); - dinfo->id = g_strdup(qemu_opts_id(opts)); blk_set_legacy_dinfo(blk, dinfo); if (!file || !*file) { @@ -492,7 +491,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 f66b89a..27a40d5 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;