[libvirt] [PATCH]: Export the 'label' on block devices

Chris Lalancette clalance at redhat.com
Thu Oct 16 12:35:21 UTC 2008


Daniel P. Berrange wrote:
> I know you're just replicating the existing code, but both these functions can
> be killed off and replaced with auto-generated code from our enum support
> macros
> 
>     VIR_ENUM_IMPL(virStorageBackendDiskLabel, 
>                   VIR_STORAGE_POOL_DISK_LAST,
>                   "dos", "dvh", "gpt", "mac",
>                   "bsd", "pc98", "sun", "lvm2"
>                   "unknown")
> 
> And in the header file just
> 
>     VIR_ENUM_DECL(virStorageBackendDiskLabel)

I've implemented this, and there was quite a bit of fallout from it.  In
particular, I had to change the signature of poolOptions.formatToString and
formatFromString, which required a bunch of changes elsewhere in the storage
code.  The good news is that we remove quite a bit of very similar hand crafted
code, so this patch actually removes more code than it adds.  Tested by me as
before.

-- 
Chris Lalancette
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libvirt-iscsi-vol-label-v8.patch
Type: text/x-patch
Size: 28039 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20081016/4a003772/attachment-0001.bin>


More information about the libvir-list mailing list