X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Ffb-mmap.c;h=d7eaa3d0f6b3e33d1470efed659926281484fe2e;hb=62eda8640605c19ecd817e274e75717022349732;hp=f4f901840ced7a5cf205518149c4c10797215eef;hpb=6a8ae5549f28ef50110e23ffd418105ef8f38d79;p=libucw.git diff --git a/lib/fb-mmap.c b/lib/fb-mmap.c index f4f90184..d7eaa3d0 100644 --- a/lib/fb-mmap.c +++ b/lib/fb-mmap.c @@ -1,5 +1,5 @@ /* - * Sherlock Library -- Fast Buffered I/O on Memory-Mapped Files + * UCW Library -- Fast Buffered I/O on Memory-Mapped Files * * (c) 2002 Martin Mares * @@ -12,7 +12,6 @@ #include "lib/lfs.h" #include "lib/conf.h" -#include #include #include #include @@ -22,16 +21,17 @@ static uns mmap_window_size = 16*PAGE_SIZE; static uns mmap_extend_size = 4*PAGE_SIZE; -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 struct cf_section fbmm_config = { + CF_ITEMS { + CF_UNS("WindowSize", &mmap_window_size), + CF_UNS("ExtendSize", &mmap_extend_size), + CF_END + } }; static void CONSTRUCTOR fbmm_init_config(void) { - cf_register(fbmm_config); + cf_declare_section("FBMMap", &fbmm_config, 0); } struct fb_mmap { @@ -160,8 +160,6 @@ 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; default: return -1; }