summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_disk.c
diff options
context:
space:
mode:
authorjsing <jsing@openbsd.org>2010-11-24 15:31:34 +0000
committerjsing <jsing@openbsd.org>2010-11-24 15:31:34 +0000
commit007378300fc42a65adb3986ab4ebbf234b9b4fdd (patch)
tree5e3a726c08143c11b97b8c6b0f882acb2d5773c1 /sys/kern/subr_disk.c
parentWhen dealing with disklabel UIDs (DUIDs) be specific and consistent with (diff)
downloadwireguard-openbsd-007378300fc42a65adb3986ab4ebbf234b9b4fdd.tar.xz
wireguard-openbsd-007378300fc42a65adb3986ab4ebbf234b9b4fdd.zip
Ensure that hw.disknames gets updated whenever a disklabel is set, since
the disklabel UID may have changed. ok krw@ deraadt@
Diffstat (limited to 'sys/kern/subr_disk.c')
-rw-r--r--sys/kern/subr_disk.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c
index 9c255d26807..ed0bb8446f0 100644
--- a/sys/kern/subr_disk.c
+++ b/sys/kern/subr_disk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_disk.c,v 1.113 2010/11/18 21:13:19 miod Exp $ */
+/* $OpenBSD: subr_disk.c,v 1.114 2010/11/24 15:31:34 jsing Exp $ */
/* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */
/*
@@ -668,6 +668,9 @@ setdisklabel(struct disklabel *olp, struct disklabel *nlp, u_int openmask)
nlp->d_checksum = 0;
nlp->d_checksum = dkcksum(nlp);
*olp = *nlp;
+
+ disk_change = 1;
+
return (0);
}