From b563aa00a128ab0bc6b38473e62508ca7a7c6989 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Thu, 3 Oct 2002 21:02:58 +0000 Subject: [PATCH] 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 :-) --- lib/fb-file.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 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", -- 2.39.5