net/9p: set correct stat size when sending Twstat messages
authorLatchesar Ionkov <lucho@ionkov.net>
Sun, 5 Apr 2009 21:22:16 +0000 (16:22 -0500)
committerEric Van Hensbergen <ericvh@vTrogdor.(none)>
Sun, 5 Apr 2009 21:54:52 +0000 (16:54 -0500)
commit453ed90d1395a5281a8f1a0de5d8aabc66202e34
treedca5c43212ec89988a9367dec12f4d43bc45c5c9
parentb4348f32dae3cb6eb4bc21c7ed8f76c0b11e9d6a
net/9p: set correct stat size when sending Twstat messages

The 9P2000 Twstat message requires the size of the stat structure to be
specified. Currently the 9p code writes zero instead of the actual size.
This behavior confuses some of the file servers that check if the size is
correct.

This patch adds a new function that calculcates the stat size and puts the
value in the appropriate place in the 9P message.

Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>
Reviewed-by: Eric Van Hensbergen <ericvh@gmail.com>
net/9p/client.c