-/* $OpenBSD: i386_installboot.c,v 1.14 2015/10/18 17:24:25 rpe Exp $ */
+/* $OpenBSD: i386_installboot.c,v 1.15 2015/10/25 21:21:15 stsp Exp $ */
/* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */
/*
static void devread(int, void *, daddr_t, size_t, char *);
static u_int findopenbsd(int, struct disklabel *);
-static int findgptefisys(int, struct disklabel *);
static int getbootparams(char *, int, struct disklabel *);
static char *loadproto(char *, long *);
return ((u_int)-1);
}
-static int
+int
findgptefisys(int devfd, struct disklabel *dl)
{
struct gpt_partition gp[NGPTPARTITIONS];
-/* $OpenBSD: i386_installboot.h,v 1.3 2015/10/07 03:06:46 krw Exp $ */
+/* $OpenBSD: i386_installboot.h,v 1.4 2015/10/25 21:21:15 stsp Exp $ */
/*
* Copyright (c) 2011 Joel Sing <jsing@openbsd.org>
* Copyright (c) 2010 Otto Moerbeek <otto@openbsd.org>
void pbr_set_symbols(char *, char *, struct sym_data *);
void sym_set_value(struct sym_data *, char *, u_int32_t);
void write_bootblocks(int, char *, struct disklabel *);
+int findgptefisys(int, struct disklabel *);
void write_efisystem(struct disklabel *, char);
-/* $OpenBSD: i386_softraid.c,v 1.4 2015/10/03 16:56:52 krw Exp $ */
+/* $OpenBSD: i386_softraid.c,v 1.5 2015/10/25 21:21:15 stsp Exp $ */
/*
* Copyright (c) 2012 Joel Sing <jsing@openbsd.org>
*
if (dl.d_type == 0)
warnx("disklabel type unknown");
+ part = findgptefisys(diskfd, &dl);
+ if (part != -1) {
+ write_efisystem(&dl, (char)part);
+ return;
+ }
+
/* Determine poffset and set symbol value. */
pp = &dl.d_partitions[part - 'a'];
if (pp->p_offseth != 0)