mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 03:21:19 +00:00
hyperv: move hypervGetProcSDByVSSDInstanceId to hyperv_wmi.c
This places it next to existing related functions. Signed-off-by: Matt Coleman <matt@datto.com> Reviewed-by: Neal Gompa <ngompa13@gmail.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
add5cd8a3c
commit
87e062415f
@ -182,32 +182,6 @@ hypervGetVirtualSystemByName(hypervPrivate *priv, const char *name,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static int
|
|
||||||
hypervGetProcSDByVSSDInstanceId(hypervPrivate *priv, const char *id,
|
|
||||||
Msvm_ProcessorSettingData **data)
|
|
||||||
{
|
|
||||||
g_auto(virBuffer) query = VIR_BUFFER_INITIALIZER;
|
|
||||||
virBufferEscapeSQL(&query,
|
|
||||||
"ASSOCIATORS OF {Msvm_VirtualSystemSettingData.InstanceID='%s'} "
|
|
||||||
"WHERE AssocClass = Msvm_VirtualSystemSettingDataComponent "
|
|
||||||
"ResultClass = Msvm_ProcessorSettingData",
|
|
||||||
id);
|
|
||||||
|
|
||||||
if (hypervGetWmiClass(Msvm_ProcessorSettingData, data) < 0)
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
if (!*data) {
|
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
|
||||||
_("Could not look up processor setting data with virtual system instance ID '%s'"),
|
|
||||||
id);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
hypervRequestStateChange(virDomainPtr domain, int state)
|
hypervRequestStateChange(virDomainPtr domain, int state)
|
||||||
{
|
{
|
||||||
|
@ -1570,6 +1570,32 @@ hypervGetMsvmVirtualSystemSettingDataFromUUID(hypervPrivate *priv,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
hypervGetProcSDByVSSDInstanceId(hypervPrivate *priv,
|
||||||
|
const char *id,
|
||||||
|
Msvm_ProcessorSettingData **data)
|
||||||
|
{
|
||||||
|
g_auto(virBuffer) query = VIR_BUFFER_INITIALIZER;
|
||||||
|
virBufferEscapeSQL(&query,
|
||||||
|
"ASSOCIATORS OF {Msvm_VirtualSystemSettingData.InstanceID='%s'} "
|
||||||
|
"WHERE AssocClass = Msvm_VirtualSystemSettingDataComponent "
|
||||||
|
"ResultClass = Msvm_ProcessorSettingData",
|
||||||
|
id);
|
||||||
|
|
||||||
|
if (hypervGetWmiClass(Msvm_ProcessorSettingData, data) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
if (!*data) {
|
||||||
|
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||||
|
_("Could not look up processor setting data with virtual system instance ID '%s'"),
|
||||||
|
id);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
hypervGetMsvmMemorySettingDataFromVSSD(hypervPrivate *priv,
|
hypervGetMsvmMemorySettingDataFromVSSD(hypervPrivate *priv,
|
||||||
const char *vssd_instanceid,
|
const char *vssd_instanceid,
|
||||||
|
@ -250,6 +250,10 @@ int hypervGetMsvmVirtualSystemSettingDataFromUUID(hypervPrivate *priv,
|
|||||||
const char *uuid_string,
|
const char *uuid_string,
|
||||||
Msvm_VirtualSystemSettingData **list);
|
Msvm_VirtualSystemSettingData **list);
|
||||||
|
|
||||||
|
int hypervGetProcSDByVSSDInstanceId(hypervPrivate *priv,
|
||||||
|
const char *id,
|
||||||
|
Msvm_ProcessorSettingData **data);
|
||||||
|
|
||||||
int hypervGetMsvmMemorySettingDataFromVSSD(hypervPrivate *priv,
|
int hypervGetMsvmMemorySettingDataFromVSSD(hypervPrivate *priv,
|
||||||
const char *vssd_instanceid,
|
const char *vssd_instanceid,
|
||||||
Msvm_MemorySettingData **list);
|
Msvm_MemorySettingData **list);
|
||||||
|
Loading…
Reference in New Issue
Block a user