mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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);
|
xml = virCapabilitiesFormatXML(privconn->driver->caps);
|
||||||
return xml;
|
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
|
static int
|
||||||
vzDomainDefPostParse(virDomainDefPtr def ATTRIBUTE_UNUSED,
|
vzDomainDefPostParse(virDomainDefPtr def,
|
||||||
virCapsPtr caps ATTRIBUTE_UNUSED,
|
virCapsPtr caps ATTRIBUTE_UNUSED,
|
||||||
unsigned int parseFlags ATTRIBUTE_UNUSED,
|
unsigned int parseFlags ATTRIBUTE_UNUSED,
|
||||||
void *opaque)
|
void *opaque)
|
||||||
{
|
{
|
||||||
|
if (vzDomainDefAddDefaultInputDevices(def) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
if (vzCheckUnsupportedDisks(def, opaque) < 0)
|
if (vzCheckUnsupportedDisks(def, opaque) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user