[RFC PATCH 4/4] phyp_driver: Use VIR_DRV_CONN_CHECK_SERVER macro

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

 



phyp needs a server to connect to, so use this macro in order to reuse
code.

Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@xxxxxxxxx>
---
 src/phyp/phyp_driver.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index 67ce7903ba..beca1c6fc7 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -1141,11 +1141,7 @@ phypConnectOpen(virConnectPtr conn,
 
     virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
 
-    if (conn->uri->server == NULL) {
-        virReportError(VIR_ERR_INTERNAL_ERROR,
-                       "%s", _("Missing server name in phyp:// URI"));
-        return VIR_DRV_OPEN_ERROR;
-    }
+    VIR_DRV_CONN_CHECK_SERVER;
 
     if (VIR_ALLOC(phyp_driver) < 0)
         goto failure;
-- 
2.17.1

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

  Powered by Linux