fork of 9front i guess
![]() introducing new ctrunc() function that invalidates any caches for the passed in chan, invoked when handling wstat with a specified file length or on file creation/truncation. test program to reproduce the problem: #include <u.h> #include <libc.h> #include <libsec.h> void main(int argc, char *argv[]) { int fd; Dir *d, nd; fd = create("xxx", ORDWR, 0666); write(fd, "1234", 4); d = dirstat("xxx"); assert(d->length == 4); nulldir(&nd); nd.length = 0; dirwstat("xxx", &nd); d = dirstat("xxx"); assert(d->length == 0); fd = open("xxx", OREAD); assert(read(fd, (void*)&d, 4) == 0); } |
||
---|---|---|
386 | ||
68000 | ||
68020 | ||
acme | ||
adm/timezone | ||
amd64 | ||
arm | ||
lib | ||
mips | ||
power | ||
power64 | ||
rc | ||
sparc | ||
sparc64 | ||
spim | ||
sys | ||
.hgignore |