aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2021-12-13 19:02:16 +0000
committerWarner Losh <imp@FreeBSD.org>2023-01-24 21:49:18 +0000
commit26d6cf83968c388a80fb0fe1f06edfddf36177bd (patch)
treeb019e9d09a0ecb7392ccb974953a7418081416c4
parente006859bce01b2f10349a804cade3688f40557e3 (diff)
downloadsrc-26d6cf83968c388a80fb0fe1f06edfddf36177bd.tar.gz
src-26d6cf83968c388a80fb0fe1f06edfddf36177bd.zip
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)
-rw-r--r--stand/common/module.c9
1 files changed, 8 insertions, 1 deletions
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;