mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
sysinfo: implement qemu support
* src/qemu/qemu_driver.c (qemuGetSysinfo): New function. (qemuDriver): Install it.
This commit is contained in:
parent
cb5b5380c2
commit
5ec8fb5662
@ -3275,6 +3275,22 @@ static int kvmGetMaxVCPUs(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static char *
|
||||||
|
qemuGetSysinfo(virConnectPtr conn, unsigned int flags)
|
||||||
|
{
|
||||||
|
struct qemud_driver *driver = conn->privateData;
|
||||||
|
|
||||||
|
virCheckFlags(0, NULL);
|
||||||
|
|
||||||
|
if (!driver->hostsysinfo) {
|
||||||
|
qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
|
||||||
|
_("Host SMBIOS information is not available"));
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return virSysinfoFormat(driver->hostsysinfo, "");
|
||||||
|
}
|
||||||
|
|
||||||
static int qemudGetMaxVCPUs(virConnectPtr conn ATTRIBUTE_UNUSED, const char *type) {
|
static int qemudGetMaxVCPUs(virConnectPtr conn ATTRIBUTE_UNUSED, const char *type) {
|
||||||
if (!type)
|
if (!type)
|
||||||
return 16;
|
return 16;
|
||||||
@ -10375,7 +10391,7 @@ static virDriver qemuDriver = {
|
|||||||
qemudGetVersion, /* version */
|
qemudGetVersion, /* version */
|
||||||
NULL, /* libvirtVersion (impl. in libvirt.c) */
|
NULL, /* libvirtVersion (impl. in libvirt.c) */
|
||||||
virGetHostname, /* getHostname */
|
virGetHostname, /* getHostname */
|
||||||
NULL, /* getSysinfo */
|
qemuGetSysinfo, /* getSysinfo */
|
||||||
qemudGetMaxVCPUs, /* getMaxVcpus */
|
qemudGetMaxVCPUs, /* getMaxVcpus */
|
||||||
nodeGetInfo, /* nodeGetInfo */
|
nodeGetInfo, /* nodeGetInfo */
|
||||||
qemudGetCapabilities, /* getCapabilities */
|
qemudGetCapabilities, /* getCapabilities */
|
||||||
|
Loading…
Reference in New Issue
Block a user