qemu: Make most qemuDomainMachine*() functions static

Ideally we'd make all of them static, but there are a few
cases where we don't have a virDomainDef instance handy and
so they are the only option.

For the few ones we're forced to keep exporting, document
through comments that the alternative is preferred.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
Andrea Bolognani 2018-11-28 17:34:07 +01:00
parent 8a8b14718e
commit 68e26a9ea2
2 changed files with 13 additions and 15 deletions

View File

@ -9875,7 +9875,7 @@ qemuFindAgentConfig(virDomainDefPtr def)
}
bool
static bool
qemuDomainMachineIsQ35(const char *machine,
const virArch arch)
{
@ -9887,7 +9887,7 @@ qemuDomainMachineIsQ35(const char *machine,
}
bool
static bool
qemuDomainMachineIsI440FX(const char *machine,
const virArch arch)
{
@ -9902,7 +9902,7 @@ qemuDomainMachineIsI440FX(const char *machine,
}
bool
static bool
qemuDomainMachineIsS390CCW(const char *machine,
const virArch arch)
{
@ -9913,6 +9913,8 @@ qemuDomainMachineIsS390CCW(const char *machine,
}
/* You should normally avoid this function and use
* qemuDomainIsARMVirt() instead. */
bool
qemuDomainMachineIsARMVirt(const char *machine,
const virArch arch)
@ -9930,7 +9932,7 @@ qemuDomainMachineIsARMVirt(const char *machine,
}
bool
static bool
qemuDomainMachineIsRISCVVirt(const char *machine,
const virArch arch)
{
@ -9945,6 +9947,8 @@ qemuDomainMachineIsRISCVVirt(const char *machine,
}
/* You should normally avoid this function and use
* qemuDomainIsPSeries() instead. */
bool
qemuDomainMachineIsPSeries(const char *machine,
const virArch arch)
@ -9960,6 +9964,8 @@ qemuDomainMachineIsPSeries(const char *machine,
}
/* You should normally avoid this function and use
* qemuDomainHasBuiltinIDE() instead. */
bool
qemuDomainMachineHasBuiltinIDE(const char *machine,
const virArch arch)
@ -9971,7 +9977,7 @@ qemuDomainMachineHasBuiltinIDE(const char *machine,
}
bool
static bool
qemuDomainMachineNeedsFDC(const char *machine,
const virArch arch)
{

View File

@ -828,22 +828,14 @@ void qemuDomainMemoryDeviceAlignSize(virDomainDefPtr def,
virDomainChrDefPtr qemuFindAgentConfig(virDomainDefPtr def);
bool qemuDomainMachineIsQ35(const char *machine,
const virArch arch);
bool qemuDomainMachineIsI440FX(const char *machine,
const virArch arch);
bool qemuDomainMachineIsS390CCW(const char *machine,
const virArch arch);
/* You should normally avoid these functions and use the variant that
* doesn't have "Machine" in the name instead. */
bool qemuDomainMachineIsARMVirt(const char *machine,
const virArch arch);
bool qemuDomainMachineIsRISCVVirt(const char *machine,
const virArch arch);
bool qemuDomainMachineIsPSeries(const char *machine,
const virArch arch);
bool qemuDomainMachineHasBuiltinIDE(const char *machine,
const virArch arch);
bool qemuDomainMachineNeedsFDC(const char *machine,
const virArch arch);
bool qemuDomainIsQ35(const virDomainDef *def);
bool qemuDomainIsI440FX(const virDomainDef *def);