On 12/19/2013 08:50 AM, Li Zhang wrote: > From: Li Zhang <zhlcindy@xxxxxxxxxxxxxxxxxx> > > There is no keyboard for non-x86 platforms when graphics are enabled. > It's preferred to add one USB keyboard. > > This patch is to add keyboard input device type. > > Signed-off-by: Li Zhang <zhlcindy@xxxxxxxxxxxxxxxxxx> > --- > docs/schemas/domaincommon.rng | 1 + > src/conf/domain_conf.c | 18 ++++++++++++------ > src/conf/domain_conf.h | 1 + > 3 files changed, 14 insertions(+), 6 deletions(-) > > diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng > index be32c6b..df6253c 100644 > --- a/docs/schemas/domaincommon.rng > +++ b/docs/schemas/domaincommon.rng > @@ -3167,6 +3167,7 @@ > <choice> > <value>tablet</value> > <value>mouse</value> > + <value>kbd</value> > </choice> > </attribute> > <optional> > diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c > index 0079234..9c30a78 100644 > --- a/src/conf/domain_conf.c > +++ b/src/conf/domain_conf.c > @@ -505,7 +505,8 @@ VIR_ENUM_IMPL(virDomainVideo, VIR_DOMAIN_VIDEO_TYPE_LAST, > > VIR_ENUM_IMPL(virDomainInput, VIR_DOMAIN_INPUT_TYPE_LAST, > "mouse", > - "tablet") > + "tablet", > + "kbd") Maybe "keyboard" would sound nicer? > > VIR_ENUM_IMPL(virDomainInputBus, VIR_DOMAIN_INPUT_BUS_LAST, > "ps2", > @@ -7659,7 +7660,8 @@ virDomainInputDefParseXML(const char *ostype, > > if (STREQ(ostype, "hvm")) { > if (def->bus == VIR_DOMAIN_INPUT_BUS_PS2 && /* Only allow mouse for ps2 */ The comment is no longer true. > - def->type != VIR_DOMAIN_INPUT_TYPE_MOUSE) { > + !(def->type == VIR_DOMAIN_INPUT_TYPE_MOUSE || > + def->type == VIR_DOMAIN_INPUT_TYPE_KBD)) { > virReportError(VIR_ERR_INTERNAL_ERROR, > _("ps2 bus does not support %s input device"), > type); Jan
Attachment:
signature.asc
Description: OpenPGP digital signature
-- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list