[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] virtio-input: implement pass-through evdev writ

From: Ladi Prosek
Subject: Re: [Qemu-devel] [PATCH] virtio-input: implement pass-through evdev writes
Date: Fri, 1 Apr 2016 12:24:25 +0200

On Fri, Apr 1, 2016 at 12:20 PM, Gerd Hoffmann <address@hidden> wrote:
> On Fr, 2016-04-01 at 11:31 +0200, Ladi Prosek wrote:
>> The write path for pass-through devices, commonly used for controlling
>> keyboard LEDs via EV_LED, was not implemented. This commit adds the
>> necessary plumbing to connect the status virtio queue to the host evdev
>> file descriptor.
>> Signed-off-by: Ladi Prosek <address@hidden>
>> ---
>> Most of the new code has to do with handling EAGAIN/EWOULDBLOCK. I don't
>> believe that this will be happening in practise for local evdev devices.
> Agree.
>> Of course, all bets are off if fd is an arbitrary file,
> It can't be, it would fail the evdev ioctls.


>> with the event stream). So part of me would just do one best-effort
>> write and ignore all errors. I'm curious what you think.
> Just do best-effort sounds reasonable to me.

Will do, thanks.

> The code to handle EGAIN will just bitrot b/c it will never be used (and
> I guess it is untested too, or did you manage to provoke EGAIN somehow?)

if (rand() & 1) {
    return EAGAIN;

> cheers,
>   Gerd

reply via email to

[Prev in Thread] Current Thread [Next in Thread]