#include <IOKit/IOPlatformExpert.h>
#include <IOKit/IOUserClient.h>
#include <IOKit/IOKitKeys.h>
+#include <kern/debug.h>
+#include <pexpert/pexpert.h>
#define super IOService
return kIOReturnSuccess;
}
-UInt32 IODTNVRAM::savePanicInfo(UInt8 *buffer, IOByteCount length)
+IOByteCount IODTNVRAM::savePanicInfo(UInt8 *buffer, IOByteCount length)
{
if ((_piImage == 0) || (length <= 0)) return 0;
{"security-password", kOFVariableTypeData, kOFVariablePermRootOnly, -1},
{"boot-image", kOFVariableTypeData, kOFVariablePermUserWrite, -1},
{"com.apple.System.fp-state", kOFVariableTypeData, kOFVariablePermKernelOnly, -1},
+#if CONFIG_EMBEDDED
+ {"backlight-level", kOFVariableTypeData, kOFVariablePermUserWrite, -1},
+#endif
{0, kOFVariableTypeData, kOFVariablePermUserRead, -1}
};
if (tmpValue == 0xFFFFFFFF) {
strlcpy((char *)buffer, "-1", *length - propNameLength);
} else if (tmpValue < 1000) {
- snprintf((char *)buffer, *length - propNameLength, "%ld", tmpValue);
+ snprintf((char *)buffer, *length - propNameLength, "%d", (uint32_t)tmpValue);
} else {
- snprintf((char *)buffer, *length - propNameLength, "0x%lx", tmpValue);
+ snprintf((char *)buffer, *length - propNameLength, "0x%x", (uint32_t)tmpValue);
}
break;
kMaxNVDataLength = 8
};
-#pragma options align=mac68k
struct NVRAMProperty
{
IONVRAMDescriptor header;
UInt8 dataLength;
UInt8 data[ kMaxNVDataLength ];
};
-#pragma options align=reset
bool IODTNVRAM::searchNVRAMProperty(IONVRAMDescriptor *hdr, UInt32 *where)
{