git: 26d6cf83968c - stable/13 - loader:prefix is only used for LOADER_VERIEXEC

From: Warner Losh <imp_at_FreeBSD.org>
Date: Tue, 24 Jan 2023 22:10:02 UTC
The branch stable/13 has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=26d6cf83968c388a80fb0fe1f06edfddf36177bd

commit 26d6cf83968c388a80fb0fe1f06edfddf36177bd
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2021-12-13 19:02:16 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-01-24 21:49:18 +0000

    loader:prefix is only used for LOADER_VERIEXEC
    
    Only define and set prefix when LOADER_VERIEXEC is defined. It's only
    used by the LOADER_VERIEXEC code.
    
    Sponsored by:           Netflix
    
    (cherry picked from commit 5c68a21697027311892481d6d615a5d6e5b47433)
---
 stand/common/module.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/stand/common/module.c b/stand/common/module.c
index fdc65541b1a5..8e9e72c8a004 100644
--- a/stand/common/module.c
+++ b/stand/common/module.c
@@ -112,7 +112,9 @@ command_load(int argc, char *argv[])
 {
 	struct preloaded_file *fp;
 	char	*typestr;
+#ifdef LOADER_VERIEXEC
 	char	*prefix;
+#endif
 	char	*skip;
 	int		dflag, dofile, dokld, ch, error;
 
@@ -124,7 +126,10 @@ command_load(int argc, char *argv[])
 		command_errmsg = "no filename specified";
 		return (CMD_CRIT);
 	}
-	prefix = skip = NULL;
+#ifdef LOADER_VERIEXEC
+	prefix = NULL;
+#endif
+	skip = NULL;
 	while ((ch = getopt(argc, argv, "dkp:s:t:")) != -1) {
 		switch(ch) {
 		case 'd':
@@ -133,9 +138,11 @@ command_load(int argc, char *argv[])
 		case 'k':
 			dokld = 1;
 			break;
+#ifdef LOADER_VERIEXEC
 		case 'p':
 			prefix = optarg;
 			break;
+#endif
 		case 's':
 			skip = optarg;
 			break;