[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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 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

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]