From owner-freebsd-questions@FreeBSD.ORG Mon Feb 28 09:32:26 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DCC0D16A4CE for ; Mon, 28 Feb 2005 09:32:26 +0000 (GMT) Received: from mail.freebsd-corp-net-guide.com (mail.freebsd-corp-net-guide.com [65.75.192.90]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3091943D53 for ; Mon, 28 Feb 2005 09:32:26 +0000 (GMT) (envelope-from tedm@toybox.placo.com) Received: from tedwin2k (nat-rtr.freebsd-corp-net-guide.com [65.75.197.130]) j1S9WSb15044; Mon, 28 Feb 2005 01:32:28 -0800 (PST) (envelope-from tedm@toybox.placo.com) From: "Ted Mittelstaedt" To: "Rob" , "FreeBSD questions" Date: Mon, 28 Feb 2005 01:32:26 -0800 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: <20050228022622.46627.qmail@web54003.mail.yahoo.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1478 Importance: Normal Subject: RE: /dev/io , /dev/mem : only used by Xorg? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Feb 2005 09:32:27 -0000 > -----Original Message----- > From: owner-freebsd-questions@freebsd.org > [mailto:owner-freebsd-questions@freebsd.org]On Behalf Of Rob > Sent: Sunday, February 27, 2005 6:26 PM > To: FreeBSD questions > Subject: /dev/io , /dev/mem : only used by Xorg? > > > > Hello, > > This is on 5.3-STABLE. > > On my desktop FreeBSD PC: > > $ fstat /dev/io /dev/mem > > only shows that Xorg is using these devices. > > Googling on /dev/io and /dev/mem, finds only Xorg > related discussions and problems. > > > I now also have Server PC, that does not run X at all. > I'm about to remove the devices io and mem > in the kernel configuration. Is that OK? > > How about the /dev/random device? Could that go too? > > Thanks, > Rob. > Rob, you are very mistaken about that the devices in /dev are. These devices, /dev/mem, /dev/io, /dev/random and the like, do not in fact actually reside in the /dev directory. Instead, they are part of the kernel itself. All the /dev files are, /dev/random, /dev/ad0 and so on, are simple files that take up only a few bytes of space. They are convenient "hook points" to use to get to these devices. That is, when a program accesses /dev/random, it isn't actually opening that file. Instead, the kernel intercepts that call and supplies the program opening that device with the output of the actual device. This is why these device files are created with the mknod utility, rather than just copying a file to /dev/random - since doing that is accessing the device, not creating the device file. So, deleting these /dev devices saves you practically no space at all, and does not in fact delete the devices - it only deletes the access point to them. The devices are still there in the kernel. Ted