Document aprint*_dev and aprint*_ifnet. Requested by joerg@

This commit is contained in:
wiz 2007-09-24 20:44:23 +00:00
parent f381694bae
commit 804d4ddaaf
3 changed files with 70 additions and 8 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: mi,v 1.1066 2007/09/23 21:27:34 agc Exp $
# $NetBSD: mi,v 1.1067 2007/09/24 20:44:24 wiz Exp $
./etc/mtree/set.comp comp-sys-root
./usr/bin/addr2line comp-debug-bin bfd
./usr/bin/ar comp-util-bin bfd
@ -6801,11 +6801,21 @@
./usr/share/man/cat9/allocbuf.0 comp-sys-catman .cat
./usr/share/man/cat9/altq.0 comp-sys-catman .cat
./usr/share/man/cat9/aprint_debug.0 comp-sys-catman .cat
./usr/share/man/cat9/aprint_debug_dev.0 comp-sys-catman .cat
./usr/share/man/cat9/aprint_debug_ifnet.0 comp-sys-catman .cat
./usr/share/man/cat9/aprint_error.0 comp-sys-catman .cat
./usr/share/man/cat9/aprint_error_dev.0 comp-sys-catman .cat
./usr/share/man/cat9/aprint_error_ifnet.0 comp-sys-catman .cat
./usr/share/man/cat9/aprint_get_error_count.0 comp-sys-catman .cat
./usr/share/man/cat9/aprint_naive.0 comp-sys-catman .cat
./usr/share/man/cat9/aprint_naive_dev.0 comp-sys-catman .cat
./usr/share/man/cat9/aprint_naive_ifnet.0 comp-sys-catman .cat
./usr/share/man/cat9/aprint_normal.0 comp-sys-catman .cat
./usr/share/man/cat9/aprint_normal_dev.0 comp-sys-catman .cat
./usr/share/man/cat9/aprint_normal_ifnet.0 comp-sys-catman .cat
./usr/share/man/cat9/aprint_verbose.0 comp-sys-catman .cat
./usr/share/man/cat9/aprint_verbose_dev.0 comp-sys-catman .cat
./usr/share/man/cat9/aprint_verbose_ifnet.0 comp-sys-catman .cat
./usr/share/man/cat9/arc4random.0 comp-sys-catman .cat
./usr/share/man/cat9/arp.0 comp-sys-catman .cat
./usr/share/man/cat9/arp_ifinit.0 comp-sys-catman .cat
@ -11367,11 +11377,21 @@
./usr/share/man/man9/allocbuf.9 comp-sys-man .man
./usr/share/man/man9/altq.9 comp-sys-man .man
./usr/share/man/man9/aprint_debug.9 comp-sys-man .man
./usr/share/man/man9/aprint_debug_dev.9 comp-sys-man .man
./usr/share/man/man9/aprint_debug_ifnet.9 comp-sys-man .man
./usr/share/man/man9/aprint_error.9 comp-sys-man .man
./usr/share/man/man9/aprint_error_dev.9 comp-sys-man .man
./usr/share/man/man9/aprint_error_ifnet.9 comp-sys-man .man
./usr/share/man/man9/aprint_get_error_count.9 comp-sys-man .man
./usr/share/man/man9/aprint_naive.9 comp-sys-man .man
./usr/share/man/man9/aprint_naive_dev.9 comp-sys-man .man
./usr/share/man/man9/aprint_naive_ifnet.9 comp-sys-man .man
./usr/share/man/man9/aprint_normal.9 comp-sys-man .man
./usr/share/man/man9/aprint_normal_dev.9 comp-sys-man .man
./usr/share/man/man9/aprint_normal_ifnet.9 comp-sys-man .man
./usr/share/man/man9/aprint_verbose.9 comp-sys-man .man
./usr/share/man/man9/aprint_verbose_dev.9 comp-sys-man .man
./usr/share/man/man9/aprint_verbose_ifnet.9 comp-sys-man .man
./usr/share/man/man9/arc4random.9 comp-sys-man .man
./usr/share/man/man9/arp.9 comp-sys-man .man
./usr/share/man/man9/arp_ifinit.9 comp-sys-man .man

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.248 2007/07/21 15:35:46 dsieger Exp $
# $NetBSD: Makefile,v 1.249 2007/09/24 20:44:23 wiz Exp $
# Makefile for section 9 (kernel function and variable) manual pages.
@ -306,7 +306,13 @@ MLINKS+=kprintf.9 printf.9 kprintf.9 printf_nolog.9 kprintf.9 sprintf.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 \
kprintf.9 aprint_error.9 kprintf.9 aprint_get_error_count.9
kprintf.9 aprint_error.9 \
kprintf.9 aprint_normal_dev.9 kprintf.9 aprint_naive_dev.9 \
kprintf.9 aprint_verbose_dev.9 kprintf.9 aprint_debug_dev.9 \
kprintf.9 aprint_error_dev.9 \
kprintf.9 aprint_normal_ifnet.9 kprintf.9 aprint_naive_ifnet.9 \
kprintf.9 aprint_verbose_ifnet.9 kprintf.9 aprint_debug_ifnet.9 \
kprintf.9 aprint_error_ifnet.9 kprintf.9 aprint_get_error_count.9
MLINKS+=kthread.9 kthread_exit.9 \
kthread.9 kthread_create.9 \
kthread.9 kthread_destroy.9

