const OSSymbol * sym = OSSymbol::withCStringNoCopy(kIOHibernateRTCVariablesKey);
if (sym) {
- gIOOptionsEntry->removeProperty(sym);
+ if (gIOOptionsEntry->getProperty(sym)) {
+ gIOOptionsEntry->removeProperty(sym);
+ gIOOptionsEntry->sync();
+ }
sym->release();
}
}
uncompressedSize ? ((int) ((compressedSize * 100ULL) / uncompressedSize)) : 0,
sum1, sum2);
+ if (vars->fileVars->io)
+ (void) IOHibernatePollerIODone(vars->fileVars, false);
+
if (pollerOpen)
IOHibernatePollerClose(vars->fileVars, kIOPolledBeforeSleepState);