diff options
| author | 2012-01-21 16:30:10 +0000 | |
|---|---|---|
| committer | 2012-01-21 16:30:10 +0000 | |
| commit | 517c937c9d1edf12896c0c8cbe07f36ef21a30a2 (patch) | |
| tree | d70081faa678b8ab57b0d09ff71b82d2cd216108 /sys/kern/subr_disk.c | |
| parent | Split sr_uuid_print() into two functions - one that formats and one that (diff) | |
| download | wireguard-openbsd-517c937c9d1edf12896c0c8cbe07f36ef21a30a2.tar.xz wireguard-openbsd-517c937c9d1edf12896c0c8cbe07f36ef21a30a2.zip | |
Do not wait for DKF_OPENED to be set if we never actually created a
callback for this disk.
Fixes an issue found by krw on macppc.
ok krw@
Diffstat (limited to 'sys/kern/subr_disk.c')
| -rw-r--r-- | sys/kern/subr_disk.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index acf29011f81..e21ce2d92fa 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_disk.c,v 1.140 2012/01/16 16:29:49 jsing Exp $ */ +/* $OpenBSD: subr_disk.c,v 1.141 2012/01/21 16:30:10 jsing Exp $ */ /* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */ /* @@ -1176,7 +1176,8 @@ setroot(struct device *bootdv, int part, int exitflags) /* Ensure that all disk attach callbacks have completed. */ do { TAILQ_FOREACH(dk, &disklist, dk_link) { - if ((dk->dk_flags & DKF_OPENED) == 0) { + if (dk->dk_devno != NODEV && + (dk->dk_flags & DKF_OPENED) == 0) { tsleep(dk, 0, "dkopen", hz); slept++; break; |
