$ sudo freshclam --quiet
ClamAV update process started at Mon Jul 8 15:28:32 2024
daily.cld database is up-to-date (version: 27330, sigs: 2064003, f-level: 90, builder: raynman)
main.cvd database is up-to-date (version: 62, sigs: 6647427, f-level: 90, builder: sigmgr)
bytecode.cld database is up-to-date (version: 335, sigs: 86, f-level: 90, builder: raynman)
I investigated this some more and found that there seem to be two mechanisms for implementing --quiet switches in place. One uses mprintf() and the mprintf_quiet global variable, the other uses the msg_callback() function pointer and the respective cli_*msg() frontends that call the callback to pass the message on to logg(), if applicable. freshclam initializes this callback mechanism, but then calls logg() directly and hence --quiet does not filter out anything.
Commit https://github.com/Cisco-Talos/clamav/commit/a21cc6dcd7f93ad7418ea6c2f1e01612e23fc36e broke
freshclam --quiet
. It now prints out the same messages as if it was called without that switch:I investigated this some more and found that there seem to be two mechanisms for implementing
--quiet
switches in place. One usesmprintf()
and themprintf_quiet
global variable, the other uses themsg_callback()
function pointer and the respectivecli_*msg()
frontends that call the callback to pass the message on tologg()
, if applicable.freshclam
initializes this callback mechanism, but then callslogg()
directly and hence--quiet
does not filter out anything.