All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joel Becker <jlbec@evilplan.org>
To: Constantine Shulyupin <const@makelinux.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: question about configfs_attribute
Date: Fri, 7 Dec 2012 15:30:53 -0800	[thread overview]
Message-ID: <20121207233053.GO22789@localhost> (raw)
In-Reply-To: <CAE7jHC9UuokkM9EqkuO0Z-NZ4MTb49LdinZGpXZ+Vt+5D7fiHg@mail.gmail.com>

On Mon, Oct 15, 2012 at 01:45:56PM +0200, Constantine Shulyupin wrote:
> Hi
> 
> I wonder why show and store methods are not stored inside of
> configfs_attribute but stored in wrapper struct defined with
> CONFIGFS_ATTR_STRUCT ?

	If you created a custom attribute struct and methods for
yourself, you would not have to have the show/store methods on the same
structure.  The structure, and the ##item_show/store macros, are a
convenience way to do it.
	It certainly could be done differently.  I cloned the sysfs
approach at the time.  Note that sysfs has a different methodology for
defining attributes now.

Joel

-- 

Life's Little Instruction Book #252

	"Take good care of those you love."

			http://www.jlbec.org/
			jlbec@evilplan.org

      reply	other threads:[~2012-12-07 23:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-15 11:45 question about configfs_attribute Constantine Shulyupin
2012-12-07 23:30 ` Joel Becker [this message]

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=20121207233053.GO22789@localhost \
    --to=jlbec@evilplan.org \
    --cc=const@makelinux.com \
    --cc=linux-kernel@vger.kernel.org \
    /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.