Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Mar 2004 08:55:37 +0000
From:      Nik Clayton <nik@freebsd.org>
To:        arch@freebsd.org
Subject:   Where should devctl notifications be sent from?
Message-ID:  <20040327085537.GC33016@clan.nothing-going-on.org>

next in thread | raw e-mail | index | archive | help

--p2kqVDKq5asng8Dg
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Apologies in advance if this is too trivial for -arch.

I'm trying to work out where it's appropriate to add devctl
notifications.

The specific problem I'm trying to solve involves an iPod connected
through firewire.  I'd like to be able to have devd be notified when the
iPod arrives, so that various processes can kick off automatically.  In
an ideal world, I'll drop the iPod in the dock, and some backup
processes start, thereby allowing me to justify the purchase of a model
several sizes larger than I actually need :-)

It looks like there are several places where the devctl_queue_data() and
related calls could be placed:

    firewire(4) -- when the device is plugged in
    fwohci(4) -- when the interface arrives
    sbp(4) -- when it's recognised as a mass storage device
    geom(4) -- when geom creates the device (/dev/da2 (and da2s2) in my
               case).  Robert Watson has a patch that implements this.
    devfs -- specifically, in make_dev(9) and destroy_dev(9)

The limited research that I've done suggests that the most generic place
to put this code is inside make_dev(9) and destroy_dev(9).  But this
seems so trivial that I can't believe no one else hasn't done the work,
so I figure there's probably something important that I'm missing.

N
--=20
FreeBSD: The Power to Serve      http://www.freebsd.org/               (__)
FreeBSD Documentation Project    http://www.freebsd.org/docproj/    \\\'',)
                                                                      \/  \=
 ^
   --- 15B8 3FFC DDB4 34B0 AA5F  94B7 93A8 0764 2C37 E375 ---         .\._/=
_)

--p2kqVDKq5asng8Dg
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (FreeBSD)

iD8DBQFAZUGIk6gHZCw343URAjfSAJwIlysRuXL+loo40w5we/W4eB1nzACcCikR
G9vlmYB7V9Wcl8XbuUjdaKI=
=7Qmf
-----END PGP SIGNATURE-----

--p2kqVDKq5asng8Dg--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040327085537.GC33016>