Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Jun 2016 04:07:16 +0100
From:      KILOREUX Emperex <kiloreux@gmail.com>
To:        Poul-Henning Kamp <phk@phk.freebsd.dk>
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:  <CAN1JrQ1eSr3%2BrPuF5d6USX=V_cTjzuAG=VXd7pFphO%2BEk2gE%2BQ@mail.gmail.com>
In-Reply-To: <13621.1465030369@critter.freebsd.dk>
References:  <CAN1JrQ2dd0WZi0_aaNdqH9xdy292tP2DYLxvKV9bfK93vYFLXw@mail.gmail.com> <13621.1465030369@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
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@phk.freebsd.dk>
wrote:

> --------
> 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?CAN1JrQ1eSr3%2BrPuF5d6USX=V_cTjzuAG=VXd7pFphO%2BEk2gE%2BQ>