From owner-freebsd-questions@FreeBSD.ORG Thu Jan 3 16:08:13 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CAD716A418 for ; Thu, 3 Jan 2008 16:08:13 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (gizmo.acns.msu.edu [35.8.1.43]) by mx1.freebsd.org (Postfix) with ESMTP id 3052813C457 for ; Thu, 3 Jan 2008 16:08:12 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (localhost [127.0.0.1]) by gizmo.acns.msu.edu (8.13.6/8.13.6) with ESMTP id m03G6bVv013436; Thu, 3 Jan 2008 11:06:37 -0500 (EST) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: (from jerrymc@localhost) by gizmo.acns.msu.edu (8.13.6/8.13.6/Submit) id m03G6aJt013435; Thu, 3 Jan 2008 11:06:36 -0500 (EST) (envelope-from jerrymc) Date: Thu, 3 Jan 2008 11:06:36 -0500 From: Jerry McAllister To: Fernando =?iso-8859-1?Q?Apestegu=EDa?= Message-ID: <20080103160636.GE13176@gizmo.acns.msu.edu> References: <1bd550a00801030514i5007c67t509e05f08c820dd@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1bd550a00801030514i5007c67t509e05f08c820dd@mail.gmail.com> User-Agent: Mutt/1.4.2.2i Cc: FreeBSD Mailing List Subject: Re: Porting from linux to FreeBSD (procfs question) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2008 16:08:13 -0000 On Thu, Jan 03, 2008 at 02:14:57PM +0100, Fernando Apesteguía wrote: > Hi all, > > First of all, Happy New Year. > > I have a question about porting an application from Linux to FreeBSD. > > The application I want to port, makes an extensive use of the procfs > in Linux. It gathers a lot of information from those files (cpuinfo, > meminfo, devices, filesystems, modules, etc...) > > As I know, FreeBSD has some kind of procfs but more limited in terms > of information. My questions is how should I proceed now? I see two > options. > > 1 - Try to rely the porting on the compatibility procfs from FreeBSD > 2 - Do the things in a completely different way (which one is this? > Invoking sysctl system call?) Use the sysctl calls. That is what will be supported correctly. ////jerry > > I would like to know from you which one is the best approach. > > Thanks in advance > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"