K 10 svn:author V 6 eadler K 8 svn:date V 27 2013-03-17T02:06:36.972915Z K 7 svn:log V 932 Some additional changes from jhb: - It now initializes the buffer to a known-good state (length of 0) so that you can't do a buffer overrun by reading it without writing to it. - It doesn't include the trailing null character in 'len' and always leaves room for it during writes by restricting writes to writing only 255 chars, but letting reads read 256 chars. This means after init you can do a read of one byte to get an empty string, and if you write "foo" (3 bytes) you can read back "foo\0" (I think this is the original intent). Letting 'len' not hold the null simplifies a fair bit of logic in write. - Use 'td' for thread pointers, not 'p' (which is from when this was a 'struct proc *'). - Some style fixes. - Don't ever set uio_offset directly, uiomove() already changes it, and in fact we should read it after the write to handle partial writes. Submitted by: jhb Approved by: bcr (mentor, implicit) END