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

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

 



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@xxxxxxxxxx>:
---
  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

>From fea93de3c26a66a8bdf6cdb66b5536dda32dbc7b Mon Sep 17 00:00:00 2001
From: David Allan <dallan@xxxxxxxxxx>
Date: Wed, 3 Mar 2010 04:05:07 -0500
Subject: [PATCH 1/1] Add vol zeroing to ESX storage driver struct

---
 src/esx/esx_storage_driver.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/src/esx/esx_storage_driver.c b/src/esx/esx_storage_driver.c
index d09831a..8ee7670 100644
--- a/src/esx/esx_storage_driver.c
+++ b/src/esx/esx_storage_driver.c
@@ -101,6 +101,7 @@ static virStorageDriver esxStorageDriver = {
     NULL,                                  /* volCreateXML */
     NULL,                                  /* volCreateXMLFrom */
     NULL,                                  /* volDelete */
+    NULL,                                  /* volZeroOut */
     NULL,                                  /* volGetInfo */
     NULL,                                  /* volGetXMLDesc */
     NULL,                                  /* volGetPath */
-- 
1.6.5.5

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]