[Qemu-devel] Re: [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes

2010-04-06 Thread Amit Shah
On (Tue) Apr 06 2010 [09:40:55], Gerd Hoffmann wrote: > Hi, > >> Make 'len' a pointer instead, and indicate how much of the string was >> written. The return value will either be the same as 'len' or a negative >> number indicating an error condition. > > I would follow the unix write syscall sem

[Qemu-devel] Re: [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes

2010-04-06 Thread Gerd Hoffmann
Hi, Make 'len' a pointer instead, and indicate how much of the string was written. The return value will either be the same as 'len' or a negative number indicating an error condition. I would follow the unix write syscall semantic here and report the number of written bytes using the retur