From owner-freebsd-current@FreeBSD.ORG Tue May 12 11:50:11 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 233CA10656B7 for ; Tue, 12 May 2009 11:50:11 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id BA9A28FC08 for ; Tue, 12 May 2009 11:50:10 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Subject:Message-ID:Reply-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:Sender; b=V5apBT/DHZJYZ4los0QaN+DL3uQMBv4y8iSovrRuslGnUA4C2N14y7GyzlRMvIp1VlbVJZlnwkdY9lrRvWERqk4eNytvujub21TL1X2H/SGyK2tLd7HnoeYnGrum33+Iwb966U7RTG5CCC3xv73RIfxiyI8LnrcwFVjosWBv7TI=; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1M3qUr-0003np-Oj; Tue, 12 May 2009 15:50:09 +0400 Date: Tue, 12 May 2009 15:50:07 +0400 From: Eygene Ryabinkin To: "????ccuiyyan@sina.com" Message-ID: References: <4451ccf20905120329x68e86081p90d0098ad5ea5d5b@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: rea-fbsd@codelabs.ru Cc: freebsd-current@freebsd.org Subject: Re: Is there printk() in FreeBSD? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: rea-fbsd@codelabs.ru List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2009 11:50:11 -0000 Tue, May 12, 2009 at 03:48:38PM +0400, Eygene Ryabinkin wrote: > Tue, May 12, 2009 at 06:29:35PM +0800, ????ccuiyyan@sina.com wrote: > > > A simple question: sometimes i need to print out some kernel > > address in FreeBSD kernel. And i know printk() can be used in > > Linux to print the message to dmesg, Is there some similar in > > FreeBSD? > > > > It seems that printk() cannot work in the FreeBSD kernel. > > Use plain printf(). By the way, there is device_printf (man 9 device_printf) that is a bit prettier than the plain printf, so you can use it as well. -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ #