#undef LOCAL_DEBUG
-#include "ucw/lib.h"
-#include "ucw/fastbuf.h"
-#include "ucw/lfs.h"
-#include "ucw/conf.h"
+#include <ucw/lib.h>
+#include <ucw/fastbuf.h>
+#include <ucw/io.h>
+#include <ucw/conf.h>
#include <string.h>
#include <fcntl.h>
uns window_size;
int mode;
};
-#define FB_MMAP(f) ((struct fb_mmap *)(f)->is_fastbuf)
+#define FB_MMAP(f) ((struct fb_mmap *)(f))
static void
bfmm_map_window(struct fastbuf *f)
F->fd = fd;
F->file_extend = F->file_size = ucw_seek(fd, 0, SEEK_END);
if (F->file_size < 0)
- die("seek(%s): %m", name);
+ bthrow(f, "open", "fb-mmap: Cannot detect size of %s -- is it seekable?", name);
if (mode & O_APPEND)
f->pos = F->file_size;
F->mode = mode;