Thread (1 message) 1 message, 1 author, 2011-01-27

Re: [PATCH] evdev: fix evdev_write return value on partial writes

From: Peter Korsgaard <jacmet@sunsite.dk>
Date: 2011-01-27 10:05:36

quoted
quoted
quoted
quoted
"Baruch" == Baruch Siach [off-list ref] writes:
 >> Fix it by only handling each full input_event structure, similar to
 >> how it is done in evdev_read.

 Baruch> A Reporte-by here would be nice.

Sorry, forgot. Dmitry, could you add it when you commit the patch.

 >> Signed-off-by: Peter Korsgaard [off-list ref]

 Baruch> As I said on the Busybox list, applying this results in an endless

 Baruch> write(1, "test\n", 5)                   = 0
 Baruch> write(1, "test\n", 5)                   = 0
 Baruch> write(1, "test\n", 5)                   = 0
 Baruch> write(1, "test\n", 5)                   = 0
 Baruch> write(1, "test\n", 5)                   = 0
 Baruch> write(1, "test\n", 5)                   = 0
 Baruch> write(1, "test\n", 5)                   = 0

 Baruch> from the command

 Baruch> echo test > /dev/input/event0

 Baruch> write() should probably return -EINVAL here.

Indeed, like we do in evdev_read. Updated patch sent.

-- 
Bye, Peter Korsgaard
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help