From owner-freebsd-hackers Mon Dec 1 14:18:51 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id OAA25494 for hackers-outgoing; Mon, 1 Dec 1997 14:18:51 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from iq.org (proff@profane.iq.org [203.4.184.222]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id OAA25481 for ; Mon, 1 Dec 1997 14:18:42 -0800 (PST) (envelope-from proff@iq.org) Received: (qmail 767 invoked by uid 110); 1 Dec 1997 22:16:39 -0000 To: Darren Reed Cc: tlambert@primenet.com (Terry Lambert), julian@whistle.com, dk+@ua.net, freebsd-hackers@FreeBSD.ORG Subject: Re: detecting devfs from userland? References: From: Julian Assange Date: 02 Dec 1997 09:16:39 +1100 In-Reply-To: Darren Reed's message of Tue, 2 Dec 1997 08:38:26 +1100 (EDT) Message-ID: Lines: 28 X-Mailer: Gnus v5.4.52/XEmacs 20.2 Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Darren Reed writes: > Getting back to the topic of detecting DEVFS from userland, if the kernel > config file (i.e. GENERIC) was included when compiled - or at least the > lines which aren't commented out - and this was available from kernfs as > /kern/config, you could do "grep DEVFS /kern/config". Granted this won't > tell you if it is or isn't mounted, but is it a start ? > > Darren > Here's what I'm using with autoconf: AC_CACHE_CHECK([if the kernel has DEVFS support enabled], nc_cv_devfs, test -x /usr/bin/lsvfs && (/usr/bin/lsvfs | grep -q devfs) && nc_cv_devfs=yes || nc_cv_devfs=no) if test $nc_cv_devfs = yes; then AC_DEFINE(DEVFS) fi Cheers, Julian. -- Prof. Julian Assange |"Don't worry about people stealing your ideas. If your | Ideas are any good, you'll have to ram them down proff@iq.org | people's throats." -- Stolen quote from Howard Aiken proff@gnu.ai.mit.edu | http://underground.org/book