lkml.org 
[lkml]   [2008]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] make /dev/kmem a config option
On Mon, 11 Feb 2008 01:13:09 +0100 (CET)
Jan Engelhardt <jengelh@computergmbh.de> wrote:

>
> On Feb 10 2008 15:55, Arjan van de Ven wrote:
> >+#ifdef CONFIG_DEVKMEM
> > /*
> > * This function reads the *virtual* memory as seen by the kernel.
> > */
> >@@ -585,6 +588,11 @@ static ssize_t write_kmem(struct file * file,
> >const char __user * buf,
> > *ppos = p;
> > return virtr + wrote;
> > }
> >+#else
> >+#define read_kmem NULL
> >+#define write_kmem NULL
> >+#define mmap_kmem NULL
> >+#endif
>
> Is the #else case needed? All kmem_fops uses seem #ifdef'ed out
> anyway, except kmem_fops itself. In other words,
>
> +#ifdef CONFIG_DEVKMEM
> static const struct file_operations kmem_fops = {
> ...
> }
> +#endif
>
> and do away with the three defines. No? :)

hmm I tried that first, and didn't work
but that wasn't on the final version of the patch so let me try again..


--
If you want to reach me at my work email, use arjan@linux.intel.com
For development, discussion and tips for power savings,
visit http://www.lesswatts.org


\
 
 \ /
  Last update: 2008-02-11 01:47    [W:0.064 / U:0.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site