HomeFreeBSD

Reduce additional console output when muted

Description

Reduce additional console output when muted

While trying to resolve some custom installer issues, we found that
using conscontrol(8) or setting kern.always_console_output=0 in
sysctrl.conf(5) did not always prevent console output. This is in part
because some areas of the kernel were outputting to the console device
without checking the status of the setting. These changes enforce
checking of the value in both locations where console output occurs from
kernel and init(8) based callouts.

Details on changes:

  • Moves check for mute to earlier in sequence to silence kernel output even if EARLY_PRINTF is defined.
  • Modifies call prf_putbuf() and prf_putchar() in subr_prf.c to strip TOCONS flag if muting is enabled, to honor the setting at print level.

This is a rather simple change, which increases areas where flags to
silence console output are honored. We have been running this change
since 10/23 in-house without issue. (Patching prior to 14.0 also
required making cn_mute non-static.)

Signed-off-by: Craig.Woodward@redcom.com
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1407

Details

Provenance
Craig Woodward <Craig.Woodward@redcom.com>Authored on Sep 3 2024, 6:42 PM
impCommitted on Fri, Nov 29, 9:38 PM
Parents
rG4d12c7b9df66: cu.1: describe better + tag spdx
Branches
Unknown
Tags
Unknown

Event Timeline