mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 17:34:18 +03:00
fix error message when using wrong URI alias
Signed-off-by: Eli Qiao <taget@linux.vnet.ibm.com> When configuring a URI alias like this in 'libvirt.conf': uri_aliases = [ "jj#j=qemu+ssh://root@127.0.0.1/system", "sleet=qemu+ssh://root@sleet.cloud.example.com/system", ] virsh -c jj#j It will show this error message: 'no connection driver available for No connection for URI jj#j' Actually,we expect this message below: Malformed 'uri_aliases' config entry 'jj#j=qemu+ssh://root@127.0.0.1/system', aliases may only contain 'a-Z, 0-9, _, -' Give this patch to fix this error.
This commit is contained in:
parent
7ca82ecbea
commit
5c5e07b84c
@ -1054,11 +1054,6 @@ virConnectOpenResolveURIAlias(const char *alias, char **uri)
|
||||
|
||||
*uri = NULL;
|
||||
|
||||
/* Short circuit to avoid doing URI alias resolution
|
||||
* when it clearly isn't an valid alias */
|
||||
if (strspn(alias, URI_ALIAS_CHARS) != strlen(alias))
|
||||
return 0;
|
||||
|
||||
if (!(config = virConnectConfigFile()))
|
||||
goto cleanup;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user