summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2015-09-09 19:43:26 +0000
committerkrw <krw@openbsd.org>2015-09-09 19:43:26 +0000
commit8c1fe579dbe926c35f6969da3029ce2337068b8e (patch)
tree4b53cbecf2d0028a81ef39a3dced820fd43a5ff3
parentCheck handshake_func against NULL rather than 0, since it is a function (diff)
downloadwireguard-openbsd-8c1fe579dbe926c35f6969da3029ce2337068b8e.tar.xz
wireguard-openbsd-8c1fe579dbe926c35f6969da3029ce2337068b8e.zip
No need to set d_npartitions in readdoslabel() or readgptlabel().
It has already been initialized in the MD readdisklabel() routines when they call initdisklabel(). ok deraadt@
-rw-r--r--sys/kern/subr_disk.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c
index 9a9d1acbbab..ea7b2ad5202 100644
--- a/sys/kern/subr_disk.c
+++ b/sys/kern/subr_disk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_disk.c,v 1.200 2015/09/01 01:06:35 deraadt Exp $ */
+/* $OpenBSD: subr_disk.c,v 1.201 2015/09/09 19:43:26 krw Exp $ */
/* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */
/*
@@ -482,10 +482,6 @@ donot:
}
notmbr:
- if (partoffp == NULL)
- /* Must not modify *lp when partoffp is set. */
- lp->d_npartitions = MAXPARTITIONS;
-
if (n == 0 && sector == DOSBBSECTOR && ourpart == -1) {
u_int16_t fattest;
@@ -815,10 +811,6 @@ readgptlabel(struct buf *bp, void (*strat)(struct buf *),
} else
spoofonly = 1; /* No disklabel to read from disk. */
- if (!partoffp)
- /* Must not modify *lp when partoffp is set. */
- lp->d_npartitions = MAXPARTITIONS;
-
free(gp, M_DEVBUF, gpsz);
/* record the OpenBSD partition's placement for the caller */