From: Alan Cox Date: Tue, 17 Apr 2018 22:17:28 +0000 (+0100) Subject: inode: and a quick fixup for the fixup X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=ce7d747b9a85a7038932400f78b89aa75a7ee4f7;p=FUZIX.git inode: and a quick fixup for the fixup This is too ugly to live long term but will do for the moment while I figure out the proper way to deal with this and avoid things like the double search. Possibly we need a unified 'bread' related operation that gets the contents of a buffer into user space, by any means needed. Something like bp = bfind(...) if (bp || !user) { if (bp == NULL) bread_no_lookup() update fields copy to user unlock return } issue raw copy to user page --- diff --git a/Kernel/inode.c b/Kernel/inode.c index dacfb7c6..d4123439 100644 --- a/Kernel/inode.c +++ b/Kernel/inode.c @@ -123,6 +123,9 @@ void readi(regptr inoptr ino, uint8_t flag) bp = bread(dev, pblk, 0); if (bp == NULL) break; + } else { + /* FIXME: this has to get sorted ASAP */ + bp->bf_time = ++bufclock; } uputblk(bp, uoff(), amount);