From owner-freebsd-hackers Thu Nov 27 15:08:24 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id PAA29621 for hackers-outgoing; Thu, 27 Nov 1997 15:08:24 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from smtp04.primenet.com (smtp04.primenet.com [206.165.5.85]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id PAA29616 for ; Thu, 27 Nov 1997 15:08:21 -0800 (PST) (envelope-from tlambert@usr07.primenet.com) Received: (from daemon@localhost) by smtp04.primenet.com (8.8.7/8.8.7) id QAA00780; Thu, 27 Nov 1997 16:08:21 -0700 (MST) Received: from usr07.primenet.com(206.165.6.207) via SMTP by smtp04.primenet.com, id smtpd000767; Thu Nov 27 16:08:18 1997 Received: (from tlambert@localhost) by usr07.primenet.com (8.8.5/8.8.5) id QAA14601; Thu, 27 Nov 1997 16:08:06 -0700 (MST) From: Terry Lambert Message-Id: <199711272308.QAA14601@usr07.primenet.com> Subject: Re: detecting devfs from userland? To: dk+@ua.net Date: Thu, 27 Nov 1997 23:08:06 +0000 (GMT) Cc: proff@iq.org, julian@whistle.com, freebsd-hackers@freebsd.org In-Reply-To: <199711270328.TAA25467@dog.farm.org> from "Dmitry Kohmanyuk" at Nov 26, 97 07:28:21 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > I think that having devfs creating its own device would be nice thing > for this purpose... i.e., just stat "/dev/devfs" to check if devfs > is running. As an added bonus, devfs operations can be added by > reading, writing, or ioctl'ing this device. > > this can work if you need to check whether devfs is running _now_, > as opposed to knowing whether it is compiled into the kernel. You can do the same thing by doing a stat of /dev and looking for an st_ino of 2. The devices themselves, especially in the new SLICE stuff that he's done, should be self-referrential. I'm still trying to talk him into putting them in a hierarchy (with little success... you SVR4 device name traditionalists can rest easy: you still get you have your long cryptic device names for now...). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.