client: tweaks to get_max_cpu_temperature() for Macintosh

This commit is contained in:
Charlie Fenton 2013-11-23 16:01:46 -08:00
parent 2003b09eef
commit a58db314a4
1 changed files with 4 additions and 4 deletions

View File

@ -1080,7 +1080,7 @@ kern_return_t SMCReadKey(UInt32 key, SMCBytes_t val) {
inputStructure.key = key; inputStructure.key = key;
inputStructure.data8 = SMC_CMD_READ_KEYINFO; inputStructure.data8 = SMC_CMD_READ_KEYINFO;
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 #if 1 // Requires OS 10.5
result = IOConnectCallStructMethod(conn, result = IOConnectCallStructMethod(conn,
KERNEL_INDEX_SMC, KERNEL_INDEX_SMC,
&inputStructure, &inputStructure,
@ -1088,7 +1088,7 @@ kern_return_t SMCReadKey(UInt32 key, SMCBytes_t val) {
&outputStructure, &outputStructure,
&structureOutputSize &structureOutputSize
); );
#else #else // Deprecated in OS 10.5
result = IOConnectMethodStructureIStructureO(conn, result = IOConnectMethodStructureIStructureO(conn,
KERNEL_INDEX_SMC, KERNEL_INDEX_SMC,
sizeof(inputStructure), sizeof(inputStructure),
@ -1104,7 +1104,7 @@ kern_return_t SMCReadKey(UInt32 key, SMCBytes_t val) {
inputStructure.keyInfo.dataSize = outputStructure.keyInfo.dataSize; inputStructure.keyInfo.dataSize = outputStructure.keyInfo.dataSize;
inputStructure.data8 = SMC_CMD_READ_BYTES; inputStructure.data8 = SMC_CMD_READ_BYTES;
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5 #if 1 // Requires OS 10.5
result = IOConnectCallStructMethod(conn, result = IOConnectCallStructMethod(conn,
KERNEL_INDEX_SMC, KERNEL_INDEX_SMC,
&inputStructure, &inputStructure,
@ -1112,7 +1112,7 @@ kern_return_t SMCReadKey(UInt32 key, SMCBytes_t val) {
&outputStructure, &outputStructure,
&structureOutputSize &structureOutputSize
); );
#else #else // Deprecated in OS 10.5
result = IOConnectMethodStructureIStructureO(conn, result = IOConnectMethodStructureIStructureO(conn,
KERNEL_INDEX_SMC, KERNEL_INDEX_SMC,
sizeof(inputStructure), sizeof(inputStructure),