Subject: Re: Convert kernel printf() to aprint_*() or log()
To: Matt Fleming <mjf@NetBSD.org>
From: Allen Briggs <briggs@netbsd.org>
List: tech-kern
Date: 03/15/2007 10:15:47
On Thu, Mar 15, 2007 at 02:04:57PM +0000, Matt Fleming wrote:
> Code should be free to set AB_QUIET and have nothing printed to the
> console. This is an abuse (printing to the console regardless of the
> value of AB_QUIET).

AB_QUIET is not silent.  IIRC, AB_QUIET means something like, have
a basic list of devices, but nothing extra.  So instead of something
like:
mainbus0 (root)
mainbus0: scanning 0x9ec00 to 0x9eff0 for MP signature
mainbus0: scanning 0x9e800 to 0x9ebf0 for MP signature
mainbus0: scanning 0xf0000 to 0xffff0 for MP signature
mainbus0: MP floating pointer found in bios at 0xfe710
mainbus0: MP config table at 0xf0000, 572 bytes long
cpu0 at mainbus0: apid 0 (boot processor)
cpu1 at mainbus0: apid 6 (application processor)
cpu2 at mainbus0: apid 1 (application processor)
cpu3 at mainbus0: apid 7 (application processor)
ioapic0 at mainbus0 apid 8 (I/O APIC)
ioapic0: pa 0xfec00000, virtual wire mode, version 20, 24 pins
ioapic0: misconfigured as apic 0
ioapic0: can't remap to apid 8
ioapic1 at mainbus0 apid 9 (I/O APIC)
...

you might have something like:
mainbus0 (root)
cpu0 at mainbus0
cpu1 at mainbus0
cpu2 at mainbus0
cpu3 at mainbus0
ioapic0 at mainbus0
ioapic1 at mainbus0
...

I think the idea was to have something that's less detailed for when
you're booting an embedded system and want (a) a quick boot, and (b)
a clean boot.  But I wasn't around in the BSD/OS community when these
functions were introduced there (according to the man page's history
section).

If you really want no output, there's AB_SILENT.

-allen

-- 
Allen Briggs  |  http://www.ninthwonder.com/~briggs/  |  briggs@ninthwonder.com