diff options
author | 2011-11-11 12:28:37 +0000 | |
---|---|---|
committer | 2011-11-11 12:28:37 +0000 | |
commit | a7881b42a067bbf1f6e9d097edba268ba0c716a4 (patch) | |
tree | f315ed79a59533ca31b0d1f427c8033e6300d263 /sys/dev/softraid.c | |
parent | Allow 64bit -> arm cross compilation as it appears safe (amd64 -> arm at least) (diff) | |
download | wireguard-openbsd-a7881b42a067bbf1f6e9d097edba268ba0c716a4.tar.xz wireguard-openbsd-a7881b42a067bbf1f6e9d097edba268ba0c716a4.zip |
When setting up a bootable softraid volume, do not try to save the boot
blocks or boot loader to chunks that are not online.
ok mikeb@
Diffstat (limited to 'sys/dev/softraid.c')
-rw-r--r-- | sys/dev/softraid.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index c2791904662..72d3f9f53dd 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.252 2011/11/08 18:02:37 krw Exp $ */ +/* $OpenBSD: softraid.c,v 1.253 2011/11/11 12:28:37 jsing Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -3444,6 +3444,10 @@ sr_ioctl_installboot(struct sr_softc *sc, struct bioc_installboot *bb) for (i = 0; i < sd->sd_meta->ssdi.ssd_chunk_no; i++) { chunk = sd->sd_vol.sv_chunks[i]; + if (chunk->src_meta.scm_status != BIOC_SDONLINE && + chunk->src_meta.scm_status != BIOC_SDREBUILD) + continue; + if (i < SR_MAX_BOOT_DISKS) bcopy(chunk->src_duid, &sbm->sbm_boot_duid[i], sizeof(sbm->sbm_boot_duid[i])); |