summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2014-09-12 21:26:24 +0200
committerKevin Wolf <kwolf@redhat.com>2014-09-25 15:24:14 +0200
commitd224469d87140f0ab9496f752f6042606b80718b (patch)
tree59997d139115c6143601cdd011db01f546c03611
parente5d7bbeb10b72888e112646ef68b1bea0e4e286d (diff)
downloadqemu-d224469d87140f0ab9496f752f6042606b80718b.tar.gz
qemu-d224469d87140f0ab9496f752f6042606b80718b.tar.bz2
qemu-d224469d87140f0ab9496f752f6042606b80718b.zip
block: Improve message for device name clashing with node name
Suggested-by: Benoit Canet <benoit.canet@nodalink.com> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: BenoƮt Canet <benoit.canet@nodalink.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r--block.c3
-rw-r--r--tests/qemu-iotests/087.out2
2 files changed, 3 insertions, 2 deletions
diff --git a/block.c b/block.c
index 0c4540c060..a2fa1e14b1 100644
--- a/block.c
+++ b/block.c
@@ -347,7 +347,8 @@ BlockDriverState *bdrv_new(const char *device_name, Error **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 name",
device_name);
return NULL;
}
diff --git a/tests/qemu-iotests/087.out b/tests/qemu-iotests/087.out
index 7fbee3ff5e..75a54e0c36 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' already exists"}}
-{"error": {"class": "GenericError", "desc": "Device with node-name 'test-node' already exists"}}
+{"error": {"class": "GenericError", "desc": "Device name 'test-node' conflicts with an existing node name"}}
main-loop: WARNING: I/O thread spun for 1000 iterations
{"error": {"class": "GenericError", "desc": "could not open disk image disk2: node-name=disk is conflicting with a device id"}}
{"error": {"class": "GenericError", "desc": "could not open disk image disk2: Duplicate node name"}}