[libvirt] [PATCH 1/9] Fix ESX storage driver struct initializer

Dave Allan dallan at redhat.com
Wed Mar 3 21:37:19 UTC 2010


On 03/03/2010 03:06 AM, Daniel Veillard wrote:
> On Tue, Mar 02, 2010 at 09:13:17PM -0500, Dave Allan wrote:
>> On 03/02/2010 05:33 PM, Matthias Bolte wrote:
>>> 2010/3/2 David Allan<dallan at redhat.com>:
>>>> ---
>>>>   src/esx/esx_storage_driver.c |   39 +++------------------------------------
>>>>   1 files changed, 3 insertions(+), 36 deletions(-)
>>>>
>>>> diff --git a/src/esx/esx_storage_driver.c b/src/esx/esx_storage_driver.c
>>>> index d09831a..84f0339 100644
>>>> --- a/src/esx/esx_storage_driver.c
>>>> +++ b/src/esx/esx_storage_driver.c
>>>> @@ -70,42 +70,9 @@ esxStorageClose(virConnectPtr conn)
>>>>
>>>>
>>>>   static virStorageDriver esxStorageDriver = {
>>>> -    "ESX",                                 /* name */
>>>> -    esxStorageOpen,                        /* open */
>>>> -    esxStorageClose,                       /* close */
>>>> -    NULL,                                  /* numOfPools */
>>>> -    NULL,                                  /* listPools */
>>>> -    NULL,                                  /* numOfDefinedPools */
>>>> -    NULL,                                  /* listDefinedPools */
>>>> -    NULL,                                  /* findPoolSources */
>>>> -    NULL,                                  /* poolLookupByName */
>>>> -    NULL,                                  /* poolLookupByUUID */
>>>> -    NULL,                                  /* poolLookupByVolume */
>>>> -    NULL,                                  /* poolCreateXML */
>>>> -    NULL,                                  /* poolDefineXML */
>>>> -    NULL,                                  /* poolBuild */
>>>> -    NULL,                                  /* poolUndefine */
>>>> -    NULL,                                  /* poolCreate */
>>>> -    NULL,                                  /* poolDestroy */
>>>> -    NULL,                                  /* poolDelete */
>>>> -    NULL,                                  /* poolRefresh */
>>>> -    NULL,                                  /* poolGetInfo */
>>>> -    NULL,                                  /* poolGetXMLDesc */
>>>> -    NULL,                                  /* poolGetAutostart */
>>>> -    NULL,                                  /* poolSetAutostart */
>>>> -    NULL,                                  /* poolNumOfVolumes */
>>>> -    NULL,                                  /* poolListVolumes */
>>>> -    NULL,                                  /* volLookupByName */
>>>> -    NULL,                                  /* volLookupByKey */
>>>> -    NULL,                                  /* volLookupByPath */
>>>> -    NULL,                                  /* volCreateXML */
>>>> -    NULL,                                  /* volCreateXMLFrom */
>>>> -    NULL,                                  /* volDelete */
>>>> -    NULL,                                  /* volGetInfo */
>>>> -    NULL,                                  /* volGetXMLDesc */
>>>> -    NULL,                                  /* volGetPath */
>>>> -    NULL,                                  /* poolIsActive */
>>>> -    NULL,                                  /* poolIsPersistent */
>>>> +    .name = "ESX",
>>>> +    .open = esxStorageOpen,
>>>> +    .close = esxStorageClose
>>>>   };
>>>>
>>>>
>>>> --
>>>> 1.6.5.5
>>>>
>>>
>>> There was some discussion on the list about which struct
>>> initialization style to use. The result was to prefer the old style,
>>> one argument was that it provides some form of todo list in the
>>> codebase itself.
>>>
>>> I even have a patch laying around that converts the dot-name style to
>>> the old style.
>>>
>>> Matthias
>>
>> Ok, now I remember the thread; I thought it was odd that you had it
>> in this style.  I'll put it back to that style&  add the field.
>
>    Yep, the point is that with the old style you can immediately see what
> entry points from a driver are missing,
>
>    thanks,
>
> Daniel
>

Ok.  I prefer the other style, but if that's what we're doing, I'll do 
it that way.  Attached is a replacement patch [not an incremental].

Dave

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-Add-vol-zeroing-to-ESX-storage-driver-struct.patch
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100303/f96f945b/attachment-0001.ksh>


More information about the libvir-list mailing list