From nobody Mon Feb 9 00:38:50 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.25 as permitted sender) client-ip=209.132.183.25; envelope-from=libvir-list-bounces@redhat.com; helo=mx4-phx2.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.25 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) by mx.zohomail.com with SMTPS id 1488814056343665.0002247059671; Mon, 6 Mar 2017 07:27:36 -0800 (PST) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v26FOU3o015594; Mon, 6 Mar 2017 10:24:30 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v26FORGK009614 for ; Mon, 6 Mar 2017 10:24:27 -0500 Received: from andariel.redhat.com (ovpn-204-73.brq.redhat.com [10.40.204.73]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v26FONSf030039; Mon, 6 Mar 2017 10:24:26 -0500 From: Peter Krempa To: libvir-list@redhat.com Date: Mon, 6 Mar 2017 16:24:37 +0100 Message-Id: <4f599e8218cb13a861fcc9b2015a9ff442a49677.1488813740.git.pkrempa@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-loop: libvir-list@redhat.com Cc: Peter Krempa Subject: [libvirt] [PATCH 2/4] tests: sysinfo: Export virSysinfoSetup via the private header 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" virSysinfoSetup should be used only in tests so it can be moved to the new header file rather than using an extern declaration. --- src/util/virsysinfo.c | 9 ++++----- src/util/virsysinfopriv.h | 5 +++++ tests/sysinfotest.c | 8 +++----- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c index bdd430470..7b54bda12 100644 --- a/src/util/virsysinfo.c +++ b/src/util/virsysinfo.c @@ -55,12 +55,11 @@ static const char *sysinfoCpuinfo =3D "/proc/cpuinfo"; #define CPUINFO sysinfoCpuinfo #define CPUINFO_FILE_LEN (1024*1024) /* 1MB limit for /proc/cpuinfo file */ -/* only to be used test programs, therefore not in sysinfo.h */ -extern void virSysinfoSetup(const char *dmidecode, const char *sysinfo, - const char *cpuinfo); -void virSysinfoSetup(const char *dmidecode, const char *sysinfo, - const char *cpuinfo) +void +virSysinfoSetup(const char *dmidecode, + const char *sysinfo, + const char *cpuinfo) { sysinfoDmidecode =3D dmidecode; sysinfoSysinfo =3D sysinfo; diff --git a/src/util/virsysinfopriv.h b/src/util/virsysinfopriv.h index 915236479..a50b280f6 100644 --- a/src/util/virsysinfopriv.h +++ b/src/util/virsysinfopriv.h @@ -24,6 +24,11 @@ #ifndef __VIR_SYSINFO_PRIV_H__ # define __VIR_SYSINFO_PRIV_H__ +void +virSysinfoSetup(const char *dmidecode, + const char *sysinfo, + const char *cpuinfo); + virSysinfoDefPtr virSysinfoReadPPC(void); diff --git a/tests/sysinfotest.c b/tests/sysinfotest.c index 457c3415e..f81a0466c 100644 --- a/tests/sysinfotest.c +++ b/tests/sysinfotest.c @@ -37,6 +37,9 @@ #include "virfile.h" #include "virstring.h" +#define __VIR_SYSINFO_PRIV_H_ALLOW__ +#include "virsysinfopriv.h" + #define VIR_FROM_THIS VIR_FROM_NONE #if defined (__linux__) @@ -46,11 +49,6 @@ defined(__i386__) || defined(__x86_64__) || defined(__amd64__) || \ defined(__arm__) || defined(__aarch64__) -/* from sysinfo.c */ -void virSysinfoSetup(const char *decoder, - const char *sysinfo, - const char *cpuinfo); - struct testSysinfoData { char *decoder; /* name of dmi decoder binary/script */ char *sysinfo; /* name of /proc/sysinfo substitute file */ --=20 2.11.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list