X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Ffb-mmap.c;h=3a82a92accec38459d934f85538d227daf98b691;hb=580fd9c443c2a4faba5a703d49f366de5d3968c9;hp=85dc27ee2c10566e4d77d222acad39e87d495a4c;hpb=3355e84f7cd4485564b92145efff82ac73c61873;p=libucw.git diff --git a/lib/fb-mmap.c b/lib/fb-mmap.c index 85dc27ee..3a82a92a 100644 --- a/lib/fb-mmap.c +++ b/lib/fb-mmap.c @@ -117,7 +117,7 @@ bfmm_spout(struct fastbuf *f) 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) @@ -128,6 +128,7 @@ bfmm_seek(struct fastbuf *f, sh_off_t pos, int whence) 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 @@ -144,7 +145,7 @@ bfmm_close(struct fastbuf *f) { 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); } @@ -165,7 +166,7 @@ bfmm_config(struct fastbuf *f, uns item, int value) } 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); @@ -189,7 +190,7 @@ bfmmopen_internal(int fd, byte *name, uns mode) } struct fastbuf * -bopen_mm(byte *name, uns mode) +bopen_mm(const char *name, uns mode) { int fd;