From owner-freebsd-hackers@FreeBSD.ORG Tue Mar 16 10:13:11 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 41DBA16A4CE for ; Tue, 16 Mar 2004 10:13:11 -0800 (PST) Received: from tv.soth.at (door.soth.at [80.110.102.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3CA3343D2D for ; Tue, 16 Mar 2004 10:13:10 -0800 (PST) (envelope-from toni@tv.soth.at) Received: from tv.soth.at (tv.soth.at [127.0.0.1]) by tv.soth.at (8.12.10/8.12.10) with ESMTP id i2GID8bg007950; Tue, 16 Mar 2004 19:13:08 +0100 Received: (from toni@localhost) by tv.soth.at (8.12.10/8.12.10/Submit) id i2GID8O8007948; Tue, 16 Mar 2004 19:13:08 +0100 Date: Tue, 16 Mar 2004 19:13:07 +0100 From: Toni Andjelkovic To: Roman Bogorodskiy Message-ID: <20040316181307.GA6576@tv.soth.at> References: <20040316163956.GD638@lame.novel.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040316163956.GD638@lame.novel.ru> User-Agent: Mutt/1.4.1i cc: freebsd-hackers@freebsd.org Subject: Re: kernel modules programming: struct proc question X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Mar 2004 18:13:11 -0000 On Tue, Mar 16 2004 (19:39:56 +0300), Roman Bogorodskiy wrote: [...] > printf("open(2): %s pid: %i\n", name, (int)p->p_pid); [...] > Mar 16 19:15:44 nov kernel: open(2): /tmp/asfdasfsaf pid: -1002890624 pid_t is an unsigned number, so try "%u" in printf() instead. There's no need to cast a pid_t to int. Cheers, Toni