aboutsummaryrefslogtreecommitdiff
path: root/stand/libsa/gpt.c
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2017-12-15 23:16:53 +0000
committerWarner Losh <imp@FreeBSD.org>2017-12-15 23:16:53 +0000
commit65628439974f33dd0e1fccafa9bd0a93372e9d8f (patch)
tree708bacd14fbee134f4d60dcc9a2b0a4d698fe370 /stand/libsa/gpt.c
parent9a7c08499352b2453e67d64bc866dd11000a2925 (diff)
downloadsrc-65628439974f33dd0e1fccafa9bd0a93372e9d8f.tar.gz
src-65628439974f33dd0e1fccafa9bd0a93372e9d8f.zip
Remove the 'mini libstand in libstand' that util.[ch] provided. These
weren't needed, and their existance interfered with things in subtle ways. One of these subtle ways was that malloc could be different based on what files were included when (even within the same .c file, it turns out). Move to a single malloc implementation as well by adding the calls to setheap() to gptboot.c and zfsboot.c. Once upon a time, these boot loaders strove to not use libstand. However, with the proliferation of features, that striving is too hard for too little gain and lead to stupid mistakes. This fixes the GELI-enabled (but not even using) boot environment. The geli routines were calling libstand malloc but zfsboot.c and gptboot.c were using the mini libstand malloc, so this failed when we tried to probe for GELI partitions. Subtle changes in build order when moving to self-contained stand build in r326593 toggled what it used from one type to another due to odd nesting of the zfs implementation code that differed subtly between zfsloader and zfsboot. Sponsored by: Netflix
Notes
Notes: svn path=/head/; revision=326887
Diffstat (limited to 'stand/libsa/gpt.c')
-rw-r--r--stand/libsa/gpt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stand/libsa/gpt.c b/stand/libsa/gpt.c
index 7ab3fc6d04e0..900f2d5c79f2 100644
--- a/stand/libsa/gpt.c
+++ b/stand/libsa/gpt.c
@@ -34,9 +34,9 @@ __FBSDID("$FreeBSD$");
#error gpt.c works only for little endian architectures
#endif
+#include "stand.h"
#include "crc32.h"
#include "drv.h"
-#include "util.h"
#include "gpt.h"
static struct gpt_hdr hdr_primary, hdr_backup, *gpthdr;