[libvirt] [PATCH 02/10] storage: allow opening with storage:///system and storage:///session URIs

Peter Krempa pkrempa at redhat.com
Mon Jan 29 10:42:51 UTC 2018


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 at 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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180129/5bed3717/attachment-0001.sig>


More information about the libvir-list mailing list