IOKit localization

Discussion in 'Mac Programming' started by hockgow, Dec 6, 2011.

  1. macrumors newbie

    Mar 3, 2011
    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?
  2. Moderator emeritus


    Jun 15, 2000
    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.

Share This Page