From: greg@kroah.com (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: udev & modalias files
Date: Fri, 3 Jun 2016 11:48:51 -0700 [thread overview]
Message-ID: <20160603184851.GA17076@kroah.com> (raw)
In-Reply-To: <CAHhAz+hdJ54nN4_T_=aMOnspyJoVub8+Qptp7S6ywqei=FJpqw@mail.gmail.com>
On Fri, Jun 03, 2016 at 10:02:02PM +0530, Muni Sekhar wrote:
> Hi,
>
> I see lot of modalias files under /sys directory.
>
> For e.g:
>
> # cat /sys/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/modalias
>
> pci:v00001556d00005555sv00004000sd00000000bc08sc05i01
>
>
>
> I would like to know which part of the kernel module creates sysfs
> modalias file?
The kernel bus code for the device that the bus is on creates this. For
this example, the PCI bus code does this work.
> How does udev load modules dynamically when a new device is added?
The book, "Linux Device Drivers, version 3", free online, has a whole
section on this, I suggest reading it.
> Where should I look for default udev rules?
In the udev or systemd package on your machine. Specific ways to do
this depends on your distro.
greg k-h
next prev parent reply other threads:[~2016-06-03 18:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-03 16:32 udev & modalias files Muni Sekhar
2016-06-03 18:48 ` Greg KH [this message]
2016-06-03 18:50 ` Bjørn Mork
2016-06-04 13:32 ` Muni Sekhar
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=20160603184851.GA17076@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).