aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon J. Gerraty <sjg@FreeBSD.org>2022-02-24 05:26:41 +0000
committerWarner Losh <imp@FreeBSD.org>2023-01-24 21:49:20 +0000
commit6a930269fc7667c931bafe889807c003f182dd73 (patch)
treeca3b76d5691df97d9d783f947ad894d8af3f0633
parent5c1d95a60b547508dec61802d4db1284744d44f4 (diff)
downloadsrc-6a930269fc7667c931bafe889807c003f182dd73.tar.gz
src-6a930269fc7667c931bafe889807c003f182dd73.zip
Handle MODULE_VERBOSE_TWIDDLE in module_verbose_set
If module_verbose is set to a value below MODULE_VERBOSE_TWIDDLE call twiddle_divisor(UINT_MAX). This makes more sense here than when we are loading the kernel. Sponsored by: Juniper Networks, Inc. (cherry picked from commit e6925175174b1a7d7b5aef035ec684b2d5f628b9)
-rw-r--r--stand/common/console.c5
-rw-r--r--stand/common/load_elf.c5
2 files changed, 5 insertions, 5 deletions
diff --git a/stand/common/console.c b/stand/common/console.c
index 08d0dc40e3a9..0e8afb477ee8 100644
--- a/stand/common/console.c
+++ b/stand/common/console.c
@@ -27,6 +27,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include <sys/param.h>
#include <stand.h>
#include <string.h>
@@ -58,6 +59,10 @@ module_verbose_set(struct env_var *ev, int flags, const void *value)
return (CMD_ERROR);
}
module_verbose = (int)v;
+ if (module_verbose < MODULE_VERBOSE_TWIDDLE) {
+ /* A hack for now; we do not want twiddling */
+ twiddle_divisor(UINT_MAX);
+ }
env_setenv(ev->ev_name, flags | EV_NOHOOK, value, NULL, NULL);
return (CMD_OK);
diff --git a/stand/common/load_elf.c b/stand/common/load_elf.c
index 99ebace012ea..363da4756c1d 100644
--- a/stand/common/load_elf.c
+++ b/stand/common/load_elf.c
@@ -469,11 +469,6 @@ __elfN(loadfile_raw)(char *filename, uint64_t dest,
} else if (module_verbose > MODULE_VERBOSE_SILENT)
printf("%s ", filename);
- if (module_verbose < MODULE_VERBOSE_TWIDDLE) {
- /* A hack for now; we do not want twiddling */
- twiddle_divisor(UINT_MAX);
- }
-
fp->f_size = __elfN(loadimage)(fp, &ef, dest);
if (fp->f_size == 0 || fp->f_addr == 0)
goto ioerr;