]> mj.ucw.cz Git - libucw.git/blobdiff - lib/fb-mmap.c
- buck2obj_alloc() initially allocates no buffers
[libucw.git] / lib / fb-mmap.c
index 462fdaea80bcbdfee254c516fd9d39782447ba1d..bbd3a11eacc6e1017bed271b867f933160feefa9 100644 (file)
 static uns mmap_window_size = 16*PAGE_SIZE;
 static uns mmap_extend_size = 4*PAGE_SIZE;
 
-static struct cfitem obuck_config[] = {
+static struct cfitem fbmm_config[] = {
   { "FBMMap",          CT_SECTION,     NULL },
   { "WindowSize",      CT_INT,         &mmap_window_size },
   { "ExtendSize",      CT_INT,         &mmap_extend_size },
   { NULL,              CT_STOP,        NULL }
 };
 
-static void CONSTRUCTOR obuck_init_config(void)
+static void CONSTRUCTOR fbmm_init_config(void)
 {
-  cf_register(obuck_config);
+  cf_register(fbmm_config);
 }
 
 struct fb_mmap {
@@ -160,6 +160,8 @@ bfmm_config(struct fastbuf *f, uns item, int value)
     case BCONFIG_IS_TEMP_FILE:
       FB_MMAP(f)->is_temp_file = value;
       return 0;
+    case BCONFIG_CAN_OVERWRITE:
+      return 0;                                /* cannot use 1, because the pages would become dirty */
     default:
       return -1;
     }