From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Need help in understanding sysfs
Date: Fri, 12 Aug 2011 14:35:04 -0700 [thread overview]
Message-ID: <20110812213504.GA7730@kroah.com> (raw)
In-Reply-To: <CAKuUYSwo8NBBTwheS6nBok7+g8EyJhiBfKNNOkqcGTqJfmpN=Q@mail.gmail.com>
On Fri, Aug 12, 2011 at 02:25:55PM -0700, Vaibhav Jain wrote:
> Thanks for ther reply!
> But I really need to create an entry in /sys/devices/system.
Why?
> I am working on a project on extending the cpu hotplug
> (/sys/devices/system/cpu) .
What specifically are you doing here? Are you working with the existing
CPU hotplug developers in the kernel? If not, why not?
> I went through the books LDD and LKD and got some understanding of sysfs but
> they are lacking samples. I thought of looking into the code that adds
> the entries inside /sys/devices/system/cpu but I am unable to find
> it.
Where did you look?
> Could you please suggest how should I go about finding the code ?
vim drivers/base/cpu.c
> I searched for it in google but did not hit anything significant.
I suggest you look into using grep or ack or cgvg or ctags or something
more relevant for doing source code searches.
But again, be _VERY_ careful about adding files to that location without
getting buy-in from the developers working in this area, as lots of
people seem to be writing code here and most of it is being rejected by
the maintainers due to it not doing things properly. See the recent
conversations on the linux-kernel mailing list about moving cpus to
"offline" mode for a good example of this.
good luck,
greg k-h
prev parent reply other threads:[~2011-08-12 21:35 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-10 19:09 Need help in understanding sysfs Vaibhav Jain
2011-08-10 19:18 ` Greg KH
2011-08-10 19:31 ` Vaibhav Jain
2011-08-10 19:47 ` Greg KH
2011-08-10 21:14 ` Jeff Haran
2011-08-10 21:43 ` Vaibhav Jain
2011-08-10 22:08 ` Anuz Pratap Singh Tomar
2011-08-10 22:12 ` Greg KH
2011-08-12 21:25 ` Vaibhav Jain
2011-08-12 21:35 ` Greg KH [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=20110812213504.GA7730@kroah.com \
--to=greg@kroah.com \
--cc=kernelnewbies@lists.kernelnewbies.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.