changeset: 2268:664dc4fa751a
tag: tip
user: Kris Maglione <jg_AT_suckless.org>
date: Wed Jan 30 21:23:07 2008 -0500
summary: Hopefully fix 9P proto bug reported by Suraj.
diff -r ba426de587fa -r 664dc4fa751a cmd/wmii/fs.c
--- a/cmd/wmii/fs.c Wed Jan 30 14:41:05 2008 -0500
+++ b/cmd/wmii/fs.c Wed Jan 30 21:23:07 2008 -0500
@@ -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;
}
Received on Thu Jan 31 2008 - 03:27:26 UTC
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:59:13 UTC