Document the "aprint" autoconfiguration message printing routines.

This commit is contained in:
thorpej 2002-12-31 17:49:14 +00:00
parent 3770328cab
commit e0de80eb25
3 changed files with 74 additions and 7 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: mi,v 1.507 2002/12/24 07:26:05 jdc Exp $
# $NetBSD: mi,v 1.508 2002/12/31 17:49:15 thorpej Exp $
./usr/bin/addr2line comp-debug-bin
./usr/bin/ar comp-util-bin
./usr/bin/as comp-util-bin
@ -3281,6 +3281,10 @@
./usr/share/man/cat9/VREF.0 comp-sys-catman
./usr/share/man/cat9/access.0 comp-sys-catman
./usr/share/man/cat9/altq.0 comp-sys-catman
./usr/share/man/cat9/aprint_debug.0 comp-sys-catman
./usr/share/man/cat9/aprint_naive.0 comp-sys-catman
./usr/share/man/cat9/aprint_normal.0 comp-sys-catman
./usr/share/man/cat9/aprint_verbose.0 comp-sys-catman
./usr/share/man/cat9/arc4random.0 comp-sys-catman
./usr/share/man/cat9/arp.0 comp-sys-catman
./usr/share/man/cat9/arp_ifinit.0 comp-sys-catman
@ -6271,6 +6275,10 @@
./usr/share/man/man9/VREF.9 comp-sys-man
./usr/share/man/man9/access.9 comp-sys-man
./usr/share/man/man9/altq.9 comp-sys-man
./usr/share/man/man9/aprint_debug.9 comp-sys-man
./usr/share/man/man9/aprint_naive.9 comp-sys-man
./usr/share/man/man9/aprint_normal.9 comp-sys-man
./usr/share/man/man9/aprint_verbose.9 comp-sys-man
./usr/share/man/man9/arc4random.9 comp-sys-man
./usr/share/man/man9/arp.9 comp-sys-man
./usr/share/man/man9/arp_ifinit.9 comp-sys-man

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.131 2002/10/23 06:15:59 gmcgarry Exp $
# $NetBSD: Makefile,v 1.132 2002/12/31 17:49:14 thorpej Exp $
# Makefile for section 9 (kernel function and variable) manual pages.
@ -225,7 +225,9 @@ MLINKS+=knote.9 KNOTE.9 \
MLINKS+=kprintf.9 printf.9 kprintf.9 sprintf.9 kprintf.9 snprintf.9 \
kprintf.9 vprintf.9 kprintf.9 vsprintf.9 kprintf.9 vsnprintf.9 \
kprintf.9 uprintf.9 kprintf.9 ttyprintf.9 \
kprintf.9 tprintf.9 kprintf.9 tprintf_open.9 kprintf.9 tprintf_close.9
kprintf.9 tprintf.9 kprintf.9 tprintf_open.9 kprintf.9 tprintf_close.9 \
kprintf.9 aprint_normal.9 kprintf.9 aprint_naive.9 \
kprintf.9 aprint_verbose.9 kprintf.9 aprint_debug.9
MLINKS+=kthread.9 kthread_exit.9 \
kthread.9 kthread_create.9 \
kthread.9 kthread_create1.9

View File

@ -1,10 +1,10 @@
.\" $NetBSD: kprintf.9,v 1.13 2002/10/14 13:43:25 wiz Exp $
.\" $NetBSD: kprintf.9,v 1.14 2002/12/31 17:49:15 thorpej Exp $
.\"
.\" Copyright (c) 1998 The NetBSD Foundation, Inc.
.\" Copyright (c) 1998, 2002 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
.\" by Jeremy Cooper.
.\" by Jeremy Cooper and by Jason R. Thorpe.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
@ -34,7 +34,7 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd September 1, 1998
.Dd December 31, 2002
.Dt KPRINTF 9
.Os
.Sh NAME
@ -61,6 +61,14 @@
.Fn "tprintf" "tpr_t tpr" "const char *format" "..."
.Ft void
.Fn "tprintf_close" "tpr_t tpr"
.Ft void
.Fn "aprint_normal" "const char *format" "..."
.Ft void
.Fn "aprint_naive" "const char *format" "..."
.Ft void
.Fn "aprint_verbose" "const char *format" "..."
.Ft void
.Fn "aprint_debug" "const char *format" "..."
.Sh DESCRIPTION
The
.Fn printf
@ -97,6 +105,46 @@ A handle is acquired by calling
with the target process as an argument.
This handle must be closed with a matching call to
.Fn tprintf_close .
.Pp
The functions
.Fn aprint_normal ,
.Fn aprint_naive ,
.Fn aprint_verbose ,
and
.Fn aprint_debug
are intended to be used to print autoconfiguration messages, and change
their behavior based on flags in the
.Dq boothowto
variable:
.Bl -tag -width "aprint_verbose()"
.It Fn aprint_normal
Sends to the console unless
.Dv AB_QUIET
is set. Always sends to the log.
.It Fn aprint_naive
Sends to the console only if
.Dv AB_QUIET
is set. Never sends to the log.
.It Fn aprint_verbose
Sends to the console only if
.Dv AB_VERBOSE
is set. Always sends to the log.
.It Fn aprint_debug
Sends to the console and the log only if
.Dv AB_DEBUG
is set.
.El
.Pp
If
.Dv AB_SILENT
is set, none of the autoconfiguration message printing routines send output
to the console.
The
.Dv AB_VERBOSE
and
.Dv AB_DEBUG
flags override
.Dv AB_SILENT .
.Sh RETURN VALUES
The
.Fn snprintf
@ -134,6 +182,15 @@ For the functionality provided by the former
.Li %b
format string, see
.Xr bitmask_snprintf 9 .
.Pp
The
.Fn aprint_normal ,
.Fn aprint_naive ,
.Fn aprint_verbose ,
and
.Fn aprint_debug
functions first appeared in
.Bsx .
.Sh BUGS
The
.Fn uprintf