mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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.
This commit is contained in:
parent
fcb164742b
commit
e692517517
2 changed files with 5 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -470,11 +470,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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue