lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4FB528B3.8000406@parallels.com>
Date:	Thu, 17 May 2012 20:34:59 +0400
From:	Pavel Emelyanov <xemul@...allels.com>
To:	Cyrill Gorcunov <gorcunov@...nvz.org>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	James Bottomley <jbottomley@...allels.com>,
	"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>
Subject: Re: [rfc 3/4] fs, eventfd: Add procfs fdinfo helper

> +static void *seq_start(struct seq_file *m, loff_t *pos)
> +{
> +	struct proc_fdinfo_extra *extra = m->private;
> +	return *pos == 1 ? extra->fd_file : NULL;
> +}
> +
> +static void seq_stop(struct seq_file *m, void *v)
> +{
> +}
> +
> +static void *seq_next(struct seq_file *m, void *p, loff_t *pos)
> +{
> +	struct proc_fdinfo_extra *extra = m->private;
> +	return ++*pos == 1 ? extra->fd_file : NULL;
> +}
> +

<snip>

> +static const struct seq_operations eventfd_fdinfo_ops = {
> +	.start	= seq_start,
> +	.next	= seq_next,
> +	.stop	= seq_stop,
> +	.show	= seq_show,

I think, you can use the single_ part of the seq files engine.

> +};

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