Prasad Joshi wrote:
> The solution which I got is
> 1. find some interface in the kernel which will tell me whether the
> symbol is available for eg
> get_symbol("<symbol name>");
>
> this interface will resolve the symbol and give me the pointer to the
> function.
>
> for eg. This is what I want to do
> if((ptr=get_symbol("printf_hello"))!=NULL)
> ptr("hello world");
>
>
> Is there any such interface already present?
Yes there is and ZFS already uses such code for sharing.
See the code around the ddi_modopen call in zfs_ioctl.c
> Is there any other alternative to solve this problem?
If your zfs module should always require the other module then make your
zfs module depend on it using -N<path to your module relative to
/kernel> eg. zfs depends on swrand by -Ncrypto/swrand.
--
Darren J Moffat
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code