mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
tests: sysinfo: Export virSysinfoSetup via the private header
virSysinfoSetup should be used only in tests so it can be moved to the new header file rather than using an extern declaration.
This commit is contained in:
parent
b38c6b6ad3
commit
c58d95b7a0
@ -55,11 +55,10 @@ static const char *sysinfoCpuinfo = "/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,
|
||||
void
|
||||
virSysinfoSetup(const char *dmidecode,
|
||||
const char *sysinfo,
|
||||
const char *cpuinfo)
|
||||
{
|
||||
sysinfoDmidecode = dmidecode;
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user