DBG(" -> %p %p %p(%x) %p", f->buffer, f->bptr, f->bstop, (int)f->pos, f->bufend);
}
-static void
+static int
bfmm_seek(struct fastbuf *f, sh_off_t pos, int whence)
{
if (whence == SEEK_END)
f->pos = pos;
f->bptr = f->bstop = f->bufend; /* force refill/spout call */
DBG("Seek -> %p %p %p(%x) %p", f->buffer, f->bptr, f->bstop, (int)f->pos, f->bufend);
+ return 1;
}
static void
{
case 1:
if (unlink(f->name) < 0)
- log(L_ERROR, "unlink(%s): %m", f->name);
+ msg(L_ERROR, "unlink(%s): %m", f->name);
case 0:
close(F->fd);
}
}
static struct fastbuf *
-bfmmopen_internal(int fd, byte *name, uns mode)
+bfmmopen_internal(int fd, const char *name, uns mode)
{
int namelen = strlen(name) + 1;
struct fb_mmap *F = xmalloc(sizeof(struct fb_mmap) + namelen);
}
struct fastbuf *
-bopen_mm(byte *name, uns mode)
+bopen_mm(const char *name, uns mode)
{
int fd;