From: Anthony Liguori <anthony@codemonkey.ws>
To: Juan Quintela <quintela@redhat.com>
Cc: Shahar Havivi <shaharh@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [PATCH 2/2] Added monitor commands: 'keyboard_set' and 'info keybaord'
Date: Wed, 31 Mar 2010 12:04:59 -0500 [thread overview]
Message-ID: <4BB380BB.8000600@codemonkey.ws> (raw)
In-Reply-To: <m3634cbxn7.fsf@trasno.mitica>
On 03/31/2010 05:20 AM, Juan Quintela wrote:
> Shahar Havivi<shaharh@redhat.com> wrote:
>
>> Two new monitor commands: adding ability to handle which keyboard qemu will
>> use and to see which keyboard are currently available.
>>
>
>> +int do_keyboard_set(Monitor *mon, const QDict *qdict, QObject **ret_data)
>> +{
>> + QEMUPutKbdEntry *cursor;
>> + int index = qdict_get_int(qdict, "index");
>> + int found = 0;
>>
> found variable is not used.
>
>
>> +
>> + if (QTAILQ_EMPTY(&kbd_handlers)) {
>> + qerror_report(QERR_DEVICE_NOT_FOUND, "keyboard");
>> + return -1;
>> + }
>> +
>> + QTAILQ_FOREACH(cursor,&kbd_handlers, node) {
>> + if (cursor->index == index) {
>> + QTAILQ_REMOVE(&kbd_handlers, cursor, node);
>> + QTAILQ_INSERT_HEAD(&kbd_handlers, cursor, node);
>> + found = 1;
>>
> well it is set :)
>
Please split out this bit into a qemu_activate_keyboard_handler() and
plumb it with the usb device such that it's only used when a guest loads
a driver for it.
It should be very symmetric to how the mouse driver works.
Regards,
Anthony Liguori
>> + break;
>> + }
>> + }
>> +
>> + return 0;
>>
> I guess you want to return one error if the index don't exist.
>
>
>> +}
>>
> I still think that adding an "id" property as in markus proposal would
> be neat. Otherwise I don't know how you are going to distinguish
> between two keyboards with the same name.
>
> Later, Juan.
>
>
>
next prev parent reply other threads:[~2010-03-31 17:13 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-31 8:15 [Qemu-devel] [PATCH 0/2 v3] Qemu support for multiple keyboard devices Shahar Havivi
2010-03-31 8:16 ` [Qemu-devel] [PATCH 1/2] Support " Shahar Havivi
2010-03-31 10:12 ` [Qemu-devel] " Juan Quintela
2010-03-31 15:11 ` Shahar Havivi
2010-03-31 15:23 ` [Qemu-devel] " Markus Armbruster
2010-03-31 15:36 ` Shahar Havivi
2010-03-31 8:16 ` [Qemu-devel] [PATCH 2/2] Added monitor commands: 'keyboard_set' and 'info keybaord' Shahar Havivi
2010-03-31 10:20 ` [Qemu-devel] " Juan Quintela
2010-03-31 15:31 ` Markus Armbruster
2010-03-31 15:42 ` Shahar Havivi
2010-03-31 16:58 ` Juan Quintela
2010-03-31 19:37 ` Shahar Havivi
2010-03-31 19:52 ` Anthony Liguori
2010-03-31 20:16 ` Juan Quintela
2010-03-31 17:04 ` Anthony Liguori [this message]
2010-03-31 20:55 ` Shahar Havivi
-- strict thread matches above, loose matches on Subject: below --
2010-03-23 19:57 [Qemu-devel] [PATCH 0/2] Qemu support for multiple keyboard devices - v2 Shahar Havivi
2010-03-23 19:58 ` [Qemu-devel] [PATCH 2/2] Added monitor commands: 'keyboard_set' and 'info keybaord' Shahar Havivi
2010-03-26 9:57 ` Markus Armbruster
2010-03-26 18:40 ` Shahar Havivi
2010-03-31 15:10 ` Markus Armbruster
2010-03-31 15:19 ` [Qemu-devel] " Juan Quintela
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4BB380BB.8000600@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=shaharh@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).