View File

@ -1,6 +1,6 @@
.\" $NetBSD: kprintf.9,v 1.21 2007/07/26 10:00:21 pooka Exp $
.\" $NetBSD: kprintf.9,v 1.22 2007/09/24 20:44:24 wiz Exp $
.\"
.\" Copyright (c) 1998, 2002 The NetBSD Foundation, Inc.
.\" Copyright (c) 1998, 2002, 2007 The NetBSD Foundation, Inc.
.\" All rights reserved.
.\"
.\" This code is derived from software contributed to The NetBSD Foundation
@ -34,11 +34,11 @@
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
.\" POSSIBILITY OF SUCH DAMAGE.
.\"
.Dd July 26, 2007
.Dd September 24, 2007
.Dt KPRINTF 9
.Os
.Sh NAME
.Nm printf, snprintf, vprintf, vsnprintf, uprintf, ttyprintf, tprintf
.Nm printf, snprintf, vprintf, vsnprintf, uprintf, ttyprintf, tprintf, aprint
.Nd kernel formatted output conversion
.Sh SYNOPSIS
.In sys/systm.h
@ -74,6 +74,26 @@
.Fn "aprint_debug" "const char *format" "..."
.Ft void
.Fn "aprint_error" "const char *format" "..."
.Ft void
.Fn "aprint_normal_dev" "device_t" "const char *format" "..."
.Ft void
.Fn "aprint_naive_dev" "device_t" "const char *format" "..."
.Ft void
.Fn "aprint_verbose_dev" "device_t" "const char *format" "..."
.Ft void
.Fn "aprint_debug_dev" "device_t" "const char *format" "..."
.Ft void
.Fn "aprint_error_dev" "device_t" "const char *format" "..."
.Ft void
.Fn "aprint_normal_ifnet" "struct ifnet *" "const char *format" "..."
.Ft void
.Fn "aprint_naive_ifnet" "struct ifnet *" "const char *format" "..."
.Ft void
.Fn "aprint_verbose_ifnet" "struct ifnet *" "const char *format" "..."
.Ft void
.Fn "aprint_debug_ifnet" "struct ifnet *" "const char *format" "..."
.Ft void
.Fn "aprint_error_ifnet" "struct ifnet *" "const char *format" "..."
.Ft int
.Fn "aprint_get_error_count" "void"
.Sh DESCRIPTION
@ -155,10 +175,26 @@ Like
but also keeps track of the number of times called.
This allows a subsystem to report the number of errors that occurred
during a quiet or silent initialization phase.
.El
.Pp
For the
.Fn aprint_*
functions there are two additional families of functions with the
suffixes
.Dv _dev
and
.Dv _ifnet
which work like their counterparts without the suffixes, except that
they take a
.Ft device_t
or
.Ft struct ifnet *
respectively as first argument and prefix the log message with the
corresponding device or interface name.
.Pp
The
.Fn aprint_get_error_count
function reports the number of errors and resets the counter to 0.
.El
.Pp
If
.Dv AB_SILENT