diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-12-31 22:58:41 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-12-31 22:58:41 +0000 |
commit | 784a3a47570d0c335a8263a3bb82e181eddd6ced (patch) | |
tree | 823dc1c016f48bb68c5754f7c79c94554dc3cc6d | |
parent | 1bf4ba651d75c30a59392778bc030c1bad295847 (diff) |
Reintroduce the code that puts the drive into standby in shutdown, but
only do this if we're going to power down the machine.
"My god, it is a 3 line diff. Commit it before it gets bigger!" deraadt@
-rw-r--r-- | sys/dev/ata/wd.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/ata/wd.c b/sys/dev/ata/wd.c index 1251a8370e5..ae526354813 100644 --- a/sys/dev/ata/wd.c +++ b/sys/dev/ata/wd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wd.c,v 1.96 2010/12/30 20:29:13 kettenis Exp $ */ +/* $OpenBSD: wd.c,v 1.97 2010/12/31 22:58:40 kettenis Exp $ */ /* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */ /* @@ -76,6 +76,7 @@ #include <sys/proc.h> #include <sys/vnode.h> #include <sys/dkio.h> +#include <sys/reboot.h> #include <uvm/uvm_extern.h> @@ -1240,4 +1241,6 @@ wd_shutdown(void *arg) struct wd_softc *wd = arg; wd_flushcache(wd, AT_POLL); + if (boothowto & RB_POWERDOWN) + wd_standby(wd, AT_POLL); } |