-/* $OpenBSD: apm.c,v 1.25 2014/10/31 07:59:27 jsg Exp $ */
+/* $OpenBSD: apm.c,v 1.26 2014/12/18 20:01:33 deraadt Exp $ */
/*-
* Copyright (c) 2001 Alexander Guy. All rights reserved.
rv = config_suspend_all(DVACT_SUSPEND);
+ suspend_randomness();
+
#ifdef HIBERNATE
if (state == APM_IOC_HIBERNATE) {
uvm_pmr_zero_everything();
(void)enableintr();
splx(s);
+ resume_randomness(); /* force RNG upper level reseed */
bufq_restart();
config_suspend_all(DVACT_WAKEUP);
-/* $OpenBSD: zaurus_apm.c,v 1.28 2014/09/20 09:28:24 kettenis Exp $ */
+/* $OpenBSD: zaurus_apm.c,v 1.29 2014/12/18 20:01:33 deraadt Exp $ */
/*
* Copyright (c) 2005 Uwe Stuehler <uwe@bsdx.de>
s = splhigh();
config_suspend_all(DVACT_SUSPEND);
+ suspend_randomness();
+
/* XXX
* Flag to disk drivers that they should "power down" the disk
* when we get to DVACT_POWERDOWN.
config_suspend_all(DVACT_RESUME);
splx(s);
+ resume_randomness(); /* force RNG upper level reseed */
bufq_restart();
config_suspend_all(DVACT_WAKEUP);