diff options
author | 2015-09-11 08:06:48 +0000 | |
---|---|---|
committer | 2015-09-11 08:06:48 +0000 | |
commit | 24b6e0c2dcf318209a0e85f744bae61616307270 (patch) | |
tree | 944aa37e189fe45946cb7302ae5a03210e43c8fe /sys/kern/subr_disk.c | |
parent | Remove redundant assignment (diff) | |
download | wireguard-openbsd-24b6e0c2dcf318209a0e85f744bae61616307270.tar.xz wireguard-openbsd-24b6e0c2dcf318209a0e85f744bae61616307270.zip |
Don't spoof GPT OpenBSD partitions. Simply record and use the first one
found, as is done in MBR processing.
Diffstat (limited to 'sys/kern/subr_disk.c')
-rw-r--r-- | sys/kern/subr_disk.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index 71f290b9db3..850abe37ebf 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -1,4 +1,4 @@ -/* $OpenBSD: subr_disk.c,v 1.204 2015/09/10 16:30:23 krw Exp $ */ +/* $OpenBSD: subr_disk.c,v 1.205 2015/09/11 08:06:48 krw Exp $ */ /* $NetBSD: subr_disk.c,v 1.17 1996/03/16 23:17:08 christos Exp $ */ /* @@ -824,7 +824,9 @@ readgptlabel(struct buf *bp, void (*strat)(struct buf *), uuid_dec_le(&gp_tmp->gp_type, &uuid_part); if (!memcmp(&uuid_part, &uuid_openbsd, sizeof(struct uuid))) { - ourpart = i; /* found it */ + if (ourpart == -1) + ourpart = i; /* found it */ + continue; /* Do *NOT* spoof OpenBSD partitions! */ } /* |