
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