From: Martin Mares Date: Thu, 3 Oct 2002 21:02:58 +0000 (+0000) Subject: Added a temporary hack for testing of fb-mmap. Please don't turn it on X-Git-Tag: holmes-import~1332 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=b563aa00a128ab0bc6b38473e62508ca7a7c6989;p=libucw.git Added a temporary hack for testing of fb-mmap. Please don't turn it on unless you're willing to help me with debugging fb-mmap :-) --- diff --git a/lib/fb-file.c b/lib/fb-file.c index 7d9de003..5e1a6981 100644 --- a/lib/fb-file.c +++ b/lib/fb-file.c @@ -120,6 +120,17 @@ struct fastbuf * bopen(byte *name, uns mode, uns buffer) { struct fastbuf *b; + +#if 0 /* FIXME: Dirty hack for testing fb-mmap */ + if (buffer >= 65536 && (mode == O_RDONLY)) + { + log(L_DEBUG, "bopen_mm hack: %s", name); + if (mode & O_WRONLY) + mode = (mode & ~O_WRONLY) | O_RDWR; + return bopen_mm(name, mode); + } +#endif + int fd = sh_open(name, mode, 0666); if (fd < 0) die("Unable to %s file %s: %m",