X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=ucw%2Ffb-param.c;h=22f988c6d42d3a03effd32c04704893a96d7ba6f;hb=1ddc0f01053b355c5805df3659866e11d50d60d0;hp=514f987bb719729046a5fc16e1f1ba38a228233e;hpb=0e6176bc8246735681e2289b92c15639b9201bc9;p=libucw.git diff --git a/ucw/fb-param.c b/ucw/fb-param.c index 514f987b..22f988c6 100644 --- a/ucw/fb-param.c +++ b/ucw/fb-param.c @@ -25,14 +25,21 @@ struct fb_params fbpar_def = { static char * fbpar_cf_commit(struct fb_params *p UNUSED) { -#ifndef CONFIG_UCW_THREADS if (p->type == FB_DIRECT) - return "Direct I/O is supported only with CONFIG_UCW_THREADS"; + { +#ifndef CONFIG_UCW_THREADS + return "Direct I/O is supported only with CONFIG_UCW_THREADS"; #endif -#ifndef CONFIG_DIRECT - if (p->type == FB_DIRECT) - return "Direct I/O is disabled"; +#ifdef CONFIG_DARWIN + return "Direct I/O is not supported on darwin"; #endif +#ifndef CONFIG_DIRECT_IO + return "Direct I/O disabled by configure switch -CONFIG_DIRECT_IO"; +#endif +#ifndef CONFIG_UCW_FB_DIRECT + return "Direct I/O disabled by configure switch -CONFIG_UCW_FB_DIRECT"; +#endif + } return NULL; } @@ -76,7 +83,7 @@ bopen_fd_internal(int fd, struct fb_params *params, uns mode, const char *name) struct fastbuf *fb; switch (params->type) { -#ifdef CONFIG_DIRECT +#ifdef CONFIG_UCW_FB_DIRECT case FB_DIRECT: fb = fbdir_open_fd_internal(fd, name, params->asio, params->buffer_size ? : fbpar_def.buffer_size, @@ -106,7 +113,7 @@ bopen_file_internal(const char *name, int mode, struct fb_params *params, int tr { if (!params) params = &fbpar_def; -#ifdef CONFIG_DIRECT +#ifdef CONFIG_UCW_FB_DIRECT if (params->type == FB_DIRECT && !fbdir_cheat) mode |= O_DIRECT; #endif