[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 16/18] ui: Split hmp_mouse_set() and move the HMP part to
From: |
Markus Armbruster |
Subject: |
Re: [PATCH v3 16/18] ui: Split hmp_mouse_set() and move the HMP part to ui/ |
Date: |
Mon, 09 Jan 2023 15:35:35 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Philippe Mathieu-Daudé <philmd@linaro.org> writes:
> On 20/12/22 10:06, Markus Armbruster wrote:
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>> ---
>> include/monitor/hmp.h | 1 +
>> include/ui/console.h | 2 +-
>> monitor/misc.c | 1 -
>> ui/input.c | 5 +----
>> ui/ui-hmp-cmds.c | 8 ++++++++
>> 5 files changed, 11 insertions(+), 6 deletions(-)
>
>
>> diff --git a/include/ui/console.h b/include/ui/console.h
>> index e400ee9fa7..e7f375312c 100644
>> --- a/include/ui/console.h
>> +++ b/include/ui/console.h
>> @@ -65,7 +65,7 @@ void qemu_remove_led_event_handler(QEMUPutLEDEntry *entry);
>>
>> void kbd_put_ledstate(int ledstate);
>>
>> -void hmp_mouse_set(Monitor *mon, const QDict *qdict);
>> +void qemu_mouse_set(int index, Error **err);
>
> Can we return a boolean to indicate eventual failure?
The only caller isn't interested. But we could do it anyway to conform
to the guidance in qapi/error.h.
>> @@ -594,10 +592,9 @@ MouseInfoList *qmp_query_mice(Error **errp)
>> return mice_list;
>> }
>>
>> -void hmp_mouse_set(Monitor *mon, const QDict *qdict)
>> +void qemu_mouse_set(int index, Error **err)
>> {
>> QemuInputHandlerState *s;
>> - int index = qdict_get_int(qdict, "index");
>> int found = 0;
>>
>> QTAILQ_FOREACH(s, &handlers, node) {
>
> However no failure is reported, errp isn't used... Do we really
> want to pass it along?
Daniel spotted this, too. See my reply there.
Thanks!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH v3 16/18] ui: Split hmp_mouse_set() and move the HMP part to ui/,
Markus Armbruster <=