Commit d224469d authored by Markus Armbruster's avatar Markus Armbruster Committed by Kevin Wolf
Browse files

block: Improve message for device name clashing with node name

parent e5d7bbeb
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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;
    }
+1 −1
Original line number Diff line number Diff line
@@ -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"}}