#include <IOKit/assert.h>
#include <IOKit/IOLib.h>
+#include <IOKit/IOKitKeys.h>
#include <IOKit/IOBufferMemoryDescriptor.h>
#include "RootDomainUserClient.h"
#include <IOKit/pwr_mgt/IOPMLibDefs.h>
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-bool RootDomainUserClient::initWithTask(task_t owningTask, void *security_id, UInt32)
+bool RootDomainUserClient::initWithTask(task_t owningTask, void *security_id,
+ UInt32 type, OSDictionary * properties)
{
- if (!super::init())
+ if (properties)
+ properties->setObject(kIOUserClientCrossEndianCompatibleKey, kOSBooleanTrue);
+
+ if (!super::initWithTask(owningTask, security_id, type, properties))
return false;
fOwningTask = owningTask;
{
static IOExternalMethod sMethods[] = {
{ // kPMSetAggressiveness, 0
- 1, (IOMethod)&RootDomainUserClient::secureSetAggressiveness, kIOUCScalarIScalarO, 2, 1
+ (IOService *)1, (IOMethod)&RootDomainUserClient::secureSetAggressiveness, kIOUCScalarIScalarO, 2, 1
},
{ // kPMGetAggressiveness, 1
0, (IOMethod)&IOPMrootDomain::getAggressiveness, kIOUCScalarIScalarO, 1, 1
},
{ // kPMSleepSystem, 2
- 1, (IOMethod)&RootDomainUserClient::secureSleepSystem, kIOUCScalarIScalarO, 0, 1
+ (IOService *)1, (IOMethod)&RootDomainUserClient::secureSleepSystem, kIOUCScalarIScalarO, 0, 1
},
{ // kPMAllowPowerChange, 3
0, (IOMethod)&IOPMrootDomain::allowPowerChange, kIOUCScalarIScalarO, 1, 0
0, (IOMethod)&IOPMrootDomain::restartSystem, kIOUCScalarIScalarO, 0, 0
},
{ // kPMSetPreventative, 7
- 1, (IOMethod) &RootDomainUserClient::setPreventative, kIOUCScalarIScalarO, 2, 0
+ (IOService *)1, (IOMethod)&RootDomainUserClient::setPreventative, kIOUCScalarIScalarO, 2, 0
},
};