Harvey-OS / ninep

Package for implementing clients and servers of the 9P and 9P2000 distributed resource protocols in Go.
Other
39 stars 19 forks source link

Rread: handle the case where the count is too small for the entry #42

Closed rminnich closed 5 years ago

rminnich commented 5 years ago

We are seeing cases where a readdir, for the last element, is called with a count too small for the element.

There's not much to do when this happens, save print a log message that the element is being skipped.

Sadly, this means a directory listing will not be complete.

Directory reading in this server sucks anyway, see the comment, I hope someone will fix.

We need a test to cause this case, but I could not quite figure out how to do it.

Signed-off-by: Ronald G. Minnich rminnich@google.com