Skip to content

Commit

Permalink
Make sure version is published for all plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
vit9696 committed Feb 24, 2021
1 parent d44d1f3 commit 155a854
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Changelog.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
5 changes: 4 additions & 1 deletion Sensors/SMCBatteryManager/SMCBatteryManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "SMCBatteryManager.hpp"
#include "KeyImplementations.hpp"
#include <IOKit/battery/AppleSmartBatteryCommands.h>
#include <Headers/kern_version.hpp>

OSDefineMetaClassAndStructors(SMCBatteryManager, IOService)

Expand Down Expand Up @@ -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) {
Expand Down
3 changes: 3 additions & 0 deletions Sensors/SMCDellSensors/SMCDellSensors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#include "SMCDellSensors.hpp"
#include "KeyImplementations.hpp"
#include <Headers/plugin_start.hpp>
#include <Headers/kern_version.hpp>
#include <IOKit/pwr_mgt/RootDomain.h>

#include "kern_hooks.hpp"
Expand Down Expand Up @@ -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");
Expand Down
3 changes: 3 additions & 0 deletions Sensors/SMCLightSensor/SMCLightSensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//

#include "SMCLightSensor.hpp"
#include <Headers/kern_version.hpp>

OSDefineMetaClassAndStructors(SMCLightSensor, IOService)

Expand Down Expand Up @@ -108,6 +109,8 @@ bool SMCLightSensor::start(IOService *provider) {
return false;
}

setProperty("VersionInfo", kextVersion);

vsmcNotifier = VirtualSMCAPI::registerHandler(vsmcNotificationHandler, this);
return vsmcNotifier != nullptr;
}
Expand Down
3 changes: 3 additions & 0 deletions Sensors/SMCProcessor/SMCProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <VirtualSMCSDK/kern_vsmcapi.hpp>
#include <Headers/kern_time.hpp>
#include <Headers/kern_devinfo.hpp>
#include <Headers/kern_version.hpp>
#include <IOKit/IODeviceTreeSupport.h>
#include <IOKit/IOTimerEventSource.h>

Expand Down Expand Up @@ -341,6 +342,8 @@ bool SMCProcessor::start(IOService *provider) {
return false;
}

setProperty("VersionInfo", kextVersion);

auto &bdi = BaseDeviceInfo::get();
cpuGeneration = bdi.cpuGeneration;
cpuFamily = bdi.cpuFamily;
Expand Down
3 changes: 3 additions & 0 deletions Sensors/SMCSuperIO/SMCSuperIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

#include <VirtualSMCSDK/kern_vsmcapi.hpp>
#include <Headers/kern_time.hpp>
#include <Headers/kern_version.hpp>
#include <IOKit/IODeviceTreeSupport.h>
#include <IOKit/IOTimerEventSource.h>

Expand Down Expand Up @@ -42,6 +43,8 @@ bool SMCSuperIO::start(IOService *provider) {
return false;
}

setProperty("VersionInfo", kextVersion);

auto ioreg = OSDynamicCast(IORegistryEntry, this);

dataSource = detectDevice();
Expand Down

0 comments on commit 155a854

Please sign in to comment.