Re: Determining which kernel extension is being opened
Re: Determining which kernel extension is being opened
- Subject: Re: Determining which kernel extension is being opened
- From: Kevin Elliott <email@hidden>
- Date: Thu, 27 Dec 2007 12:29:50 -0800
Kext's are not loaded bundles from the perspective of
CFBundleGetBundleWithIdentifier. The function
KextManagerCreateURLForBundleIdentifier will map Bundle Identifier to
a system path, but it only works if the kext is at the top level of /
System/Library/Extensions (not in a sub folder, and not located in a
different directory). It's also user space only. I don't know if you
there is an equivalent function within the kernel.
On Dec 27, 2007, at 11:21 AM, mm w wrote:
Hi, take a look here if you need to know the list of kext loaded
http://plumber.gnu-darwin.org/home/pub/snip-c/lsmod-101/lsmod.c
and you could match your service by identifier from the user space,
and maybe you could match the filename by using
CFBundleGetBundleWithIdentifier,
i don't know if you can match a kext like this, Cf is abble to return
loaded bundles
On Dec 27, 2007 6:32 PM, David Rose <email@hidden> wrote:
Hi,
Is there any way to associate a filename to an
IOServiceOpen call? Is there a way to tell which
kernel extension (kext) an IOServiceOpen will
open.
Consider the following code:
kernResult = IOServiceGetMatchingServices(
kIOMasterPortDefault, IOServiceMatching( "Foo" ),
&iterator );
if( kernResult == kIOReturnSuccess )
{
service = IOIteratorNext( iterator );
IOObjectRelease( iterator );
if( service )
{
kernResult = IOServiceOpen( service,
mach_task_self(), 0, &dataPort );
Is there any way to determine the kernel extension
that will have its newUserClient method invoked based
on the above code? Right now I can grep through plists
in /System/Library/Extensions and search for Foo but
is there any better way?
Thanks,
David Rose
____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
--
-mmw
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
@mac.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden