summaryrefslogtreecommitdiff
path: root/sys/dev/softraid.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/softraid.c')
-rw-r--r--sys/dev/softraid.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index 1eee7e40c93..a30870140e2 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.260 2011/12/26 14:54:52 jsing Exp $ */
+/* $OpenBSD: softraid.c,v 1.261 2011/12/28 16:02:45 jsing Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
@@ -3389,6 +3389,7 @@ sr_ioctl_installboot(struct sr_softc *sc, struct bioc_installboot *bb)
if (!strncmp(dk->dk_name, bb->bb_dev, sizeof(bb->bb_dev)))
break;
if (dk == NULL || dk->dk_label == NULL ||
+ (dk->dk_flags & DKF_LABELVALID) == 0 ||
bcmp(dk->dk_label->d_uid, &duid, sizeof(duid)) == 0) {
printf("%s: failed to get DUID for softraid volume!\n",
DEVNAME(sd->sd_sc));