[libvirt] [PATCH 08/24] maint: improve VIR_ERR_NO_SUPPORT usage
eblake at redhat.com
Sat Jan 4 20:30:52 UTC 2014
On 01/04/2014 07:21 AM, Eric Blake wrote:
>>> The only one that I'd say is different is virDomainOpenGraphics(). It
>>> checks VIR_DRV_SUPPORTS_FEATURE on one of its calls to
>>> virLibDomainError(). Thus perhaps it'd be better to generate a "real"
>>> error so as to differentiate between the function not being available as
>>> a general rule of thumb as opposed to it not being available to a
>>> specific domain because the domain doesn't support a specific feature.
>>> In this case VIR_DRV_FEATURE_FD_PASSING supported in the driver.
> Okay, I'll revisit that function, and possibly just defer that hunk or a
> modified version of it to my v2 series so I can push the rest of the patch.
All other clients that report an error if VIR_DRV_SUPPORTS_FEATURE fails
use VIR_ERR_ARGUMENT_UNSUPPORTED rather than VIR_ERR_NO_SUPPORT. So
that seems straightforward enough that I squashed this in and pushed.
diff --git i/src/libvirt.c w/src/libvirt.c
index d9705bb..b0c1595 100644
@@ -21759,7 +21759,8 @@ virDomainOpenGraphics(virDomainPtr dom,
if (!VIR_DRV_SUPPORTS_FEATURE(dom->conn->driver, dom->conn,
+ virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
+ _("fd passing is not supported by this
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 604 bytes
Desc: OpenPGP digital signature
More information about the libvir-list