mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
vz: add default input devices on post parse
It is on par with prlsdkLoadDomain actions. Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
This commit is contained in:
parent
ab9569e546
commit
77dfa91192
@ -227,13 +227,37 @@ vzConnectGetCapabilities(virConnectPtr conn)
|
||||
xml = virCapabilitiesFormatXML(privconn->driver->caps);
|
||||
return xml;
|
||||
}
|
||||
static int
|
||||
vzDomainDefAddDefaultInputDevices(virDomainDefPtr def)
|
||||
{
|
||||
if (def->ngraphics == 0)
|
||||
return 0;
|
||||
|
||||
int bus = IS_CT(def) ? VIR_DOMAIN_INPUT_BUS_PARALLELS :
|
||||
VIR_DOMAIN_INPUT_BUS_PS2;
|
||||
|
||||
if (virDomainDefMaybeAddInput(def,
|
||||
VIR_DOMAIN_INPUT_TYPE_MOUSE,
|
||||
bus) < 0)
|
||||
return -1;
|
||||
|
||||
if (virDomainDefMaybeAddInput(def,
|
||||
VIR_DOMAIN_INPUT_TYPE_KBD,
|
||||
bus) < 0)
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
vzDomainDefPostParse(virDomainDefPtr def ATTRIBUTE_UNUSED,
|
||||
vzDomainDefPostParse(virDomainDefPtr def,
|
||||
virCapsPtr caps ATTRIBUTE_UNUSED,
|
||||
unsigned int parseFlags ATTRIBUTE_UNUSED,
|
||||
void *opaque)
|
||||
{
|
||||
if (vzDomainDefAddDefaultInputDevices(def) < 0)
|
||||
return -1;
|
||||
|
||||
if (vzCheckUnsupportedDisks(def, opaque) < 0)
|
||||
return -1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user