mirror of https://gitee.com/openkylin/libvirt.git
virsysinfo: Rename virSysinfoReadX86 to virSysinfoReadDMI
There's nothing x86 specific about this function. Rename the function so that it has DMI suffix which enables it to be reused on different arches (as using X86 from say ARM would look suspicious). Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
parent
667a373526
commit
ac61c9cfc3
|
@ -3070,9 +3070,9 @@ virSysinfoSystemDefFree;
|
|||
|
||||
# util/virsysinfopriv.h
|
||||
virSysinfoReadARM;
|
||||
virSysinfoReadDMI;
|
||||
virSysinfoReadPPC;
|
||||
virSysinfoReadS390;
|
||||
virSysinfoReadX86;
|
||||
|
||||
|
||||
# util/virsystemd.h
|
||||
|
|
|
@ -1139,7 +1139,7 @@ virSysinfoParseX86Memory(const char *base, virSysinfoDefPtr ret)
|
|||
}
|
||||
|
||||
virSysinfoDefPtr
|
||||
virSysinfoReadX86(void)
|
||||
virSysinfoReadDMI(void)
|
||||
{
|
||||
char *path;
|
||||
virSysinfoDefPtr ret = NULL;
|
||||
|
@ -1220,7 +1220,7 @@ virSysinfoRead(void)
|
|||
(defined(__x86_64__) || \
|
||||
defined(__i386__) || \
|
||||
defined(__amd64__))
|
||||
return virSysinfoReadX86();
|
||||
return virSysinfoReadDMI();
|
||||
#else /* WIN32 || not supported arch */
|
||||
/*
|
||||
* this can probably be extracted from Windows using API or registry
|
||||
|
|
|
@ -39,6 +39,6 @@ virSysinfoDefPtr
|
|||
virSysinfoReadS390(void);
|
||||
|
||||
virSysinfoDefPtr
|
||||
virSysinfoReadX86(void);
|
||||
virSysinfoReadDMI(void);
|
||||
|
||||
#endif /* LIBVIRT_VIRSYSINFOPRIV_H */
|
||||
|
|
|
@ -133,7 +133,7 @@ mymain(void)
|
|||
TEST("s390", virSysinfoReadS390);
|
||||
TEST("s390-freq", virSysinfoReadS390);
|
||||
TEST("ppc", virSysinfoReadPPC);
|
||||
TEST_FULL("x86", virSysinfoReadX86, "/sysinfodata/x86dmidecode.sh");
|
||||
TEST_FULL("x86", virSysinfoReadDMI, "/sysinfodata/x86dmidecode.sh");
|
||||
TEST("arm", virSysinfoReadARM);
|
||||
TEST("arm-rpi2", virSysinfoReadARM);
|
||||
TEST("aarch64", virSysinfoReadARM);
|
||||
|
|
Loading…
Reference in New Issue