PDA

View Full Version : IOKit localization




hockgow
Dec 6, 2011, 12:51 PM
I am developing an app that retrieves disk information. I am using the IOKit, more specifically IOMasterPost() and then searching for "BSD Name" via IOServiceGetMatchingServices() to obtain the HDInfo. This works fine on english systems. The problem is when I run on a Japanese machine and I presume other foreign localized machine 'BSD Name' cannot be found. On Japanese machines the HDD information is actually stored under 'BSD xxx' (where xxx are Japanese characters).

The good thing is if the 'language and text' on the Japanese machine is changed to english, 'BSD name' works. So the question is there a IOKit system constant that I can use to get the 'BSD name' string equivalent? Or can I temporarily change the localization in 1 function such that 'BSD name' will work?



kainjow
Dec 6, 2011, 08:26 PM
How are you generating the matching dictionary? Maybe you should use IOBSDNameMatching(). Otherwise post your code because it's not 100% clear what you're doing.