I have another idea ( I am sorry that I can not do it now ) :
Move all of the existent device definitions arrays into XML files .
When a device is detected , load its definition from related XML file
Find its "index" .
By using that "index" , in a case statement do whatever is required such as
obtained from now from internal arrays : load a driver , etc.
This may have two parts : Existing device drivers in FreeBSD and XML
definition specified above .
These will be stored into FreeBSD base directories .
If device definition is not found in FreeBSD base XML definition files ,
the system
will look into following files defined below : If it is found , it will use
it , if it is not found , it will not "panic" but display a proper error
message ( in sufficient detail to be understandable by user ) .
For user devices which they are not in the above XML files :
System will search a predefined device directory in user space for a
possible XML file having definition of the device dedicated to the device
detected : In this file , a driver name should be specified .
FreeBSD will load this driver into user space and execute it .
Sources reading XML files is already present in the FreeBSD .
The only required part is to decode loaded XML file with respect to
elements .
The above structure will allow the companies to produce related XML files
and device drivers and let the users to use them without requiring
modifications into FreeBSD base system .
If they are not open source , it is the responsibility of the user whether
she/he will use it or not use it .
Such a structure will not require continuous modification in kernel sources
, and recompiling them .
It will move new device drivers into user space .
Later on , on new releases , if it is found useful , such drivers may be
moved into FreeBSD base .
Thank you very much .
Mehmet Erol Sanliturk