提交 c58d95b7 编写于 作者: P Peter Krempa

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.
上级 b38c6b6a
......@@ -55,12 +55,11 @@ 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,
const char *cpuinfo)
void
virSysinfoSetup(const char *dmidecode,
const char *sysinfo,
const char *cpuinfo)
{
sysinfoDmidecode = dmidecode;
sysinfoSysinfo = sysinfo;
......
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册