Re: [Libvir] [PATCH] write(2) may write less than the total requested

2008-02-20 Thread Daniel Veillard
On Wed, Feb 20, 2008 at 02:53:49PM +0100, Jim Meyering wrote: > Use safewrite in place of write, in many cases. > And add "make syntax-check" rules to ensure no new uses sneak in. > > There are many uses of write like this: > > if (write (fd, xml, towrite) != towrite) > return -1; >

[Libvir] [PATCH] write(2) may write less than the total requested

2008-02-20 Thread Jim Meyering
Use safewrite in place of write, in many cases. And add "make syntax-check" rules to ensure no new uses sneak in. There are many uses of write like this: if (write (fd, xml, towrite) != towrite) return -1; The problem is that the syscall can succeed, yet write less than the requested