git: 6a930269fc76 - stable/13 - Handle MODULE_VERBOSE_TWIDDLE in module_verbose_set
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 24 Jan 2023 22:10:21 UTC
The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6a930269fc7667c931bafe889807c003f182dd73 commit 6a930269fc7667c931bafe889807c003f182dd73 Author: Simon J. Gerraty <sjg@FreeBSD.org> AuthorDate: 2022-02-24 05:26:41 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2023-01-24 21:49:20 +0000 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) --- stand/common/console.c | 5 +++++ stand/common/load_elf.c | 5 ----- 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;