diff --git a/Changelog.md b/Changelog.md index 193652a9..8e0e406e 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,7 +1,7 @@ VirtualSMC Changelog ==================== #### v1.2.1 -- Fix version publishing for VirtualSMC +- Fix version publishing for VirtualSMC and plugins #### v1.2.0 - Improve manual fan control in SMCDellSensors (switch off manual control before going to sleep), rename control boot-args (start with -dell) diff --git a/Sensors/SMCBatteryManager/SMCBatteryManager.cpp b/Sensors/SMCBatteryManager/SMCBatteryManager.cpp index e84ce63a..854e1067 100644 --- a/Sensors/SMCBatteryManager/SMCBatteryManager.cpp +++ b/Sensors/SMCBatteryManager/SMCBatteryManager.cpp @@ -11,6 +11,7 @@ #include "SMCBatteryManager.hpp" #include "KeyImplementations.hpp" #include +#include OSDefineMetaClassAndStructors(SMCBatteryManager, IOService) @@ -41,7 +42,9 @@ bool SMCBatteryManager::start(IOService *provider) { SYSLOG("sbat", "failed to start the parent"); return false; } - + + setProperty("VersionInfo", kextVersion); + // AppleSMC presence is a requirement, wait for it. auto dict = IOService::nameMatching("AppleSMC"); if (!dict) { diff --git a/Sensors/SMCDellSensors/SMCDellSensors.cpp b/Sensors/SMCDellSensors/SMCDellSensors.cpp index d411e3bc..a6ae91aa 100644 --- a/Sensors/SMCDellSensors/SMCDellSensors.cpp +++ b/Sensors/SMCDellSensors/SMCDellSensors.cpp @@ -10,6 +10,7 @@ #include "SMCDellSensors.hpp" #include "KeyImplementations.hpp" #include +#include #include #include "kern_hooks.hpp" @@ -134,6 +135,8 @@ bool SMCDellSensors::start(IOService *provider) { return false; } + setProperty("VersionInfo", kextVersion); + notifier = registerSleepWakeInterest(IOSleepHandler, this); if (notifier == NULL) { SYSLOG("sdell", "failed to register sleep/wake interest"); diff --git a/Sensors/SMCLightSensor/SMCLightSensor.cpp b/Sensors/SMCLightSensor/SMCLightSensor.cpp index 6a8e4918..de694af2 100644 --- a/Sensors/SMCLightSensor/SMCLightSensor.cpp +++ b/Sensors/SMCLightSensor/SMCLightSensor.cpp @@ -6,6 +6,7 @@ // #include "SMCLightSensor.hpp" +#include OSDefineMetaClassAndStructors(SMCLightSensor, IOService) @@ -108,6 +109,8 @@ bool SMCLightSensor::start(IOService *provider) { return false; } + setProperty("VersionInfo", kextVersion); + vsmcNotifier = VirtualSMCAPI::registerHandler(vsmcNotificationHandler, this); return vsmcNotifier != nullptr; } diff --git a/Sensors/SMCProcessor/SMCProcessor.cpp b/Sensors/SMCProcessor/SMCProcessor.cpp index 63bfee8f..13ef25d2 100644 --- a/Sensors/SMCProcessor/SMCProcessor.cpp +++ b/Sensors/SMCProcessor/SMCProcessor.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -341,6 +342,8 @@ bool SMCProcessor::start(IOService *provider) { return false; } + setProperty("VersionInfo", kextVersion); + auto &bdi = BaseDeviceInfo::get(); cpuGeneration = bdi.cpuGeneration; cpuFamily = bdi.cpuFamily; diff --git a/Sensors/SMCSuperIO/SMCSuperIO.cpp b/Sensors/SMCSuperIO/SMCSuperIO.cpp index 6f10d3c5..4cb1dcca 100644 --- a/Sensors/SMCSuperIO/SMCSuperIO.cpp +++ b/Sensors/SMCSuperIO/SMCSuperIO.cpp @@ -9,6 +9,7 @@ #include #include +#include #include #include @@ -42,6 +43,8 @@ bool SMCSuperIO::start(IOService *provider) { return false; } + setProperty("VersionInfo", kextVersion); + auto ioreg = OSDynamicCast(IORegistryEntry, this); dataSource = detectDevice();