From owner-freebsd-current@FreeBSD.ORG Fri Apr 6 18:43:18 2007 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6A4DB16A402; Fri, 6 Apr 2007 18:43:18 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from anuket.mj.niksun.com (gwnew.niksun.com [65.115.46.162]) by mx1.freebsd.org (Postfix) with ESMTP id 2A44913C4C6; Fri, 6 Apr 2007 18:43:17 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from niksun.com (anuket [10.70.0.5]) by anuket.mj.niksun.com (8.13.6/8.13.6) with ESMTP id l36IhHVO018761; Fri, 6 Apr 2007 14:43:17 -0400 (EDT) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-current@FreeBSD.org Date: Fri, 6 Apr 2007 14:43:13 -0400 User-Agent: KMail/1.6.2 References: <20070407023855.ede13b76.nork@FreeBSD.org> <200704061407.35340.jkim@FreeBSD.org> <20070406181138.GA90738@freebsd.org> In-Reply-To: <20070406181138.GA90738@freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200704061443.15071.jkim@FreeBSD.org> X-Virus-Scanned: ClamAV 0.88.6/3029/Fri Apr 6 12:53:11 2007 on anuket.mj.niksun.com X-Virus-Status: Clean Cc: Roman Divacky , Norikatsu Shigemura Subject: Re: Cannot mount linprocfs by unresolving sysvs?m symbols X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Apr 2007 18:43:18 -0000 On Friday 06 April 2007 02:11 pm, Roman Divacky wrote: > > > is there a way to do this nicely? > > > > Probably we can improve kernel linker to do better job. ;-) I > > mean, load all dependencies before look up symbols. > > thats not what I mean.. what I want is something like > > if (function_present(foo)) > x = foo(); > else > x = SAFE_VALUE; > > use x somehow; > > so we don't have to have all modules loaded etc. the same could be > done for some syscalls, imagine > > linux_foo(params) > { > if (function_present(foo)) > return foo(params); > else > return ENOSYS; > } > > I like this better then loading all possible modules. I know what you meant but it is more heavier than what we have now. If you insist, you can do something like linux_ipc.c. Check out linux_msgctl() and linux_semctl(). Module presence check is easy. Jung-uk Kim