Re: [PATCH] proper replacements for ->proc_info

Christoph Hellwig
2003-04-23T19:27:31Z

On Wed, Apr 23, 2003 at 03:29:01PM -0400, James Bottomley wrote:
> On Wed, 2003-04-23 at 15:21, Christoph Hellwig wrote:
> > Two new host template methods:
> >
> > int (* show_info)(struct Scsi_Host *, struct seq_file *);
> > int (* store_info)(struct Scsi_Host *, const char *, size_t);
>
>
> Well, this does look good, but by extension we could use something like
> this as a generic way to ship information to and from sysfs as well.
>
> How about adding a "char *property" qualifier? If it's null you just
> dump the whole lot (for /proc) but if it has a value, it's that specific
> property from sysfs.

For store_info? I don't think that's a good idea - most users of
store_info should really be converted to sysfs insead, but this
would break all kinds of existing apps. So we should add it but not
rip out the procfs support. Mixing up procfs and sysfs code isn't
a good idea anyway - this will lead to overloaded APIs again.