From nobody Mon Feb 9 19:04:25 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1620745645; cv=none; d=zohomail.com; s=zohoarc; b=YqFxj+WDNJarMD3HHz45ZIbvpU9zoXUuJYnK6Aqnh/hBMsISVJRONE1GixP0RqB24x+9q7jMgj+w1aFuZEpguDjmH2MbhlWSzBTAWNpqnTVn8bbTN69fo2pmejvxu3iAcNZcVH8GoVIsyMjL2RetUV74FVhhgS3uIHx7wlv/91w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1620745645; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=KtZuFWJQN5Q72kAEDWPdJou2QKuFeGcTsqlKnUdA2ds=; b=Gv4Je0Yr94BsygiuV6FsL68IIfWWaWtm/azRF7+5aDR31kiS7lm0NQ0LTDYSvj18Zq2rQVeJjybwUpDLAIqTtGWw+kkbGX+O+DpDcUwo5dfm9tgOodIkw2RoMigHmdLxL5MqQw4q20OOuSitvlNrRz7Jz06hDGzgwweoJ6Ka1sI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 16207456459826.528018529486076; Tue, 11 May 2021 08:07:25 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-23-vfqlpLZuO725AhWKlE_gHA-1; Tue, 11 May 2021 11:02:22 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 51FF0FC9C; Tue, 11 May 2021 15:02:14 +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 91F951037F3D; Tue, 11 May 2021 15:02:13 +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 1A1D7180B464; Tue, 11 May 2021 15:02:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 14BF26u3005552 for ; Tue, 11 May 2021 11:02:06 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2FF5B53CC6; Tue, 11 May 2021 15:02:06 +0000 (UTC) Received: from work.redhat.com (ovpn-113-41.ams2.redhat.com [10.36.113.41]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7B69B50E2F; Tue, 11 May 2021 15:02:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620745345; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=KtZuFWJQN5Q72kAEDWPdJou2QKuFeGcTsqlKnUdA2ds=; b=ZUSxLwzChlP+tTsKrZ7co4rv1JpL5MzM9gximwwosw3cE0Clg6RWgfcX9clAs51LXT33a3 HNhFsoOvs6mOvAYO4FctRxiL52YXy1F1gmMuko184fgHfkpR+8Cq2cfDP5dJ0ydkacjARo xHuSWtVUgbRwwA0fxy9HPw6KzupQD8o= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620745645; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=KtZuFWJQN5Q72kAEDWPdJou2QKuFeGcTsqlKnUdA2ds=; b=TFp6mfnDhtqc2Rubn7oYigv62ONRjCoyhwlKxhCIkMelb/FCcySMxypyIb3OKJHQAjRXhC NRQm9zHWYyUJJv9JO5LXRuJb+bA1GWLBc3WT7PZEw8lDtgcdMWJ2zFIcW15+KIz4hlIspK bY3Z6b8nFPsCpVa3+ydGSJve8+fghz4= X-MC-Unique: vfqlpLZuO725AhWKlE_gHA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH 07/10] virStorageAdapterParseXMLFCHost: Use virXMLProp* Date: Tue, 11 May 2021 17:01:54 +0200 Message-Id: <20210511150157.26027-8-twiederh@redhat.com> In-Reply-To: <20210511150157.26027-1-twiederh@redhat.com> References: <20210511150157.26027-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Tim Wiederhake Reviewed-by: Laine Stump --- src/conf/storage_adapter_conf.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/conf/storage_adapter_conf.c b/src/conf/storage_adapter_con= f.c index 142489f6cd..6b5a58e1e7 100644 --- a/src/conf/storage_adapter_conf.c +++ b/src/conf/storage_adapter_conf.c @@ -64,28 +64,17 @@ static int virStorageAdapterParseXMLFCHost(xmlNodePtr node, virStorageAdapterFCHost *fchost) { - char *managed =3D NULL; + if (virXMLPropTristateBool(node, "managed", VIR_XML_PROP_NONE, + &fchost->managed) < 0) + return -1; =20 fchost->parent =3D virXMLPropString(node, "parent"); - if ((managed =3D virXMLPropString(node, "managed"))) { - int value; - if ((value =3D virTristateBoolTypeFromString(managed)) < 0) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("unknown fc_host managed setting '%s'"), - managed); - VIR_FREE(managed); - return -1; - } - fchost->managed =3D value; - } - fchost->parent_wwnn =3D virXMLPropString(node, "parent_wwnn"); fchost->parent_wwpn =3D virXMLPropString(node, "parent_wwpn"); fchost->parent_fabric_wwn =3D virXMLPropString(node, "parent_fabric_ww= n"); fchost->wwpn =3D virXMLPropString(node, "wwpn"); fchost->wwnn =3D virXMLPropString(node, "wwnn"); =20 - VIR_FREE(managed); return 0; } =20 --=20 2.26.3