API to link sysctl nodes to devices

KILOREUX Emperex kiloreux at gmail.com
Mon Jun 6 03:07:19 UTC 2016


Hey,

Thanks for your feedback, but we have been over this and what you are
proposing seems pretty interesting, can you please elaborate on how that
could be implemented inside the kernel, or give more details about it, also
it seems a bit cool if we could do both of them together, so what do you
think about sysctl nodes, is there any disadvantages for the implementation
of such API ?

On Sat, Jun 4, 2016 at 9:52 AM, Poul-Henning Kamp <phk at phk.freebsd.dk>
wrote:

> --------
> In message <
> CAN1JrQ2dd0WZi0_aaNdqH9xdy292tP2DYLxvKV9bfK93vYFLXw at 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 at 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.
>


More information about the freebsd-arch mailing list