diff options
author | cinap_lenrek <cinap_lenrek@localhost> | 2011-04-12 15:53:55 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@localhost> | 2011-04-12 15:53:55 +0000 |
commit | 67e93d6a0a4f15192638e131413b9d64c4269c76 (patch) | |
tree | 88fd1d17c4be283683a96ced44159e3ce6b6f2f7 /sys/src/cmd/cwfs/iobuf.c | |
parent | 7208d528bd42f981f2535403f72e4c0d7d8df643 (diff) |
updating cwfs and moving installer in /rc/bin
Diffstat (limited to 'sys/src/cmd/cwfs/iobuf.c')
-rw-r--r-- | sys/src/cmd/cwfs/iobuf.c | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/sys/src/cmd/cwfs/iobuf.c b/sys/src/cmd/cwfs/iobuf.c index 11879f37c..577cc7c38 100644 --- a/sys/src/cmd/cwfs/iobuf.c +++ b/sys/src/cmd/cwfs/iobuf.c @@ -204,21 +204,36 @@ int checktag(Iobuf *p, int tag, Off qpath) { Tag *t; - static Off lastaddr; + ulong pc; + qpath &= ~QPDIR; t = (Tag*)(p->iobuf+BUFSIZE); + if((tag != t->tag) || ((qpath != QPNONE) && (qpath != t->path))){ + pc = getcallerpc(&p); + + if(qpath == QPNONE){ + print("checktag pc=%lux %Z(%llux) tag/path=%G/%llud; expected %G\n", + pc, p->dev, (Wideoff)p->addr, t->tag, (Wideoff)t->path, tag); + } else { + print("checktag pc=%lux %Z(%llux) tag/path=%G/%llud; expected %G/%llud\n", + pc, p->dev, (Wideoff)p->addr, t->tag, (Wideoff)t->path, tag, qpath); + } + return 1; + } + + /* if(t->tag != tag) { if(p->flags & Bmod) { - print("\ttag = %d/%llud; expected %lld/%d -- not flushed\n", + print("\t%llux: tag = %G/%llud; expected %G/%d -- not flushed\n", t->tag, (Wideoff)t->path, (Wideoff)qpath, tag); return 2; } if(p->dev != nil && p->dev->type == Devcw) cwfree(p->dev, p->addr); if(p->addr != lastaddr) - print("\ttag = %G/%llud; expected %G/%lld -- flushed (%lld)\n", - t->tag, (Wideoff)t->path, tag, (Wideoff)qpath, - (Wideoff)p->addr); + print("\t%llux: tag = %G/%llud; expected %G/%lld -- flushed\n", + (Wideoff)p->addr, t->tag, (Wideoff)t->path, tag, (Wideoff)qpath); + lastaddr = p->addr; p->dev = devnone; p->addr = -1; @@ -226,13 +241,14 @@ checktag(Iobuf *p, int tag, Off qpath) return 2; } if(qpath != QPNONE) { - if((qpath ^ t->path) & ~QPDIR) { - if(1 || CHAT(0)) - print("\ttag/path = %llud; expected %d/%llux\n", - (Wideoff)t->path, tag, (Wideoff)qpath); + if(qpath ^ t->path) { + print("\t%llux: tag/path = %G/%llud; expected %G/%llux\n", + (Wideoff)p->addr, t->tag, (Wideoff)t->path, tag, (Wideoff)qpath); return 0; } } + */ + return 0; } |