mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: John Moser <john.r.moser@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Basic rundown of udev?
Date: Thu, 16 Apr 2009 23:07:40 +0200	[thread overview]
Message-ID: <ac3eb2510904161407v242ada41tcd079e5a639a638d@mail.gmail.com> (raw)
In-Reply-To: <cf4f48500904161339n627e2127k7e9b4abeb0621c28@mail.gmail.com>

On Thu, Apr 16, 2009 at 22:39, John Moser <john.r.moser@gmail.com> wrote:
> I'm currently reading through umm... udevd.c for udev-141.  Trying to
> figure out how this thing works.

Udev stuff is usually handled at linux-hotplug@vger.kernel.org.

> Anyone care to give me a brief map?  It would help.  I'm just trying
> to figure out how udev talks to the kernel

Udev just listens to broadcasted events from the kernel.

Just run:
  udevadm monitor --kernel --env
and
  strace udevadm monitor --kernel
and you see what's going on.

> -- i.e. will what facilities
> would I have to implement to re-implement the kernel side of udev,
> let's say if I was to run udevd as-is on Darwin or NetBSD or
> something.

Udev uses the Linux kernel device tree exported by sysfs. It offers
simplified access to the internal device structures in the kernel. Not
sure what other platforms do here.

> How does it talk to the kernel?  And if you know off the
> top of your head, which source files (and functions?) am I looking at
> here?

The kernel sends the needed events from: lib/kobject_uevent.c, but
that does not include the driver core, which is in drivers/base/*, and
the exported device tree filesystem at fs/sysfs/*.

Good luck,
Kay

      reply	other threads:[~2009-04-16 21:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-16 20:39 John Moser
2009-04-16 21:07 ` Kay Sievers [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=ac3eb2510904161407v242ada41tcd079e5a639a638d@mail.gmail.com \
    --to=kay.sievers@vrfy.org \
    --cc=john.r.moser@gmail.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 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®