[libvirt] [PATCH] virsh-volume: Unify strigification of volume type

Peter Krempa pkrempa at redhat.com
Tue Nov 12 18:27:20 UTC 2013


On 11/12/13 19:16, Eric Blake wrote:
> On 11/12/2013 10:33 AM, Peter Krempa wrote:
>>> Please make this "switch ((virStorageVolType) type)"
>>
>> I was considering this, but in the VIR_STORAGE_VOL_LAST value defined
>> virStorageVolType enum is protected by an ifdef:
>>
> 
>> As I don't know what are the conditions that make VIR_ENUM_SENTINELS
>> defined I didn't want to risk a broken build.
> 
> We define it internally for all our code except for the python bindings,
> precisely because it is useful for our internal code.  A quick 'git grep
> _LAST tools' will show that you can safely rely on the *_LAST sentinels
> always being present from within virsh code (that is, we'd have to
> change a lot of code if we ever decided not to expose it during internal
> compilation).
> 

Okay, I've changed the patch according to your suggestion and pushed.

Thanks for the insight.

Peter

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


More information about the libvir-list mailing list