From: Joel Becker <Joel.Becker@oracle.com>
To: Louis Rilling <Louis.Rilling@kerlabs.com>
Cc: linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com
Subject: [Ocfs2-devel] [RFC][PATCH] configfs: Report errors in config_*_init_type_name()
Date: Thu, 19 Jun 2008 15:08:53 -0700 [thread overview]
Message-ID: <20080619220853.GD10888@mail.oracle.com> (raw)
In-Reply-To: <20080619091003.GJ30804@localhost>
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 at oracle.com
Phone: (650) 506-8127
WARNING: multiple messages have this Message-ID (diff)
From: Joel Becker <Joel.Becker@oracle.com>
To: Louis Rilling <Louis.Rilling@kerlabs.com>
Cc: linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com
Subject: Re: [RFC][PATCH] configfs: Report errors in config_*_init_type_name()
Date: Thu, 19 Jun 2008 15:08:53 -0700 [thread overview]
Message-ID: <20080619220853.GD10888@mail.oracle.com> (raw)
In-Reply-To: <20080619091003.GJ30804@localhost>
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@oracle.com
Phone: (650) 506-8127
next prev parent reply other threads:[~2008-06-19 22:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-18 18:30 [Ocfs2-devel] [RFC][PATCH] configfs: Report errors in config_*_init_type_name() Louis Rilling
2008-06-18 18:30 ` Louis Rilling
2008-06-18 20:22 ` [Ocfs2-devel] " Joel Becker
2008-06-18 20:22 ` Joel Becker
2008-06-19 9:10 ` [Ocfs2-devel] " Louis Rilling
2008-06-19 9:10 ` Louis Rilling
2008-06-19 22:08 ` Joel Becker [this message]
2008-06-19 22:08 ` Joel Becker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080619220853.GD10888@mail.oracle.com \
--to=joel.becker@oracle.com \
--cc=Louis.Rilling@kerlabs.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ocfs2-devel@oss.oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.