Re: [RFC][PATCH] configfs: Report errors inconfig_*_init_type_name()
From: Joel Becker
Date: Thu Jun 19 2008 - 18:16:00 EST
On Thu, Jun 19, 2008 at 11:10:03AM +0200, Louis Rilling wrote:
> On Wed, Jun 18, 2008 at 01:22:26PM -0700, Joel Becker wrote:
> > 1) Make your changes to return errors from config_*_init_type_name(),
> > but don't check the errors on known-safe usage (small static
> > strings).
>
> I don't like it very much, since users should check for the value of
> CONFIGFS_ITEM_NAME_LEN to ensure that this is a safe usage.
Yeah, I don't much like it either. I just threw it out there as
a possibility.
> > 2) Provide two API, one that is void and one that is not, so that
> > known-safe usage can use the void call (and BUG_ON() if the strlen()
> > is off), while other usage checks the errors.
>
> Ok. What about config_*_init_type_long_name()?
Well, that's better than any names I could come up with. Let's
run with it.
Joel
--
"Every day I get up and look through the Forbes list of the richest
people in America. If I'm not there, I go to work."
- Robert Orben
Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker@xxxxxxxxxx
Phone: (650) 506-8127
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/