[libvirt] [PATCH 09/24] maint: improve VIR_ERR_OPERATION_DENIED usage

Eric Blake eblake at redhat.com
Mon Jan 6 15:35:14 UTC 2014

On 01/02/2014 04:08 PM, John Ferlan wrote:
> On 12/28/2013 11:11 AM, Eric Blake wrote:
>> Some of our operation denied messages are outright stupid; for
>> example, if virIdentitySetAttr fails:
>> error: operation Identity attribute is already set forbidden for read only access
>> This patch fixes things to a saner:
>> error: operation forbidden: Identity attribute is already set
>> It also consolidates the most common usage pattern for operation
>> denied errors: read-only connections preventing a public API.  In
>> this case, 'virsh -r -c test:///default destroy test' changes from:
>> error: operation virDomainDestroy forbidden for read only access
>> to:
>> error: operation forbidden: read only access prevents virDomainDestroy

> Yet another case where in libvirt.c the error changes from VIR_FROM_xxxx
> to VIR_FROM_NONE (_THIS technically).  Where xxxx is DOM, INTERFACE,
> STORAGE, etc.

Okay, I enhanced the commit message to document that this is
intentional, and with no real loss in quality (similar to commit baa7244).

> Not that it should matter, but it I figured it should be pointed out.
> Perhaps more so in this case, the failure is related directly to the
> connection rather than function...
> ACK - for what's there.

Thanks; pushed.

Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140106/c696f37e/attachment-0001.sig>

More information about the libvir-list mailing list