
On Fri, Jan 26, 2018 at 13:35:29 +0000, Daniel Berrange wrote:
Allow the possibility of opening a connection to only the storage driver, by defining storage:///system and storage:///session URIs and registering a fake hypervisor driver that supports them.
The hypervisor drivers can now directly open a storage driver connection at time of need, instead of having to pass around a virConnectPtr through many functions. This will facilitate the later change to support separate daemons for each driver.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> --- src/storage/storage_driver.c | 90 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+)
diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index f68acc75be..5d21007edb 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -388,6 +388,79 @@ storageStateCleanup(void) return 0; }
+static virDrvOpenStatus storageConnectOpen(virConnectPtr conn, + virConnectAuthPtr auth ATTRIBUTE_UNUSED, + virConfPtr conf ATTRIBUTE_UNUSED, + unsigned int flags)
Coding style is not consistent with the rest of the file.
+{ + virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);