From nobody Sun Feb 8 16:24:20 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.24 as permitted sender) client-ip=209.132.183.24; envelope-from=libvir-list-bounces@redhat.com; helo=mx3-phx2.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.24 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by mx.zohomail.com with SMTPS id 1489606273548946.7499878127408; Wed, 15 Mar 2017 12:31:13 -0700 (PDT) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2FJRtEJ023705; Wed, 15 Mar 2017 15:27:55 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v2FJRrYj015297 for ; Wed, 15 Mar 2017 15:27:53 -0400 Received: from localhost.localdomain.com (ovpn-116-76.phx2.redhat.com [10.3.116.76]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v2FJRqag018059 for ; Wed, 15 Mar 2017 15:27:53 -0400 From: John Ferlan To: libvir-list@redhat.com Date: Wed, 15 Mar 2017 15:27:48 -0400 Message-Id: <20170315192749.24632-2-jferlan@redhat.com> In-Reply-To: <20170315192749.24632-1-jferlan@redhat.com> References: <20170315192749.24632-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/2] conf: Alter error message for vHBA creation using parent wwnn/wwpn 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-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Commit id 'bb74a7ffe' added a fairly non specific message when providing only the or instead of provid= ing both wwnn and wwpn. This patch just modifies the message to be more specific about which was missing. Signed-off-by: John Ferlan --- src/conf/node_device_conf.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index 3565aec..2b49f5c 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -1615,10 +1615,19 @@ virNodeDeviceDefParseXML(xmlXPathContextPtr ctxt, def->parent =3D virXPathString("string(./parent[1])", ctxt); def->parent_wwnn =3D virXPathString("string(./parent[1]/@wwnn)", ctxt); def->parent_wwpn =3D virXPathString("string(./parent[1]/@wwpn)", ctxt); - if ((def->parent_wwnn && !def->parent_wwpn) || - (!def->parent_wwnn && def->parent_wwpn)) { - virReportError(VIR_ERR_XML_ERROR, "%s", - _("must supply both wwnn and wwpn for parent")); + if (def->parent_wwnn && !def->parent_wwpn) { + virReportError(VIR_ERR_XML_ERROR, + _("when providing parent wwnn=3D'%s', the " + "wwpn must also be provided"), + def->parent_wwnn); + goto error; + } + + if (!def->parent_wwnn && def->parent_wwpn) { + virReportError(VIR_ERR_XML_ERROR, + _("when providing parent wwpn=3D'%s', the " + "wwnn must also be provided"), + def->parent_wwpn); goto error; } def->parent_fabric_wwn =3D virXPathString("string(./parent[1]/@fabric_= wwn)", --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list