}
IOReturn RootDomainUserClient::secureGetSystemSleepType(
- uint32_t *outSleepType)
+ uint32_t *outSleepType, uint32_t *sleepTimer)
{
int admin_priv = 0;
IOReturn ret;
admin_priv = (kIOReturnSuccess == ret);
if (admin_priv && fOwner) {
- ret = fOwner->getSystemSleepType(outSleepType);
+ ret = fOwner->getSystemSleepType(outSleepType, sleepTimer);
} else {
ret = kIOReturnNotPrivileged;
}
IOReturn RootDomainUserClient::clientClose( void )
{
- detach(fOwner);
+ terminate();
+ return kIOReturnSuccess;
+}
+
+void RootDomainUserClient::stop( IOService *provider)
+{
if(fOwningTask) {
task_deallocate(fOwningTask);
fOwningTask = 0;
}
- return kIOReturnSuccess;
+ super::stop(provider);
}
IOReturn RootDomainUserClient::externalMethod(
break;
case kPMGetSystemSleepType:
- if (1 == arguments->scalarOutputCount)
+ if (2 == arguments->scalarOutputCount)
{
ret = this->secureGetSystemSleepType(
- (uint32_t *) &arguments->scalarOutput[0]);
+ (uint32_t *) &arguments->scalarOutput[0],
+ (uint32_t *) &arguments->scalarOutput[1]);
}
break;