commit 0aa7f3b4fe19afbf612e76c5eeb10c88051d0eb2
parent adb3d044d40d716ce983b77a5001141d292851d0
Author: Kris Maglione <jg@suckless.org>
Date: Wed, 30 Jan 2008 21:23:07 -0500
Hopefully fix 9P proto bug reported by Suraj.
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/cmd/wmii/fs.c b/cmd/wmii/fs.c
@@ -776,7 +776,6 @@ fs_read(Ixp9Req *r) {
Stat s;
IxpMsg m;
- offset = 0;
size = r->ifcall.count;
if(size > r->fid->iounit)
size = r->fid->iounit;
@@ -785,6 +784,7 @@ fs_read(Ixp9Req *r) {
tf = f = lookup_file(f, nil);
/* Note: f->tab.name == "." so we skip it */
+ offset = 0;
for(f=f->next; f; f=f->next) {
dostat(&s, fs_size(f), f);
n = ixp_sizeof_stat(&s);
@@ -800,8 +800,8 @@ fs_read(Ixp9Req *r) {
tf=tf->next;
free_file(f);
}
- r->ofcall.count = r->ifcall.count - size;
- r->ofcall.data = (char*)m.data;
+ r->ofcall.count = m.pos - m.data;
+ r->ofcall.data = m.data;
respond(r, nil);
return;
}