Since nobody sets custom dmidecode path anymore, we can drop all code that exists only because of that. Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx> --- src/util/virsysinfo.c | 10 ++-------- src/util/virsysinfopriv.h | 3 +-- tests/sysinfotest.c | 2 +- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/util/virsysinfo.c b/src/util/virsysinfo.c index 0bf80c339b..a26c27e83e 100644 --- a/src/util/virsysinfo.c +++ b/src/util/virsysinfo.c @@ -45,23 +45,18 @@ VIR_ENUM_IMPL(virSysinfo, "smbios", ); -static const char *sysinfoDmidecode = DMIDECODE; static const char *sysinfoSysinfo = "/proc/sysinfo"; static const char *sysinfoCpuinfo = "/proc/cpuinfo"; -#define SYSINFO_SMBIOS_DECODER sysinfoDmidecode #define SYSINFO sysinfoSysinfo #define CPUINFO sysinfoCpuinfo #define CPUINFO_FILE_LEN (1024*1024) /* 1MB limit for /proc/cpuinfo file */ void -virSysinfoSetup(const char *dmidecode, - const char *sysinfo, +virSysinfoSetup(const char *sysinfo, const char *cpuinfo) { - if (dmidecode) - sysinfoDmidecode = dmidecode; sysinfoSysinfo = sysinfo; sysinfoCpuinfo = cpuinfo; } @@ -1124,8 +1119,7 @@ virSysinfoReadDMI(void) g_autofree char *outbuf = NULL; g_autoptr(virCommand) cmd = NULL; - cmd = virCommandNewArgList(SYSINFO_SMBIOS_DECODER, - "-q", "-t", "0,1,2,3,4,17", NULL); + cmd = virCommandNewArgList(DMIDECODE, "-q", "-t", "0,1,2,3,4,17", NULL); virCommandSetOutputBuffer(cmd, &outbuf); if (virCommandRun(cmd, NULL) < 0) return NULL; diff --git a/src/util/virsysinfopriv.h b/src/util/virsysinfopriv.h index cdcb021309..d6c558a32d 100644 --- a/src/util/virsysinfopriv.h +++ b/src/util/virsysinfopriv.h @@ -24,8 +24,7 @@ #pragma once void -virSysinfoSetup(const char *dmidecode, - const char *sysinfo, +virSysinfoSetup(const char *sysinfo, const char *cpuinfo); virSysinfoDefPtr diff --git a/tests/sysinfotest.c b/tests/sysinfotest.c index f080569730..10d24b823a 100644 --- a/tests/sysinfotest.c +++ b/tests/sysinfotest.c @@ -84,7 +84,7 @@ testSysinfo(const void *data) virCommandSetDryRun(NULL, testDMIDecodeDryRun, sysinfo); - virSysinfoSetup(NULL, sysinfo, cpuinfo); + virSysinfoSetup(sysinfo, cpuinfo); ret = testdata->func(); virCommandSetDryRun(NULL, NULL, NULL); -- 2.26.2