[libvirt] [PATCH 32/41] admin: add ability to connect to the per-driver daemon sockets

Andrea Bolognani abologna at redhat.com
Sun Jul 28 17:01:57 UTC 2019


On Tue, 2019-07-23 at 17:03 +0100, Daniel P. Berrangé wrote:
[...]
> +++ b/src/libvirt-admin.c
> @@ -101,6 +97,7 @@ virAdmInitialize(void)
>      return 0;
>  }
>  
> +
>  static char *
>  getSocketPath(virURIPtr uri)
>  {

Unrelated whitespace change.

[...]
> @@ -127,27 +124,28 @@ getSocketPath(virURIPtr uri)
>          if (STREQ_NULLABLE(uri->path, "/system")) {
> -            if (virAsprintf(&sock_path, LOCALSTATEDIR "/run/libvirt/%s",
> -                            sockbase) < 0)
> +            if (virAsprintf(&sock_path, LOCALSTATEDIR "/run/libvirt/%s-admin-sock",
> +                            legacy ? "libvirt" : uri->scheme) < 0)

Since you're touching this anyway, you might as well turn it into

  virAsprintf(&sock_path, "%s/run/libvirt/%s-admin-sock",
              LOCALSTATEDIR, legacy ? "libvirt" : uri->scheme)


With these nits addressed,

  Reviewed-by: Andrea Bolognani <abologna at redhat.com>


-- 
Andrea Bolognani / Red Hat / Virtualization




More information about the libvir-list mailing list