- Joined
- Sep 18, 2011
- Messages
- 190
- Motherboard
- Vostro 3450 A13C4
- CPU
- i3-2350M
- Graphics
- HD 3000
- Mac
- Mobile Phone
They do, but they are compiled with different code having one subtle difference. The 'sw' dump is taken with original 1.70.0 installed, whereas the 'hw' has the following applied:Both these ioreg show ACPIBatteryManager 1.70.0. Need to see ioreg with old ACPIBatteryManager...
Code:
diff --git a/AppleSmartBatteryManager/AppleSmartBattery.cpp b/AppleSmartBatteryManager/AppleSmartBattery.cpp
index 7d78daf..a6bad62 100644
--- a/AppleSmartBatteryManager/AppleSmartBattery.cpp
+++ b/AppleSmartBatteryManager/AppleSmartBattery.cpp
@@ -1108,7 +1108,7 @@ void AppleSmartBattery::setSerialNumber(const OSSymbol *sym)
OSSymbol *AppleSmartBattery::serialNumber(void)
{
- return OSDynamicCast(OSSymbol, properties->getObject(_SerialNumberSym));
+ return OSDynamicCast(OSSymbol, properties->getObject(_HardwareSerialSym));
}
void AppleSmartBattery::setManufacturerData(uint8_t *buffer, uint32_t bufferSize)
And this line alone addresses both of the issues - the correct presentation of the serial number (as seen from BatterySerialNumber in IOReg) as well as the indication to service the battery. The reason for having done that is because with 1.55 codebase, the the method to set the number was being called as setSerialNumber(fSerialNumber), and also
constructAppleSerialNumber() utilized OSSymbol *serial_string = fSerialNumber; within the method. Whereas with 1.70.0 code it was trying to call the construct method using _SerialNumberSym (as set by setSerialNumber), which I have a suspicion fails ... could be because the property is set from a OSNumber var, while the property itself is OSSymbol ?