On Wed, Nov 19, 2008 at 6:29 PM, Darren J Moffat <[EMAIL PROTECTED]>wrote:

> 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
>

Oh gr8 thanks man, could find the code which does it.


>
> > 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.
>

This module which I am working on should work as plug-in into the ZFS. So,
static dependency will not be good idea.
BTW, thanks a lot for telling how to make module dependency, I wasn't
knowing it either.

Thanks and Regards,
Prasad.


>
> --
> Darren J Moffat
>
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to