From e9f3a15d639bbf0232f7dcbb1ef57133a69b4b21 Mon Sep 17 00:00:00 2001 From: Maxim Sobolev Date: Fri, 5 Mar 2010 03:37:42 +0000 Subject: [PATCH] Don't spam dmesg with "registered firmware ..." when module is compiled into kernel, unless there is a verbose boot flag set. There is no real need to have this information printed. MFC after: 1 week --- sys/dev/ispfw/ispfw.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/sys/dev/ispfw/ispfw.c b/sys/dev/ispfw/ispfw.c index 9fe80315477c..b351aee1d576 100644 --- a/sys/dev/ispfw/ispfw.c +++ b/sys/dev/ispfw/ispfw.c @@ -142,6 +142,13 @@ static int isp_2500_multi_loaded; #endif #define ISPFW_VERSION 1 + +#if !defined(KLD_MODULE) +#define ISPFW_KLD 0 +#else +#define ISPFW_KLD 1 +#endif + #define RMACRO(token) do { \ if (token##_loaded) \ break; \ @@ -153,7 +160,9 @@ static int isp_2500_multi_loaded; break; \ } \ token##_loaded++; \ - printf("%s: registered firmware <%s>\n", MODULE_NAME, #token); \ + if (bootverbose || ISPFW_KLD) \ + printf("%s: registered firmware <%s>\n", MODULE_NAME, \ + #token); \ } while (0) #define UMACRO(token) do { \ @@ -165,7 +174,9 @@ static int isp_2500_multi_loaded; break; \ } \ token##_loaded--; \ - printf("%s: unregistered firmware <%s>\n", MODULE_NAME, #token);\ + if (bootverbose || ISPFW_KLD) \ + printf("%s: unregistered firmware <%s>\n", MODULE_NAME, \ + #token); \ } while (0) static void