Fri Jan 21 17:51:20 2011 UTC ()
Describe device_printf(9).

XXX Need symbolic link device_printf.9 -> kprintf.9.


(dyoung)
diff -r1.29 -r1.30 src/share/man/man9/kprintf.9

cvs diff -r1.29 -r1.30 src/share/man/man9/kprintf.9 (expand / switch to unified diff)

--- src/share/man/man9/kprintf.9 2010/02/17 22:04:14 1.29
+++ src/share/man/man9/kprintf.9 2011/01/21 17:51:19 1.30
@@ -1,58 +1,61 @@ @@ -1,58 +1,61 @@
1.\" $NetBSD: kprintf.9,v 1.29 2010/02/17 22:04:14 cnst Exp $ 1.\" $NetBSD: kprintf.9,v 1.30 2011/01/21 17:51:19 dyoung Exp $
2.\" 2.\"
3.\" Copyright (c) 1998, 2002, 2007 The NetBSD Foundation, Inc. 3.\" Copyright (c) 1998, 2002, 2007, 2011 The NetBSD Foundation, Inc.
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" This code is derived from software contributed to The NetBSD Foundation 6.\" This code is derived from software contributed to The NetBSD Foundation
7.\" by Jeremy Cooper and by Jason R. Thorpe. 7.\" by Jeremy Cooper and by Jason R. Thorpe.
8.\" 8.\"
9.\" Redistribution and use in source and binary forms, with or without 9.\" Redistribution and use in source and binary forms, with or without
10.\" modification, are permitted provided that the following conditions 10.\" modification, are permitted provided that the following conditions
11.\" are met: 11.\" are met:
12.\" 1. Redistributions of source code must retain the above copyright 12.\" 1. Redistributions of source code must retain the above copyright
13.\" notice, this list of conditions and the following disclaimer. 13.\" notice, this list of conditions and the following disclaimer.
14.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" 2. Redistributions in binary form must reproduce the above copyright
15.\" notice, this list of conditions and the following disclaimer in the 15.\" notice, this list of conditions and the following disclaimer in the
16.\" documentation and/or other materials provided with the distribution. 16.\" documentation and/or other materials provided with the distribution.
17.\" 17.\"
18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28.\" POSSIBILITY OF SUCH DAMAGE. 28.\" POSSIBILITY OF SUCH DAMAGE.
29.\" 29.\"
30.Dd September 4, 2009 30.Dd January 21, 2011
31.Dt KPRINTF 9 31.Dt KPRINTF 9
32.Os 32.Os
33.Sh NAME 33.Sh NAME
 34.Nm device_printf ,
34.Nm printf , 35.Nm printf ,
35.Nm snprintf , 36.Nm snprintf ,
36.Nm vprintf , 37.Nm vprintf ,
37.Nm vsnprintf , 38.Nm vsnprintf ,
38.Nm uprintf , 39.Nm uprintf ,
39.Nm ttyprintf , 40.Nm ttyprintf ,
40.Nm tprintf , 41.Nm tprintf ,
41.Nm aprint 42.Nm aprint
42.Nd kernel formatted output conversion 43.Nd kernel formatted output conversion
43.Sh SYNOPSIS 44.Sh SYNOPSIS
44.In sys/systm.h 45.In sys/systm.h
45.Ft void 46.Ft void
 47.Fn "device_printf" "device_t" "const char *format" "..."
 48.Ft void
46.Fn "printf" "const char *format" "..." 49.Fn "printf" "const char *format" "..."
47.Ft void 50.Ft void
48.Fn "printf_nolog" "const char *format" "..." 51.Fn "printf_nolog" "const char *format" "..."
49.Ft int 52.Ft int
50.Fn "snprintf" "char *buf" "size_t size" "const char *format" "..." 53.Fn "snprintf" "char *buf" "size_t size" "const char *format" "..."
51.In machine/stdarg.h 54.In machine/stdarg.h
52.Ft void 55.Ft void
53.Fn "vprintf" "const char *format" "va_list ap" 56.Fn "vprintf" "const char *format" "va_list ap"
54.Ft int 57.Ft int
55.Fn "vsnprintf" "char *buf" "size_t size" "const char *format" "va_list ap" 58.Fn "vsnprintf" "char *buf" "size_t size" "const char *format" "va_list ap"
56.Ft void 59.Ft void
57.Fn "uprintf" "const char *format" "..." 60.Fn "uprintf" "const char *format" "..."
58.Ft void 61.Ft void
@@ -97,26 +100,32 @@ @@ -97,26 +100,32 @@
97.Ft int 100.Ft int
98.Fn "aprint_get_error_count" "void" 101.Fn "aprint_get_error_count" "void"
99.Sh DESCRIPTION 102.Sh DESCRIPTION
100The 103The
101.Fn printf 104.Fn printf
102family of functions allows the kernel to send formatted messages to various 105family of functions allows the kernel to send formatted messages to various
103output devices. 106output devices.
104The functions 107The functions
105.Fn printf 108.Fn printf
106and 109and
107.Fn vprintf 110.Fn vprintf
108send formatted strings to the system console. 111send formatted strings to the system console.
109The 112The
 113.Fn device_printf
 114function is identical to
 115.Fn printf ,
 116except that it prefixes the log message with the corresponding
 117device name.
 118The
110.Fn printf_nolog 119.Fn printf_nolog
111function is identical to 120function is identical to
112.Fn printf , 121.Fn printf ,
113except it does not send the data to the system log. 122except it does not send the data to the system log.
114The functions 123The functions
115.Fn snprintf 124.Fn snprintf
116and 125and
117.Fn vsnprintf 126.Fn vsnprintf
118write output to a string buffer. 127write output to a string buffer.
119These four functions work similarly to their user space counterparts, 128These four functions work similarly to their user space counterparts,
120and are not described in detail here. 129and are not described in detail here.
121.Pp 130.Pp
122The functions 131The functions