[lkml]   [2012]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch 3/8] procfs: Add ability to plug in auxiliary fdinfo providers
On Wed, Aug 15, 2012 at 10:29:27PM +0100, Al Viro wrote:
> This, BTW, is too convoluted for its own good. What you need is
> something like
> struct whatever {
> struct seq_file *m;
> struct file *f;
> int flags;
> };
> with single allocation of that sucker in your ->open(). Set
> file->private_data to address of seq_file field in your object *before*
> calling seq_open() and don't bother with m->private at all - just use
> container_of(m, struct whatever, m) in your ->show() to get to that
> structure...

I will try and post results, thanks!


 \ /
  Last update: 2012-08-16 00:42    [W:0.106 / U:1.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site