Hi! So, I'm guessing you want me to merge this with the patch I've got right now and post the new version? (Just making sure since I'm a bit new to this :)
On Sat, 2015-10-24 at 15:40 -0700, Dmitry Torokhov wrote: > Hi Stephen, > > On Fri, Oct 23, 2015 at 04:47:46PM -0400, cp...@redhat.com wrote: > > From: Stephen Chandler Paul <cp...@redhat.com> > > > > Debugging input devices, specifically laptop touchpads, can be > > tricky > > without having the physical device handy. Here we try to remedy > > that > > with userio. This module allows an application to connect to a > > character > > device provided by the kernel, and emulate any serio device. In > > combination with userspace programs that can record PS/2 devices > > and > > replay them through the /dev/userio device, this allows developers > > to > > debug driver issues on the PS/2 level with devices simply by > > requesting > > a recording from the user experiencing the issue without having to > > have > > the physical hardware in front of them. > > > > Signed-off-by: Stephen Chandler Paul <cp...@redhat.com> > > Reviewed-by: David Herrmann <dh.herrm...@gmail.com> > > --- > > Changes > > * Remove the if (!userio) { return -1; } check that somehow got > > left in. > > > > Sorry this took so long! I was wondering why you hadn't replied > > yet, only to > > notice I only made this change on my own tree and never sent out a > > response > > patch. Oops. > > Thank you for making all the changes. > > > + > > +static ssize_t userio_char_read(struct file *file, char __user > > *user_buffer, > > + size_t count, loff_t *ppos) > > +{ > > + struct userio_device *userio = file->private_data; > > + int ret; > > + size_t nonwrap_len, copylen; > > + unsigned char buf[USERIO_BUFSIZE]; > > + unsigned long flags; > > + > > + if (!count) > > + return 0; > > This is not quite right: read of size 0 should still check if there > is > data in the buffer and return -EAGAIN for non-blocking descriptors. > > I cooked a patch (below) that should adjust the read behavior (_+ a > coupe of formatting changes), please take a look. > > Thanks! > -- Cheers, Lyude -- To unsubscribe from this list: send the line "unsubscribe linux-api" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html