From owner-freebsd-current@FreeBSD.ORG Tue May 12 11:48:43 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 6346B106566B for ; Tue, 12 May 2009 11:48:43 +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 002908FC13 for ; Tue, 12 May 2009 11:48:42 +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=n7W4bEX3lYiEoaxXwqtMTK/QmNP8gMAlbZdn9V08ZnO1pPG9vW2u/85W/Z4EZ8stptjI41tkLlw44CqBkKYrlnjcQdjwmxxD1a9iWos1zjjYwdRtoaG791hSu/KNdp3ZXA+Ac5hOked2gUc2yONmdaQ5D6nQ8XkHjiQ4lNsUnQU=; Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by 0.mx.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1M3qTQ-0003cB-Bs; Tue, 12 May 2009 15:48:40 +0400 Date: Tue, 12 May 2009 15:48:38 +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: <4451ccf20905120329x68e86081p90d0098ad5ea5d5b@mail.gmail.com> 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:48:43 -0000 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(). > And where can we find the output? in dmesg or somewhere else? In the dmesg and in all (syslogged) destinations you had configured. -- Eygene _ ___ _.--. # \`.|\..----...-'` `-._.-'_.-'` # Remember that it is hard / ' ` , __.--' # to read the on-line manual )/' _/ \ `-_, / # while single-stepping the kernel. `-'" `"\_ ,_.-;_.-\_ ', fsc/as # _.-'_./ {_.' ; / # -- FreeBSD Developers handbook {_.-``-' {_/ #