From a26f1b25862c57caabe49c36faeed6292dc0b481 Mon Sep 17 00:00:00 2001 From: Ivan Kuchin Date: Sun, 22 Aug 2021 13:33:23 +0200 Subject: [PATCH] mention sleep in idle assertion message and variable name --- stressdrive.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/stressdrive.c b/stressdrive.c index 20170c4..6ecdc7b 100644 --- a/stressdrive.c +++ b/stressdrive.c @@ -175,14 +175,14 @@ int main(int argc, const char *argv[]) { uint16_t bufferBlocks = bufferSize / blockSize; #ifdef __APPLE__ - IOPMAssertionID noIdleAssertionID; - IOReturn noIdleAssertionCreated = IOPMAssertionCreateWithName( + IOPMAssertionID noIdleSleepAssertionID; + IOReturn noIdleSleepAssertionCreated = IOPMAssertionCreateWithName( kIOPMAssertionTypeNoIdleSleep, kIOPMAssertionLevelOn, - CFSTR("stressdrive running"), &noIdleAssertionID); - if (kIOReturnSuccess == noIdleAssertionCreated) { - printf("succesfully created no idle assertion\n"); + CFSTR("stressdrive running"), &noIdleSleepAssertionID); + if (kIOReturnSuccess == noIdleSleepAssertionCreated) { + printf("succesfully created no idle sleep assertion\n"); } else { - printf("failed to create no idle assertion\n"); + printf("failed to create no idle sleep assertion\n"); } #endif @@ -283,11 +283,11 @@ int main(int argc, const char *argv[]) { } #ifdef __APPLE__ - if (kIOReturnSuccess == noIdleAssertionCreated) { - if (kIOReturnSuccess == IOPMAssertionRelease(noIdleAssertionID)) { - printf("succesfully released no idle assertion\n"); + if (kIOReturnSuccess == noIdleSleepAssertionCreated) { + if (kIOReturnSuccess == IOPMAssertionRelease(noIdleSleepAssertionID)) { + printf("succesfully released no idle sleep assertion\n"); } else { - printf("failed to release no idle assertion\n"); + printf("failed to release no idle sleep assertion\n"); } } #endif