If a block job is started with a node name rather than a device name and
no explicit job ID is passed, it was reported that '' isn't a
well-formed ID. Which is correct, but we can make the message a little
bit nicer.
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Jeff Cody <[email protected]>
Reviewed-by: Alberto Garcia <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
if (job_id == NULL) {
job_id = bdrv_get_device_name(bs);
+ if (!*job_id) {
+ error_setg(errp, "An explicit job ID is required for this node");
+ return NULL;
+ }
}
if (!id_wellformed(job_id)) {