git: 5c1d95a60b54 - stable/13 - module_verbose should also affect non-ELF modules.

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

URL: https://cgit.FreeBSD.org/src/commit/?id=5c1d95a60b547508dec61802d4db1284744d44f4

commit 5c1d95a60b547508dec61802d4db1284744d44f4
Author:     Simon J. Gerraty <sjg@FreeBSD.org>
AuthorDate: 2022-02-14 18:44:46 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-01-24 21:49:20 +0000

    module_verbose should also affect non-ELF modules.
    
    (cherry picked from commit 01b0c35984c64dfbfb45abf26ad67df4761a2df5)
---
 stand/common/module.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/stand/common/module.c b/stand/common/module.c
index bf95fbc59ea3..43c04728b4fa 100644
--- a/stand/common/module.c
+++ b/stand/common/module.c
@@ -605,7 +605,8 @@ file_load_dependencies(struct preloaded_file *base_file)
 		verinfo = (struct mod_depend*)md->md_data;
 		dmodname = (char *)(verinfo + 1);
 		if (file_findmodule(NULL, dmodname, verinfo) == NULL) {
-			printf("loading required module '%s'\n", dmodname);
+			if (module_verbose > MODULE_VERBOSE_SILENT)
+				printf("loading required module '%s'\n", dmodname);
 			error = mod_load(dmodname, verinfo, 0, NULL);
 			if (error)
 				break;
@@ -797,7 +798,8 @@ file_loadraw(const char *fname, char *type, int insert)
 	if (archsw.arch_loadaddr != NULL)
 		loadaddr = archsw.arch_loadaddr(LOAD_RAW, name, loadaddr);
 
-	printf("%s ", name);
+	if (module_verbose > MODULE_VERBOSE_SILENT)
+		printf("%s ", name);
 
 	laddr = loadaddr;
 	for (;;) {
@@ -819,7 +821,8 @@ file_loadraw(const char *fname, char *type, int insert)
 		laddr += got;
 	}
 
-	printf("size=%#jx\n", (uintmax_t)(laddr - loadaddr));
+	if (module_verbose > MODULE_VERBOSE_SILENT)
+		printf("size=%#jx\n", (uintmax_t)(laddr - loadaddr));
 #ifdef LOADER_VERIEXEC_VECTX
 	verror = vectx_close(vctx, VE_MUST, __func__);
 	if (verror) {