Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Apr 2021 05:17:12 +0000
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net>
Cc:        "Warner Losh" <imp@bsdimp.com>, freebsd-arch@freebsd.org
Subject:   Re: New device wiring option
Message-ID:  <96341.1618463832@critter.freebsd.dk>
In-Reply-To: <08A076D6-369B-4CE5-9DE6-012E2708F792@lists.zabbadoz.net>
References:  <CANCZdfqVbqX1hGVPAwjm%2BaCfhA5t7Z=UajydNzV1gnUmdHVWOw@mail.gmail.com> <08A076D6-369B-4CE5-9DE6-012E2708F792@lists.zabbadoz.net>

next in thread | previous in thread | raw e-mail | index | archive | help
--------
Bjoern A. Zeeb writes:

> Probably USB as well?  Having 10 serial consoles on USB Hubs and unplugg=
ing
> one =E2=80=9Cearly=E2=80=9D one it is easy to end up re-numbering the en=
tire chain after a
> reboot.  Not sure if this really fits into your problem/implementation d=
omain.

My solution to that specific problem is the following entry in /etc/devd:

	attach 500 {
		match "device-name"     "uftdi[0-9]*";
		match "vendor"          "0x0403";
		match "product"         "(0x6001|0x6015)";
		action "ln -fs /dev/cua$ttyname /dev/cua_$sernum";
	};
	=

	notify 500 {
		match "system"          "USB";
		match "subsystem"       "DEVICE";
		match "type"            "DETACH";
		match "vendor"          "0x0403";
		match "product"         "(0x6001|0x6015)";
		action "rm -f /dev/cua_$sernum";
	};

-- =

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?96341.1618463832>