[libvirt] [PATCH] virsh-volume: Unify strigification of volume type
Eric Blake
eblake at redhat.com
Tue Nov 12 18:16:59 UTC 2013
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).
--
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: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20131112/0c2b2d39/attachment-0001.sig>
More information about the libvir-list
mailing list