On Mon, Aug 18, 2008 at 2:02 PM, John Baldwin <[EMAIL PROTECTED]> wrote: > (snip) > A simpler approach is probably to make DB_COMMAND() use a SYSINIT to register > new functions instead of teaching DDB about that linker set. You just need > to write a shared "register_command()" function (and a deregister for > SYSUNINIT for module unload) that the SYSINIT uses. This also probably > requires changing the structure of the DDB tables, though you might be able > to make it simpler now. You could probably just make the tables be sorted > linked lists now instead of arrays. This would also remove the whole "aux > table" hack. >
Following Sam and John's advice, I have rewritten the patch so as to use SYS(UN)INIT. It uses a linked list instead of an array to store commands. As the patch is more than 400 lines long, it is available for reviewing at: http://dl.free.fr/jQQQkB72h0 I used 7.0 ; 6.2 requires a bit more work. Many thanks to Sam, John and Kostik for their suggestions. Feedback is still welcome :) _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"