svn commit: r341651 - head/stand/i386/loader

Ian Lepore ian at FreeBSD.org
Thu Dec 6 20:28:10 UTC 2018


Author: ian
Date: Thu Dec  6 20:28:09 2018
New Revision: 341651
URL: https://svnweb.freebsd.org/changeset/base/341651

Log:
  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@

Modified:
  head/stand/i386/loader/main.c

Modified: head/stand/i386/loader/main.c
==============================================================================
--- head/stand/i386/loader/main.c	Thu Dec  6 20:15:54 2018	(r341650)
+++ head/stand/i386/loader/main.c	Thu Dec  6 20:28:09 2018	(r341651)
@@ -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) {


More information about the svn-src-all mailing list