Professional Web Applications Themes

Programatically determining BootROM version? - Mac Programming

What is the correct way to determine the BootROM version? I want to do so because there's a bug that's fixed with a firmware update and I need to be able to detect so I can warn the user if they need to update. There doesn't seem to be a Gestalt or sysctl AFAICT... maybe in the IORegistry? Thanks!...

  1. #1

    Default Programatically determining BootROM version?

    What is the correct way to determine the BootROM version? I want to do
    so because there's a bug that's fixed with a firmware update and I need
    to be able to detect so I can warn the user if they need to update.

    There doesn't seem to be a Gestalt or sysctl AFAICT... maybe in the
    IORegistry?

    Thanks!
    Sean McBride Guest

  2. #2

    Default Re: Programatically determining BootROM version?

    Boot into OpenFirmware and check the version.

    Sean McBride wrote:
    > What is the correct way to determine the BootROM version? I want to do
    > so because there's a bug that's fixed with a firmware update and I need
    > to be able to detect so I can warn the user if they need to update.
    >
    > There doesn't seem to be a Gestalt or sysctl AFAICT... maybe in the
    > IORegistry?
    >
    > Thanks!
    Alan Kruger Guest

  3. #3

    Default Re: Programatically determining BootROM version?

    In article <H%rdb.81952$xx4.9044943twister.neo.rr.com>,
    Alan Kruger <akrugerkent.edu> wrote:
    > Boot into OpenFirmware and check the version.
    hehehe. But, as I said in the subject line, I'm looking to determine
    this programatically, more specifically with C. Apple System Profiler
    is able to get the info from somewhere (and show it), I'd like to do the
    same from my code.
    Sean McBride Guest

  4. #4

    Default Re: Programatically determining BootROM version?

    In article <cwatson-70C9C0.00345626092003aeinews.aei.ca>,
    Sean McBride <cwatsoncam.org> wrote:
    > What is the correct way to determine the BootROM version? I want to do
    > so because there's a bug that's fixed with a firmware update and I need
    > to be able to detect so I can warn the user if they need to update.
    Although this doesn't actually answer your question, you might look at
    The Nitrogen Manifesto, which doents a library called "Nitrogen",
    which wraps the Carbon API, making the Carbon API much easier to use
    (Nitrogen handles all the CFRetain/CFRelease nonsense, and converts
    error codes to exceptions so that routines can return useful values.)

    look at <http://nitric.sourceforge.net>. In Nitrogen, you can say
    something like:

    Namespace N = Nitrogen;

    std::string s = N::Convert<std::string>(
    N::CFCast<CFStringRef>(
    N::CFDictionaryGetValue(
    N::CFCast<CFDictionaryRef>(
    N::CFPropertyListCreateFromXMLData(
    N::CFURLCreateWithFileSystemPath(
    CFSTR("/System/Library/CoreServices/SystemVersion.plist"),
    KCFURLPOSIXPathStyle,
    false
    )
    )
    ),
    CFSTR("ProductBuildVerson")
    )
    )
    );

    to get the build number of the O.S.

    The ROM firmware value is probably available through IOKit, in a similar
    way.
    David Phillip Oster Guest

  5. #5

    Default Re: Programatically determining BootROM version?

    Sean McBride <org> wrote in message news:<aei.ca>... 
    >
    > hehehe. But, as I said in the subject line, I'm looking to determine
    > this programatically, more specifically with C. Apple System Profiler
    > is able to get the info from somewhere (and show it), I'd like to do the
    > same from my code.[/ref]

    Hi Sean
    You can retrieve BootROM version thru IORegistry by iterating thru
    it programmatically.
    Create the iterator using the function IORegistryCreateIterator.
    Using IORegistryEntryCreateCFProperty() you can get the value.
    For detail on accessing IORegistry go thru the following link..

    http://developer.apple.com/doentation/Darwin/Reference/IOKit/IOKitLib

    regards.
    kundan...
    Kundan Guest

  6. #6

    Default Re: Programatically determining BootROM version?

    In article <google.com>,
    com (Kundan Nehete) wrote:
     

    This works quite well, thanks!
    Sean Guest

Similar Threads

  1. Acrobat version - programatically
    By palaksha@adobeforums.com in forum Adobe Acrobat SDK
    Replies: 1
    Last Post: October 23rd, 03:06 PM
  2. determining 'ContextRoot()' programatically
    By ntsiii in forum Macromedia Flex General Discussion
    Replies: 1
    Last Post: November 3rd, 06:59 PM
  3. Replies: 0
    Last Post: October 12th, 01:14 AM
  4. Replies: 2
    Last Post: October 2nd, 02:35 PM
  5. Replies: 0
    Last Post: October 1st, 02:30 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139