From nobody Thu Jan 2 14:52:56 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1734710103897766.8925078645859; Fri, 20 Dec 2024 07:55:03 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 996) id B8352188E; Fri, 20 Dec 2024 10:55:02 -0500 (EST) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id A4A77176D; Fri, 20 Dec 2024 10:54:42 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 996) id BF745173C; Fri, 20 Dec 2024 10:54:39 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id DC0B01733 for ; Fri, 20 Dec 2024 10:54:38 -0500 (EST) Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-678-dkbmRzvWPfyzNc5RNCXtZA-1; Fri, 20 Dec 2024 10:54:37 -0500 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4B854195608A for ; Fri, 20 Dec 2024 15:54:36 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.3.236]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 86657195608A for ; Fri, 20 Dec 2024 15:54:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1734710078; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VDb37A3kemdZ32/iWVReiOvylmYoYBng4lPWevqMmfY=; b=Zh8PqT3TsYJ7tM1QtWU3eRu4gpstktIP2J+gF58hycVTgIrqRz7Vr/Kdgn5q5PNfqw8eM1 NkHqhcKucmK7L27SnMv/4quBrgucVaUHBSAsvUNGg170HaESifOSrYz4HLv7KOX6+sqSRQ sCmRr4HxT1szt6zXQmYoyTSSST2L7Hs= X-MC-Unique: dkbmRzvWPfyzNc5RNCXtZA-1 X-Mimecast-MFC-AGG-ID: dkbmRzvWPfyzNc5RNCXtZA From: Michal Privoznik To: devel@lists.libvirt.org Subject: [PATCH] hyperv: Introduce and export 'facility' variable. Date: Fri, 20 Dec 2024 16:54:33 +0100 Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: pRb3MylHS7cC3tsMsAsPVdu4uA6VHDVThPRCU7m2L78_1734710076 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: KGDEST3OMJ5ZNB72VCOSZOPTPLSZOOIU X-Message-ID-Hash: KGDEST3OMJ5ZNB72VCOSZOPTPLSZOOIU X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1734710105593116600 Content-Type: text/plain; charset="utf-8"; x-default="true" In its upstream commit [1] openwsman dropped 'facility' variable which is documented as: * all processes that use the libu must define a "facility" variable somewh= ere * to satisfy this external linkage reference. * * Such variable will be used as the syslog(3) facility argument. Well, prior to that commit, openwsman itself declared the variable (and set it to LOG_DAEMON). Now it's up to us. Yeah, the variable naming is terrible and also I we are not using libu directly, but apparently libwsman.so requires it anyway: $ objdump -T /usr/lib64/libwsman.so | grep facility 0000000000000000 D *UND* 0000000000000000 Base facility 1: https://github.com/Openwsman/openwsman/commit/d72c51f21b9c85a773b7955ac5= 87d2d3cea982c1 Signed-off-by: Michal Privoznik --- src/hyperv/hyperv_wmi.c | 3 +++ src/libvirt_hyperv.syms | 11 +++++++++++ src/meson.build | 6 ++++++ 3 files changed, 20 insertions(+) create mode 100644 src/libvirt_hyperv.syms diff --git a/src/hyperv/hyperv_wmi.c b/src/hyperv/hyperv_wmi.c index 0b82f1f131..040bcfec11 100644 --- a/src/hyperv/hyperv_wmi.c +++ b/src/hyperv/hyperv_wmi.c @@ -28,6 +28,7 @@ #include #include #include +#include =20 #include "internal.h" #include "virerror.h" @@ -47,6 +48,8 @@ =20 VIR_LOG_INIT("hyperv.hyperv_wmi"); =20 +int facility =3D LOG_DAEMON; + int hypervGetWmiClassList(hypervPrivate *priv, hypervWmiClassInfo *wmiInfo, virBuffer *query, hypervObject **wmiClass) diff --git a/src/libvirt_hyperv.syms b/src/libvirt_hyperv.syms new file mode 100644 index 0000000000..60e98db473 --- /dev/null +++ b/src/libvirt_hyperv.syms @@ -0,0 +1,11 @@ +# +# HyperV-specific symbols +# + +# hyperv/hyperv_wmi.c +facility; + +# Let emacs know we want case-insensitive sorting +# Local Variables: +# sort-fold-case: t +# End: diff --git a/src/meson.build b/src/meson.build index b53ea2a71f..cce89fac27 100644 --- a/src/meson.build +++ b/src/meson.build @@ -125,6 +125,12 @@ else sym_files +=3D 'libvirt_libssh2.syms' endif =20 +if conf.has('WITH_HYPERV') + used_sym_files +=3D 'libvirt_hyperv.syms' +else + sym_files +=3D 'libvirt_hyperv.syms' +endif + # variables filled by subdirectories =20 libvirt_libs =3D [] --=20 2.45.2