From: Peter Samuelson <peter@cadcamlab.org>
To: William Knop <w_knop@hotmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Modules and DevFS
Date: Thu, 1 Feb 2001 04:23:20 -0600 [thread overview]
Message-ID: <20010201042320.B27725@cadcamlab.org> (raw)
In-Reply-To: <F204tAEHLB8TrBHxvZ900001de6@hotmail.com>
In-Reply-To: <F204tAEHLB8TrBHxvZ900001de6@hotmail.com>; from w_knop@hotmail.com on Thu, Feb 01, 2001 at 03:44:38AM -0500
[William Knop]
> How can DevFS know which devices to add to /dev/scsi/... without
> loading the module and scanning the bus first? Or do you manually
> insert the scsi module when you need it?
If you do 'cd /dev/scsi', the kernel looks it up and finds it missing,
which generates a "lookup" event from the kernel to your 'devfsd'
process. (You *do* run devfsd, right?) devfsd then calls 'modprobe
/dev/scsi' (I think that's the default action, you can change it in
/etc/devfsd.conf if you wish). /sbin/modprobe reads /etc/modules.conf
which has an entry like 'alias /dev/scsi sym53c8xx', so when it is
asked to load /dev/scsi it actually loads sym53c8xx. sym53c8xx in turn
triggers the creation of /dev/scsi as it initializes.
So modprobe, having loaded the module, exits. devfsd then replies to
the kernel 'ok, try again, will you please' and the kernel does so, and
this time /dev/scsi/ exists and is accessible.
...And the chdir("/dev/scsi") system call, having waited this whole
time, finally returns successfully. And now you know ... the rest of
the story.
Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2001-02-01 10:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-02-01 8:44 William Knop
2001-01-31 22:56 ` Michael B. Trausch
2001-02-02 10:35 ` Helge Hafting
2001-02-02 20:00 ` Michael B. Trausch
2001-02-05 10:36 ` Helge Hafting
2001-02-02 20:33 ` Georg Nikodym
2001-02-01 10:23 ` Peter Samuelson [this message]
2001-02-01 15:22 ` John Jasen
2001-02-01 16:13 ` Georg Nikodym
-- strict thread matches above, loose matches on Subject: below --
2001-01-31 21:34 William Knop
2001-01-30 22:20 ` Michael B. Trausch
2001-01-31 22:05 ` Brian May
2001-02-01 10:31 ` Helge Hafting
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=20010201042320.B27725@cadcamlab.org \
--to=peter@cadcamlab.org \
--cc=linux-kernel@vger.kernel.org \
--cc=w_knop@hotmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®