ref: 520b707736ae08a65e38e004fe4e7747a779d124
parent: 3cd8e28b095d8b8f01a8d4526c7482ac784905b3
parent: e056624897daf8446708a73bf7eecb136fb441eb
author: cinap_lenrek <cinap_lenrek@cirno>
date: Sun Jun 5 00:00:46 EDT 2011
merge
--- a/sys/src/cmd/cwfs/cw.c
+++ b/sys/src/cmd/cwfs/cw.c
@@ -1448,19 +1448,21 @@
cw->depth--;
- if(na){- if(b){- p = getbuf(cw->dev, na, Brd);
- if(!p || checktag(p, tag, qp)){- fprint(2, "cwrecur: b/p null %s\n", cw->name);
- na = 0;
- } else {- memmove(p->iobuf, b->iobuf, RBUFSIZE);
- p->flags |= Bmod|Bimm;
- }
- if(p)
- putbuf(p);
+ if(b){+ p = getbuf(cw->dev, na ? na : addr, Brd);
+ if(!p || checktag(p, tag, qp)){+ fprint(2, "cwrecur: b/p null\n");
+ na = 0;
+ } else {+ memmove(p->iobuf, b->iobuf, RBUFSIZE);
+ p->flags |= Bmod|Bimm;
}
+ if(p)
+ putbuf(p);
+ putbuf(b);
+ }
+
+ if(na){ if(shouldstop){if(cw->falsehits < 10)
fprint(2, "shouldstop %lld %lld t=%s %s\n",
@@ -1469,8 +1471,6 @@
cw->falsehits++;
}
}
- if(b)
- putbuf(b);
return na;
}
--
⑨