diff options
author | stsp <stsp@openbsd.org> | 2015-10-28 18:55:27 +0000 |
---|---|---|
committer | stsp <stsp@openbsd.org> | 2015-10-28 18:55:27 +0000 |
commit | a448f8575a87f52f639de83592cae5d01fdf5cc5 (patch) | |
tree | fa7fce01522a0cca49c650af50d715edb1d1388d /usr.sbin/installboot | |
parent | use an rb tree for finding requests. from Dimitris Papastamos (diff) | |
download | wireguard-openbsd-a448f8575a87f52f639de83592cae5d01fdf5cc5.tar.xz wireguard-openbsd-a448f8575a87f52f639de83592cae5d01fdf5cc5.zip |
In sr_install_bootblk for i386, don't clobber 'part' in non-GPT case.
Found the hard way by reyk@.
stupid mistake stsp@
ok reyk@
Diffstat (limited to 'usr.sbin/installboot')
-rw-r--r-- | usr.sbin/installboot/i386_softraid.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/installboot/i386_softraid.c b/usr.sbin/installboot/i386_softraid.c index ff3d10c41b6..b011a73e038 100644 --- a/usr.sbin/installboot/i386_softraid.c +++ b/usr.sbin/installboot/i386_softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i386_softraid.c,v 1.5 2015/10/25 21:21:15 stsp Exp $ */ +/* $OpenBSD: i386_softraid.c,v 1.6 2015/10/28 18:55:27 stsp Exp $ */ /* * Copyright (c) 2012 Joel Sing <jsing@openbsd.org> * @@ -48,7 +48,7 @@ sr_install_bootblk(int devfd, int vol, int disk) struct partition *pp; uint32_t poffset; char *dev; - char part; + char part, efipart; int diskfd; /* Get device name for this disk/chunk. */ @@ -87,9 +87,9 @@ sr_install_bootblk(int devfd, int vol, int disk) if (dl.d_type == 0) warnx("disklabel type unknown"); - part = findgptefisys(diskfd, &dl); - if (part != -1) { - write_efisystem(&dl, (char)part); + efipart = findgptefisys(diskfd, &dl); + if (efipart != -1) { + write_efisystem(&dl, (char)efipart); return; } |