[libvirt] [PATCH] qemu: Add missing VIR_DOMAIN_BLOCK_COMMIT_DELETE flags
eblake at redhat.com
Tue Aug 27 11:59:41 UTC 2013
On 08/27/2013 03:37 AM, Michal Privoznik wrote:
>> Yes, the codes haven't any implementation for BLOCK_COMMIT_DELETE flag
>> now, maybe, only need to raise a friendly error message in here instead
>> of "unsupported flags (0x2) xxxx".
> I agree that this error message is not user-friendly. Bare virsh users
> know nothing about our flags and their numerical expression. However, I
> don't think there is a way how to produce "Unsupported flag
> VIR_DOMAIN_BLOCK_COMMIT_DELETE" instead of "Unsupported flag 0x2" since
> all we see in the qemuDomainBlockCommit() function is just number. I
> mean, mapping of flag onto numeric value is not one-to-one function (aka
> injective function). That is, a value 0x2 can express
> VIR_DOMAIN_BLOCK_COMMIT_DELETE, VIR_DOMAIN_START_AUTODESTROY,
> VIR_DUMP_DESTROY, etc. (git grep "1 << 1," include/).
> If we want to make it work, we have to introduce an injective function,
> e.g. virUnsupportedFlags(), which would accept a list (not an ORed
> value) of all flags that are not supported. Too much effort for not much
Agreed - it may not be the nicest of messages, but it is a CORRECT
message, and one that will eventually go away when we actually implement
things, so it isn't worth the churn of making a temporarily "nicer"
message just to rip it back out later when things are properly implemented.
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 621 bytes
Desc: OpenPGP digital signature
More information about the libvir-list