Improve some error messages about unsupported APIs/URIs

If there is no driver for a URI we report

  "no hypervisor driver available"

This is bad because not all virt drivers are hypervisors (ie container
based virt).

If there is no driver support for an API we report

  "this function is not supported by the hypervisor"

This is bad for the same reason, and additionally because it is
also used for the network, interface & storage drivers.

* src/util/virterror.c: Improve error messages
This commit is contained in:
Daniel P. Berrange 2010-06-22 18:38:32 +01:00
parent 6c267f01b1
commit 9b0244ae38

View File

@ -760,15 +760,15 @@ virErrorMsg(virErrorNumber error, const char *info)
break; break;
case VIR_ERR_NO_SUPPORT: case VIR_ERR_NO_SUPPORT:
if (info == NULL) if (info == NULL)
errmsg = _("this function is not supported by the hypervisor"); errmsg = _("this function is not supported by the connection driver");
else else
errmsg = _("this function is not supported by the hypervisor: %s"); errmsg = _("this function is not supported by the connection driver: %s");
break; break;
case VIR_ERR_NO_CONNECT: case VIR_ERR_NO_CONNECT:
if (info == NULL) if (info == NULL)
errmsg = _("no hypervisor driver available"); errmsg = _("no connection driver available");
else else
errmsg = _("no hypervisor driver available for %s"); errmsg = _("no connection driver available for %s");
break; break;
case VIR_ERR_INVALID_CONN: case VIR_ERR_INVALID_CONN:
if (info == NULL) if (info == NULL)