Re: Getting processor description from sysctl
Re: Getting processor description from sysctl
- Subject: Re: Getting processor description from sysctl
- From: "Jordan K. Hubbard" <email@hidden>
- Date: Fri, 16 May 2008 12:50:09 -0700
On May 16, 2008, at 10:29 AM, Finlay Dobbie wrote:
In this particular instance, it may very well be the case that parsing
the XML output of system_profiler is the best option. My general point
was that this is probably more fragile than a supported API would be,
and it would be nice if the format of the XML (what keys there are,
etc) was documented (like launchd.plist(5) for example) so there was
at least some sort of vague nod from the "powers that be" that this is
an OK thing to do - because, in general, parsing the output of the
tools is regarded as fragile.
... And I think that's a perfectly fair request and certainly easier
for us [Apple] than creating new API in those cases where the design
and sustainability of said API isn't clear at all. Do you have a
radar filed against the ASP folks to document the output of
system_profiler(8)?
While we're on the subject of API that isn't particularly well-
designed or sustainable... If anyone has any ideas on how to replace
(or supplement) sysctl(3) with something that overcomes all its
obvious warts without also causing people to scream "Aaaaah! It's the
Windows Registry! Ported over here to kill us all!", I'm all ears (or
eyeballs). Terry and I are both old enough to remember the genesis of
sysctl(3) in BSD as a "small number of simple knobs" mechanism and we
both know that what we have today represents an over-usage of it to
the point that it's been stretched well beyond its original design
goals. It represents a problem to be fixed, and one that could
conceivably be fixed in any number of ways, which is in itself a
problem: Which is the "right" way?
One obvious idea is to start with the new DSLocal store and make it a
type of directory service, but there's a few non-obvious steps between
there and step 3, Profit!, including the staying-away-from-the-Windows-
Registry one mentioned earlier. Other, better, ideas may be less
obvious to me.
- Jordan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden