From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 11 11:07: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 11D6B16A4CE for ; Wed, 11 Feb 2004 11:07:11 -0800 (PST) Received: from chernobyl.investici.org (host207-193-149-62.serverdedicati.aruba.it [62.149.193.207]) by mx1.FreeBSD.org (Postfix) with ESMTP id D19CB43D2F for ; Wed, 11 Feb 2004 11:07:10 -0800 (PST) (envelope-from nate@paranoici.org) Received: from localhost (localhost [127.0.0.1]) by chernobyl.investici.org (Postfix) with ESMTP id 6454C23FCE for ; Wed, 11 Feb 2004 20:06:03 +0100 (CET) Received: from chernobyl.investici.org ([127.0.0.1]) by localhost (chernobyl [127.0.0.1]) (amavisd-new, port 10024) with SMTP id 01922-01 for ; Wed, 11 Feb 2004 20:05:51 +0100 (CET) Received: from 192.168.0.103 (host85-71.pool80181.interbusiness.it [80.181.71.85]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by chernobyl.investici.org (Postfix) with ESMTP id A78BA23F88 for ; Wed, 11 Feb 2004 20:05:50 +0100 (CET) Date: Wed, 11 Feb 2004 20:06:27 +0000 From: Nate Grey To: freebsd-hackers@FreeBSD.org Message-ID: <20040124165621.GA19451@LapBSD.tin.it> Mime-Version: 1.0 Content-Disposition: inline X-Useless-Header: Se parli col Diavolo il =?iso-8859-1?Q?Dia?= =?iso-8859-1?Q?volo_non_cambia=2C_=E8?= lui che cambia te X-Editor: Vim 6.2 X-Operating-System: FreeBSD 5.2-RELEASE (i386) X-Uptime: 4:50pm up 1:56, 1 user, load averages: 0,38 0,78 0,67 Key-Fingerprint: 6696 9832 D0A2 D00E 0CB1 E03D 693D 7DFC 3E3C B9D9 User-Agent: Mutt/1.5.5.1i Lines: 13 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new-20030616-p5 (Debian) at autistici.org X-Mailman-Approved-At: Thu, 12 Feb 2004 05:30:09 -0800 Subject: help sysctl.h 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: Wed, 11 Feb 2004 19:07:11 -0000 Hello, I'm trying to write a little program which retrieve the value 'sysctl hw.acpi.thermal.tz0.temperature', I want to write it in C, through sys/sysctl.h, but I'm a newbie C coder, so can anyone show me how to assign to a var the value stored in that sysctl using sysctl C call? I have read 'man 3 sysctl' but I didn't understand very well... P.S. 1) Sorry for my English 2) I'm not a list subscriber so please cc: Thanks in advance. Bye