Don't reference zfs-specific variables if LOADER_ZFS_SUPPORT is undefined

because the variables will be undefined too.

Reported by:	sjg@
Pointy hat:	ian@
This commit is contained in:
Ian Lepore 2018-12-06 20:28:09 +00:00
parent efc4145a6e
commit 9631ae8267

View File

@ -195,11 +195,14 @@ main(void)
*/
#define LEGACY_GELI_ARGS_SIZE 260 /* This can never change */
#ifdef LOADER_ZFS_SUPPORT
if (zargs != NULL) {
if (zargs->size > offsetof(struct zfs_boot_args, gelidata)) {
gbdata = &zargs->gelidata;
}
} else if ((kargs->bootflags & KARGS_FLAGS_EXTARG) != 0) {
} else
#endif /* LOADER_ZFS_SUPPORT */
if ((kargs->bootflags & KARGS_FLAGS_EXTARG) != 0) {
gargs = (struct geli_boot_args *)(kargs + 1);
if ((kargs->bootflags & KARGS_FLAGS_GELI) ||
gargs->size == LEGACY_GELI_ARGS_SIZE) {