From nobody Thu Apr 25 07:02:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 15310120832668.646329863271717; Sat, 7 Jul 2018 18:08:03 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AA9BA308402E; Sun, 8 Jul 2018 01:08:01 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7272B45D0; Sun, 8 Jul 2018 01:08:01 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 1B8604A469; Sun, 8 Jul 2018 01:08:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6817T3P030040 for ; Sat, 7 Jul 2018 21:07:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0EE0B2015E42; Sun, 8 Jul 2018 01:07:29 +0000 (UTC) Received: from mx1.redhat.com (ext-mx20.extmail.prod.ext.phx2.redhat.com [10.5.110.49]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 02BF22015E40 for ; Sun, 8 Jul 2018 01:07:27 +0000 (UTC) Received: from mail-qt0-f175.google.com (mail-qt0-f175.google.com [209.85.216.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DD27D308624B for ; Sun, 8 Jul 2018 01:07:14 +0000 (UTC) Received: by mail-qt0-f175.google.com with SMTP id f18-v6so12899094qtp.10 for ; Sat, 07 Jul 2018 18:07:14 -0700 (PDT) Received: from localhost.localdomain ([2804:7f5:d180:a19b:75f1:49c8:66b0:6e4d]) by smtp.gmail.com with ESMTPSA id e11-v6sm8007287qkb.4.2018.07.07.18.07.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Jul 2018 18:07:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=X0lB9KX6kbArizFVSXg9oFmu4VY64aoXhX75DF8uE3U=; b=RtIFPjj9xGpkwobd1weRCwKHXbGKuh5U+UV0VvZm20ehekEvE/ME/D/g9csvFI1PAZ OuuPhM/+IdEppLZegiXJWYVRkCUjSKIhOHUu8VPMoD9b4PX0cHerJibZmd66gjEpmkmP R2lBZUYH4UEsdJWN1P6tT1NIZCELqDSYhLYCyUNLqIk9cqS7/bsl+Sh1vumkby0gaXsh j6MAuV02a8H2+uTkgEn0meAAOEaYfeU2YW15EWkBY0vj8InPNorfNBpwRbNV+6z1sFks M/NcO/zb5SrBwyr4ZK59CV2ZQWYW9ViJmm5jAoy2qPhs4MWr5PzpbFP0zR3f0PBRLdGK HsJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=X0lB9KX6kbArizFVSXg9oFmu4VY64aoXhX75DF8uE3U=; b=ekkA2FTZzRKs2dTfRT2IvgHG4ZaEzTQL6uQmvO+/vEfrN9eyDSiJfh3gLkCCmbq4iL NW3/wuWBqQTwVqNaex1g6l1IZuLX5aJgdR6UKDA/0FK9Ghqrnz9OPmVGr4TzCF2XK9I0 UWzRLWEG41t7IrNsLgVIGo8K1fkctbQPPqcu9KXN63AH155JDvWbDEeUUkokQYvvPLrm wJBdT9oJ1dRz5xNKMqAMLAbFYHS+9mNPEGki3zWPvbHb/7jNHuunYP6IpORD06WJ8SJL glNws2894e238cX9JIXcXvaMB4t9lQ0EYGgYiGvCTCSgWnjXAkwJ/riMjbdsDG7sOgBh rO5Q== X-Gm-Message-State: APt69E2GPlZ73O7tO4Gi0QBIJBVQ8SNfys4XPZxq89Zo/15b8oVPFgO7 heaB1OSYxEX+AX87oWr1AnyI3w== X-Google-Smtp-Source: AAOMgpeimQk1abBdOq9vTM2w4iDReG98SL67H5sqrK1GrLGYRdYz9uLclLjhmm6eI0GAWBMK5jmgsw== X-Received: by 2002:ac8:3209:: with SMTP id x9-v6mr14676254qta.128.1531012033738; Sat, 07 Jul 2018 18:07:13 -0700 (PDT) From: Marcos Paulo de Souza To: libvir-list@redhat.com Date: Sat, 7 Jul 2018 22:06:53 -0300 Message-Id: <20180708010656.9047-2-marcos.souza.org@gmail.com> In-Reply-To: <20180708010656.9047-1-marcos.souza.org@gmail.com> References: <20180708010656.9047-1-marcos.souza.org@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Sun, 08 Jul 2018 01:07:15 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Sun, 08 Jul 2018 01:07:15 +0000 (UTC) for IP:'209.85.216.175' DOMAIN:'mail-qt0-f175.google.com' HELO:'mail-qt0-f175.google.com' FROM:'marcos.souza.org@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.281 * (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS, T_DKIM_INVALID) 209.85.216.175 mail-qt0-f175.google.com 209.85.216.175 mail-qt0-f175.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.49 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.25 X-loop: libvir-list@redhat.com Cc: Marcos Paulo de Souza Subject: [libvirt] [RFC PATCH 1/4] driver.h: Add macro VIR_DRV_CONN_CHECK_SERVER X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Sun, 08 Jul 2018 01:08:02 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This new macro will check if the server was passed to connectOpen function. Some drivers as esx, hyperv and phyp need a server address to connect to. Signed-off-by: Marcos Paulo de Souza --- src/driver.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/driver.h b/src/driver.h index 0b1f7a2269..1f9d7fd26b 100644 --- a/src/driver.h +++ b/src/driver.h @@ -60,6 +60,15 @@ typedef enum { ((drv)->connectSupportsFeature ? \ (drv)->connectSupportsFeature((conn), (feature)) > 0 : 0) =20 +/* Check if the connection of the driver has filled the server address */ +# define VIR_DRV_CONN_CHECK_SERVER \ + do { \ + if (!conn->uri->server) { \ + virReportError(VIR_ERR_INVALID_ARG, "%s", \ + _("URI is missing the server part")); \ + return VIR_DRV_OPEN_ERROR; \ + } \ + } while (0) =20 # define __VIR_DRIVER_H_INCLUDES___ =20 --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 07:02:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1531012088627996.9309347169885; Sat, 7 Jul 2018 18:08:08 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6EBEDC049D4B; Sun, 8 Jul 2018 01:08:07 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3CE6610694C3; Sun, 8 Jul 2018 01:08:07 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D6C6518037EF; Sun, 8 Jul 2018 01:08:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6817Vbo030050 for ; Sat, 7 Jul 2018 21:07:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id 07487764EF; Sun, 8 Jul 2018 01:07:31 +0000 (UTC) Received: from mx1.redhat.com (ext-mx11.extmail.prod.ext.phx2.redhat.com [10.5.110.40]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F1592173EA for ; Sun, 8 Jul 2018 01:07:28 +0000 (UTC) Received: from mail-qt0-f195.google.com (mail-qt0-f195.google.com [209.85.216.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B1E443084023 for ; Sun, 8 Jul 2018 01:07:17 +0000 (UTC) Received: by mail-qt0-f195.google.com with SMTP id z6-v6so12906677qti.2 for ; Sat, 07 Jul 2018 18:07:17 -0700 (PDT) Received: from localhost.localdomain ([2804:7f5:d180:a19b:75f1:49c8:66b0:6e4d]) by smtp.gmail.com with ESMTPSA id e11-v6sm8007287qkb.4.2018.07.07.18.07.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Jul 2018 18:07:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CI72SowUfvNHcTvPvi4k0oRWZsssnnkkYQlaAimN2Uw=; b=Rw0il6jccyNmoBh1/GK17ZqcBSLMMVwJrJqD/S76vJYAfyF83yhpbrM7q17xV3+i5m 1pkEXHGwBfZ4+9ARkDPZxoZnsMRAwtYTguvq+q24ZmsuuIc6t82Ufv4IZck2ggyZy2wB Sgh3FlwIkyVBq3zTstIQgEp2AhZ6SlJIB+Q1QO0Sdmk8OJrdw4mTcUfUT5wCr3CK66HF dtzh7sGxwE0jMVTsA0ui1Rha5C1LpCrVYHJrZSsuNH0w5W8dlXBXMbKIs4pjHwV0Z9W3 80pSSZM788qzZI5S28+7zx72bZAAFaErL0kBqkGDT5Ul2Ch+RDijvPrRxaDQZ4DPhp7k pGFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CI72SowUfvNHcTvPvi4k0oRWZsssnnkkYQlaAimN2Uw=; b=ZP4yUuKf9d7OFB/do/jTpfX7W1OypwaL/XyuJNPhJv2ENMa9n+FmHSZExonayPLR2a ZWZSuVKVOpJWFpguiixX+orF8I6iZwHJmNaAsxoZbVT6YWxBcrjdR8GQ0zuiXbQ1rZWh zW/Jv5R4OfwiMiK6feReQcL0lclNqhGPHbcB4BcvIduypTJRJqw9oGo3mWkIsLmt/Rft wGBOTbnuIJiYNrGWr1kCxDKPvNtcv37hpDgjXqZ3lprJh8e4uZVSUwtB6dpcEfyWW9eM p0uoeo2uP8PO0sTE4hljVm2txOzJFj/oCgU1NfihA+WMq9//XeJZkyZZ9CIPsdGBGJ1a e9Yw== X-Gm-Message-State: APt69E2OnV92oHA8FJbrGHlEGQc3kW+MSIZ4TEn/9hSB8SBTrhAgOAaZ 8uLMhQvD/5TsV7AyQp9+TRUvgA== X-Google-Smtp-Source: AAOMgpc4IbEzlqK/wHv7F6DnKmLqyjCUm2CECf3lhJ7at7PVkcuFGCQqG23QLbk5SIc2E14XkPsCQQ== X-Received: by 2002:a0c:dc0c:: with SMTP id s12-v6mr13487627qvk.155.1531012036574; Sat, 07 Jul 2018 18:07:16 -0700 (PDT) From: Marcos Paulo de Souza To: libvir-list@redhat.com Date: Sat, 7 Jul 2018 22:06:54 -0300 Message-Id: <20180708010656.9047-3-marcos.souza.org@gmail.com> In-Reply-To: <20180708010656.9047-1-marcos.souza.org@gmail.com> References: <20180708010656.9047-1-marcos.souza.org@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Sun, 08 Jul 2018 01:07:17 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Sun, 08 Jul 2018 01:07:17 +0000 (UTC) for IP:'209.85.216.195' DOMAIN:'mail-qt0-f195.google.com' HELO:'mail-qt0-f195.google.com' FROM:'marcos.souza.org@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.281 * (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS, T_DKIM_INVALID) 209.85.216.195 mail-qt0-f195.google.com 209.85.216.195 mail-qt0-f195.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.40 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Marcos Paulo de Souza Subject: [libvirt] [RFC PATCH 2/4] esx_driver: Use VIR_DRV_CONN_CHECK_SERVER macro X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Sun, 08 Jul 2018 01:08:08 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" ESX needs a server to connect to, so use this macro in order to reuse code. Signed-off-by: Marcos Paulo de Souza --- src/esx/esx_driver.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index 06e1238385..89ac7c430f 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -854,12 +854,7 @@ esxConnectOpen(virConnectPtr conn, virConnectAuthPtr a= uth, conn->uri->path, conn->uri->scheme); } =20 - /* Require server part */ - if (!conn->uri->server) { - virReportError(VIR_ERR_INVALID_ARG, "%s", - _("URI is missing the server part")); - return VIR_DRV_OPEN_ERROR; - } + VIR_DRV_CONN_CHECK_SERVER; =20 /* Require auth */ if (!auth || !auth->cb) { --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 07:02:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1531012057145746.3945833012086; Sat, 7 Jul 2018 18:07:37 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 47D6A3086245; Sun, 8 Jul 2018 01:07:35 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 016F71001911; Sun, 8 Jul 2018 01:07:35 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id CFC954A460; Sun, 8 Jul 2018 01:07:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6817VMx030055 for ; Sat, 7 Jul 2018 21:07:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id BEC0745A4; Sun, 8 Jul 2018 01:07:31 +0000 (UTC) Received: from mx1.redhat.com (ext-mx08.extmail.prod.ext.phx2.redhat.com [10.5.110.32]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B39514502 for ; Sun, 8 Jul 2018 01:07:31 +0000 (UTC) Received: from mail-qk0-f181.google.com (mail-qk0-f181.google.com [209.85.220.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 87878C057F85 for ; Sun, 8 Jul 2018 01:07:20 +0000 (UTC) Received: by mail-qk0-f181.google.com with SMTP id u62-v6so8142104qkf.9 for ; Sat, 07 Jul 2018 18:07:20 -0700 (PDT) Received: from localhost.localdomain ([2804:7f5:d180:a19b:75f1:49c8:66b0:6e4d]) by smtp.gmail.com with ESMTPSA id e11-v6sm8007287qkb.4.2018.07.07.18.07.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Jul 2018 18:07:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AH/+P2gKpGf+n6RFQHH93jULELxjdSmrKh6tGjuVzyM=; b=TVetoT6mkKM8XEBezoBL+xmoXin9eFZ2huhORK+JmolsRQBXxDREZSob8iCUghbCxF IRan9QIkQr2LyYPaxQOSmd66suGqFq1kamlRkW+d/lj033uBvO/XZJKl/+gJNXTW/gNU 7OTMLarQA1nIxPERfwHASBDBL5I3dh1gRWgu1s2z76P20QL6gTPoysWD4Lr+F63tRf1e 8fHYhBiJpSZcDc+xTR2zrE91X0mpcOZoriaczmSMhPX8+8DH1Tm/cevspJnJY+S0gJuL Lw4IAuXx8qCMZP1et2l27chn/jkTe4tCr3CeML0jyxjo6NVEo6tErIu/hrPoj0Cz+ggK yKPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=AH/+P2gKpGf+n6RFQHH93jULELxjdSmrKh6tGjuVzyM=; b=PsZ/FQubmhkOq/Lq83NtPp7P6oL6W8B/Vq8yOLlMUPtQMYe4Ng1gtfyDsamfPkD46/ qbAD1z7mTYL36k6+9mgu9rt2KiGp4a9Q24zYoFVu24Ga9JYiD+8OUdINLfPVutT0ZN8t rZQ5rBEJn73zkbcSdn2fE2k7vR7V9vvWUNDIxLSiJJc6UpJjikhEQJQQPIelbHEPCm00 gJmU4ZgV+8oq69m155By4zmSu3qq202+Aw1ol1tNnLpGJs+BxcEXaOwZrHX1pK4x57nE y5NIALPTRkpIEZxX4eHiXnyIfetbU+r1r1LIktoqRIltTPUotufXiq+St6tMG/JtbI7b Hyrw== X-Gm-Message-State: APt69E0S/8Ca3MotDBjRm62aaHNWJNXpVaRV7S/olSEjObjMj1BS223Y K5plUWUcrovk/SVFxsLPpqh6fg== X-Google-Smtp-Source: AAOMgpeSzIRjVSiNYqu0vYMC8NMPV4XkxsBx1m+7sAEAmwdrmntROH01SraxS+BhiiRF1IXhtiNuHg== X-Received: by 2002:a37:21a0:: with SMTP id f32-v6mr13463159qki.45.1531012039386; Sat, 07 Jul 2018 18:07:19 -0700 (PDT) From: Marcos Paulo de Souza To: libvir-list@redhat.com Date: Sat, 7 Jul 2018 22:06:55 -0300 Message-Id: <20180708010656.9047-4-marcos.souza.org@gmail.com> In-Reply-To: <20180708010656.9047-1-marcos.souza.org@gmail.com> References: <20180708010656.9047-1-marcos.souza.org@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Sun, 08 Jul 2018 01:07:20 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Sun, 08 Jul 2018 01:07:20 +0000 (UTC) for IP:'209.85.220.181' DOMAIN:'mail-qk0-f181.google.com' HELO:'mail-qk0-f181.google.com' FROM:'marcos.souza.org@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.281 * (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS, T_DKIM_INVALID) 209.85.220.181 mail-qk0-f181.google.com 209.85.220.181 mail-qk0-f181.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.32 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: Marcos Paulo de Souza Subject: [libvirt] [RFC PATCH 3/4] hyperv_driver: Use VIR_DRV_CONN_CHECK_SERVER macro X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Sun, 08 Jul 2018 01:07:35 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" hyperv needs a server to connect to, so use this macro in order to reuse code. Signed-off-by: Marcos Paulo de Souza --- src/hyperv/hyperv_driver.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c index 95496bdf73..a419f0ccee 100644 --- a/src/hyperv/hyperv_driver.c +++ b/src/hyperv/hyperv_driver.c @@ -128,12 +128,7 @@ hypervConnectOpen(virConnectPtr conn, virConnectAuthPt= r auth, =20 virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR); =20 - /* Require server part */ - if (conn->uri->server =3D=3D NULL) { - virReportError(VIR_ERR_INVALID_ARG, "%s", - _("URI is missing the server part")); - return VIR_DRV_OPEN_ERROR; - } + VIR_DRV_CONN_CHECK_SERVER; =20 /* Require auth */ if (auth =3D=3D NULL || auth->cb =3D=3D NULL) { --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Thu Apr 25 07:02:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1531012064678502.7723391453045; Sat, 7 Jul 2018 18:07:44 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 99D9937F43; Sun, 8 Jul 2018 01:07:39 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 36AEF2015E40; Sun, 8 Jul 2018 01:07:39 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D60324A465; Sun, 8 Jul 2018 01:07:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w6817aTr030071 for ; Sat, 7 Jul 2018 21:07:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id 1E210308BDA5; Sun, 8 Jul 2018 01:07:36 +0000 (UTC) Received: from mx1.redhat.com (ext-mx06.extmail.prod.ext.phx2.redhat.com [10.5.110.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9D234308BDA3 for ; Sun, 8 Jul 2018 01:07:33 +0000 (UTC) Received: from mail-qk0-f195.google.com (mail-qk0-f195.google.com [209.85.220.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 24351356C2 for ; Sun, 8 Jul 2018 01:07:23 +0000 (UTC) Received: by mail-qk0-f195.google.com with SMTP id z74-v6so8141398qkb.10 for ; Sat, 07 Jul 2018 18:07:23 -0700 (PDT) Received: from localhost.localdomain ([2804:7f5:d180:a19b:75f1:49c8:66b0:6e4d]) by smtp.gmail.com with ESMTPSA id e11-v6sm8007287qkb.4.2018.07.07.18.07.19 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Jul 2018 18:07:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=06rNA5vkfooMUHP2Yuds0qxwk1YCwTnuGgyLAFrektE=; b=nNCrTiAE91p3WMM+gY2LlE0OKpQmp2AqJ4UT9ooW7qUaeeu7LW1qzEzx1wyHaGlMJ7 Qe4DaiWawc0ievhAXxydOR+yAaRGQ6wTiysWq9oLt3H6JJNr0NU5XFjE8/J04RW/v+oG TGV3MkAcQ3eJiMwpxmjAPIeByFFH4t/RA+ps8VYMIqX34CAs1xgvBs41KhZ/tlJBkjFf dYP9vJAINI1hS9SmRQbA70s1sIK01VaK5FGyPawbeF2buWaql+15aRxnqqoLsGL3bd/8 xIfWJK9HpUm5hv/qwqmAqH/Ic5mg/i0QgHcsRvNZNL8b+wgHH2yUNVF0tbtQQRX3gc7h Vs+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=06rNA5vkfooMUHP2Yuds0qxwk1YCwTnuGgyLAFrektE=; b=a6snyv5upZSae76RHUG0vnjM6ko86RwM1EvkDYiPlJF0Y16J8t/4mB5zjP07LA2CZI 4kEvOHUeUIRB15SpDNj//KbtqaOSuX7HbDAXhewFzwTE9pw7KWo1nMbXzX+LdLuInAMw 6Tf0356DegNPjsBftRzyZGidSMQFFSJd0q4UN9bknrDkV9EaFyRqcKyDsHfTwUAK1OSo dJWdiqo1l60Y7rbLcA9MWF2EP+Y5vhGhhaHdCs5MmAohNGJ3r6Ix0Aej9EXMRuZxD/8z hvSg6RDd9KHu+0vQecg12NPJMxI0/BoaGvJgFWChalH7fPROQsywAVDRUU6Markd1tZk m8XQ== X-Gm-Message-State: APt69E25TEbm4SuzHkf2lO7zv6QaTyTDqYdYG91hYT+/R2g5kLefn0R9 PEf3qK+9aR4o5nu9lC1oo3vQXw== X-Google-Smtp-Source: AAOMgpfcAuA5Qlziz7vBfZASs2BWwyt9SWAYs3Rp9pD3edSFdYzbosNhO7XNEweJ+OtrpKSzCT35tw== X-Received: by 2002:ae9:e118:: with SMTP id g24-v6mr13045992qkm.306.1531012041870; Sat, 07 Jul 2018 18:07:21 -0700 (PDT) From: Marcos Paulo de Souza To: libvir-list@redhat.com Date: Sat, 7 Jul 2018 22:06:56 -0300 Message-Id: <20180708010656.9047-5-marcos.souza.org@gmail.com> In-Reply-To: <20180708010656.9047-1-marcos.souza.org@gmail.com> References: <20180708010656.9047-1-marcos.souza.org@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Sun, 08 Jul 2018 01:07:23 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Sun, 08 Jul 2018 01:07:23 +0000 (UTC) for IP:'209.85.220.195' DOMAIN:'mail-qk0-f195.google.com' HELO:'mail-qk0-f195.google.com' FROM:'marcos.souza.org@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.281 * (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS, T_DKIM_INVALID) 209.85.220.195 mail-qk0-f195.google.com 209.85.220.195 mail-qk0-f195.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.30 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-loop: libvir-list@redhat.com Cc: Marcos Paulo de Souza Subject: [libvirt] [RFC PATCH 4/4] phyp_driver: Use VIR_DRV_CONN_CHECK_SERVER macro X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.25 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Sun, 08 Jul 2018 01:07:40 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" phyp needs a server to connect to, so use this macro in order to reuse code. Signed-off-by: Marcos Paulo de Souza --- 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, =20 virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR); =20 - if (conn->uri->server =3D=3D NULL) { - virReportError(VIR_ERR_INTERNAL_ERROR, - "%s", _("Missing server name in phyp:// URI")); - return VIR_DRV_OPEN_ERROR; - } + VIR_DRV_CONN_CHECK_SERVER; =20 if (VIR_ALLOC(phyp_driver) < 0) goto failure; --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list