[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cdi-devel] Proposed Dynamic Driver Loading System

On Sun, Jan 03, 2010 at 08:48:33PM +1000, Matthew Iselin wrote:
> On Sun, Jan 3, 2010 at 8:33 PM, Kevin Wolf <kevin@xxxxxxxxxx> wrote:
> > On Sun, Jan 03, 2010 at 10:27:53AM +1000, Matthew Iselin wrote:
> >> On Sun, Jan 3, 2010 at 9:38 AM, Kevin Wolf <kevin@xxxxxxxxxx> wrote:
> >> > On Sun, Jan 03, 2010 at 09:23:30AM +1000, Matthew Iselin wrote:
> >> >> A simple <your scripting language here> script could be added and
> >> >> called to update the list during the build of CDI.
> >> >
> >> > Actually I think C would be the right tool. Link all object files in the whole
> >> > tree together and add a small main() function that enumerates all the drivers
> >> > in it. All the parsing is done by the compiler.
> >>
> >> Hm, good point. A little more complicated, but also comes with the
> >> bonus of needing no new dependency on Perl or Python or <your
> >> scripting language here>.
> >
> > Hm, I was just missing that driver enumeration is OS specific. So with
> > this approach we wouldn't be able to share the tool (unless you want to
> > compile everything twice: once for the OS and once with a different
> > cdi-osdep.h for the generation of this list). I'm not even sure that all
> > OSes want to have the list in the same format, so probably it's better
> > anyway if we only describe how you can do it and leave it to the CDI
> > implementations.
> Right, leaving the method for list generation up to the implementation
> is an easy way to get out of that tough problem ;)

Right, I know I'm a genius. ;-)

> I think we are reaching the stage where we need to now determine a
> proper interface and define the requirements of the OS in order to
> support this kind of behaviour. In other words, take the results of
> this discussion and turn them into a proper design for the feature. Up
> to you though, if you feel more discussion is necessary, then by all
> means, let us discuss this further. :)

I'm happy with what we've discussed. I'm even happier that we seem to be
all on the same page, as Rich already said yesterday. Unless Rich or Max
have objections, let's move forward with patches.