kingoffright Posted August 12, 2011 Share Posted August 12, 2011 I try to get the string value in RestartFix key, but it shows the code not work and value[0] will always be 'S' and never change /**********************************/ // Restart Fix if (Platform.CPU.Vendor == 0x756E6547) { /* Intel */ fix_restart = true; value = getStringForKey(kRestartFix, &bootInfo->chameleonConfig); verbose("value[0] is %c \n Key is %s\n", value[0], kRestartFix); if (value[0] == 'A') { fix_restart_acpi = true; verbose("FADT: ACPI\n"); } else if (value[0] == 'P') { fix_restart_acpi = false; verbose("FADT: PS2\n"); } else { fix_restart = false; verbose("FADT: Fail\n"); } } else { verbose ("Not an Intel platform: Restart Fix not applied !!!\n"); fix_restart = false; } /**********************************/ Output as below: /**********************************/ value[0] is S Key is RestartFix FADT: Fail FADT: Using custom DSDT! value[0] is S Key is RestartFix FADT: Fail FADT: Using custom DSDT! /**********************************/ no changes even I set the RestartFix as below <key>RestartFix</key> <string>ABCDEFG</string> Link to comment https://www.insanelymac.com/forum/topic/265405-how-to-get-the-key-value-in-plist/ Share on other sites More sharing options...
Recommended Posts