Re: [PATCH 14/39] proc: introduce proc_create_net_single

Alexey Dobriyan <[email protected]> Thu, 19 Apr 2018 21:44:04 +0300
Newsgroups gmane.comp.file-systems.jfs.general
Message-ID <20180419184404.GB2066__33415.2055708275$1524234910$gmane$org@avx2>
On Thu, Apr 19, 2018 at 02:41:15PM +0200, Christoph Hellwig wrote:
> Variant of proc_create_data that directly take a seq_file show

> +struct proc_dir_entry *proc_create_net_single(const char *name, umode_t mode,
> +		struct proc_dir_entry *parent,
> +		int (*show)(struct seq_file *, void *), void *data)
> +{
> +	struct proc_dir_entry *p;
> +
> +	p = proc_create_data(name, mode, parent, &proc_net_single_fops, data);
> +	if (p)
> +		p->single_show = show;
> +	return p;
> +}

Ditto, should be oopsable.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot