From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54569) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXaje-0001Mb-JP for qemu-devel@nongnu.org; Fri, 26 Sep 2014 14:59:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXajZ-0002dD-DG for qemu-devel@nongnu.org; Fri, 26 Sep 2014 14:59:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:10048) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXajZ-0002bk-50 for qemu-devel@nongnu.org; Fri, 26 Sep 2014 14:59:13 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8QIx778011891 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 26 Sep 2014 14:59:07 -0400 From: Kevin Wolf Date: Fri, 26 Sep 2014 20:58:51 +0200 Message-Id: <1411757937-9087-6-git-send-email-kwolf@redhat.com> In-Reply-To: <1411757937-9087-1-git-send-email-kwolf@redhat.com> References: <1411757937-9087-1-git-send-email-kwolf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 05/11] block: Improve message for device name clashing with node name List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com From: Markus Armbruster Suggested-by: Benoit Canet Signed-off-by: Markus Armbruster Reviewed-by: Beno=C3=AEt Canet Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- block.c | 3 ++- tests/qemu-iotests/087.out | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/block.c b/block.c index 0c4540c..a2fa1e1 100644 --- a/block.c +++ b/block.c @@ -347,7 +347,8 @@ BlockDriverState *bdrv_new(const char *device_name, E= rror **errp) return NULL; } if (bdrv_find_node(device_name)) { - error_setg(errp, "Device with node-name '%s' already exists", + error_setg(errp, + "Device name '%s' conflicts with an existing node nam= e", device_name); return NULL; } diff --git a/tests/qemu-iotests/087.out b/tests/qemu-iotests/087.out index 7fbee3f..75a54e0 100644 --- a/tests/qemu-iotests/087.out +++ b/tests/qemu-iotests/087.out @@ -20,7 +20,7 @@ QMP_VERSION {"return": {}} {"return": {}} {"error": {"class": "GenericError", "desc": "Device with id 'disk' alrea= dy exists"}} -{"error": {"class": "GenericError", "desc": "Device with node-name 'test= -node' already exists"}} +{"error": {"class": "GenericError", "desc": "Device name 'test-node' con= flicts with an existing node name"}} main-loop: WARNING: I/O thread spun for 1000 iterations {"error": {"class": "GenericError", "desc": "could not open disk image d= isk2: node-name=3Ddisk is conflicting with a device id"}} {"error": {"class": "GenericError", "desc": "could not open disk image d= isk2: Duplicate node name"}} --=20 1.8.3.1