lkml.org 
[lkml]   [2005]   [Jul]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] add securityfs for all LSMs to use
On Wed, Jul 06, 2005 at 10:12:59PM +0200, Ingo Oeser wrote:
> Hi Greg,
>
> On Wednesday 06 July 2005 10:17, Greg KH wrote:
> > + * TODO:
> > + * I think I can get rid of these default_file_ops, but not quite sure...
> > + */
> > +static ssize_t default_read_file(struct file *file, char __user *buf,
> > + size_t count, loff_t *ppos)
> > +{
> > + return 0;
> > +}
> > +
> > +static ssize_t default_write_file(struct file *file, const char __user *buf,
> > + size_t count, loff_t *ppos)
> > +{
> > + return count;
> > +}
>
> Yes, you can get rid of both, if you move read_null and write_null from
> drivers/char/mem.c to fs/libfs.c and export them.

That's not really necessary.

> But for what do you need a successful dummy read/write?

I don't. I need a file_ops structure to give to my newly created dentry
before I assign the one passed in by the caller to it. That's all. I
could probably just pass it up the function stack to do it properly,
haven't really looked into it...

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-07-06 22:30    [W:0.038 / U:1.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site