Re: How to detect Mac OS X version from a kext
Re: How to detect Mac OS X version from a kext
- Subject: Re: How to detect Mac OS X version from a kext
- From: "Bhavesh Davda" <email@hidden>
- Date: Sun, 17 Jun 2007 18:01:48 -0700
Irritatingly, the thing that you most want - the kmod version for the
symbol set(s) against which you are matched - is not easy to get.
The kmod_info struct that is passed to your kmod_start routine
contains a list of kmod references which would include the kernel
symbol sets against which you're linked, but if you're an I/O Kit
kext I don't think this is readily available because Xcode is
generating this function for you magically behind the scenes.
So I don't have that problem because I'm not an I/O Kit kext. I'm a
direct KPI user.
(Am I missing something here, folks? I couldn't find a public
interface to fetch the kmod_info data except via invoking kextstat,
which doesn't work well for kernel mode consumers...)
Just to be clear where you're going with this. Are you suggesting that
I walk the list of kmod_info structs passed to my start routine?
This number is your best bet; the major digit has consistenly been
bumped at each major OS release. You will want to get confirmation
from DTS (Garth?), but it seems reasonable to assume that as Panther
was 7.x and Tiger was 8.x that Leopard will be 9.x.
If someone at Apple can confirm this, I'll gladly use the utsname
major number 9 to mean Leopard. That's indeed sounding like my best
option.
Thanks!
--
Bhavesh P. Davda
_______________________________________________
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