Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 04 Jun 2016 08:52:49 +0000
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        KILOREUX Emperex <kiloreux@gmail.com>
Cc:        freebsd-arch@freebsd.org, Koop Mast <kwm@freebsd.org>, eadler@freebsd.org,  =?UTF-8?B?SmVhbi1Tw6liYXN0aWVuIFDDqWRyb24=?= <dumbbell@freebsd.org>
Subject:   Re: API to link sysctl nodes to devices
Message-ID:  <13621.1465030369@critter.freebsd.dk>
In-Reply-To: <CAN1JrQ2dd0WZi0_aaNdqH9xdy292tP2DYLxvKV9bfK93vYFLXw@mail.gmail.com>
References:  <CAN1JrQ2dd0WZi0_aaNdqH9xdy292tP2DYLxvKV9bfK93vYFLXw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--------
In message <CAN1JrQ2dd0WZi0_aaNdqH9xdy292tP2DYLxvKV9bfK93vYFLXw@mail.gmail=
.com>
, KILOREUX Emperex writes:

>As part of my participation GSOC, I have been working on an API spec to
>link sysctl nodes to devices.

It's not really the sysctl nodes as such you should focus on, but
rather on the gap between (the increasingly inaccurately named)
newbus and devfs.

The poster-boy example is how you get from USB bus coordinates to
/dev/da* or /dev/{tty|cua}U* devices.

devd(8) seems to know the linkage and usually I resort to /etc/devd
entries like this to make it liveable:

	attach 1000 {
		match "device-name"     "uftdi[0-9]*";
		match "vendor"          "0x0403";
		match "product"         "0x6001";
		match "sernum"          "FTHAV9UU";
		action "ln -s /dev/cua$ttyname /dev/bbb1";
	};

	notify 1000 {
		match "system"          "USB";
		match "subsystem"       "DEVICE";
		match "type"            "DETACH";
		match "vendor"          "0x0403";
		match "product"         "0x6001";
		match "sernum"          "FTHAV9UU";
		action "rm -f /dev/bbb1";
	};


-- =

Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    =

Never attribute to malice what can adequately be explained by incompetence=
.



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