]> mj.ucw.cz Git - libucw.git/blobdiff - lib/fb-mmap.c
Implemented bfix_tmp_file(), which turns a temporary file fastbuf
[libucw.git] / lib / fb-mmap.c
index d16458ef83b8e52de73a5afaab6b474d2cca9699..56c2ef666504d2abfac52832e62d16d697885dd8 100644 (file)
@@ -157,18 +157,21 @@ bfmm_close(struct fastbuf *f)
 static int
 bfmm_config(struct fastbuf *f, uns item, int value)
 {
+  int orig;
+
   switch (item)
     {
     case BCONFIG_IS_TEMP_FILE:
+      orig = FB_MMAP(f)->is_temp_file;
       FB_MMAP(f)->is_temp_file = value;
-      return 0;
+      return orig;
     default:
       return -1;
     }
 }
 
 struct fastbuf *
-bfmmopen_internal(int fd, const 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);