From owner-freebsd-current Thu Jul 4 19:41:38 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E8FE837B400; Thu, 4 Jul 2002 19:41:34 -0700 (PDT) Received: from scaup.mail.pas.earthlink.net (scaup.mail.pas.earthlink.net [207.217.120.49]) by mx1.FreeBSD.org (Postfix) with ESMTP id 83F1A43E09; Thu, 4 Jul 2002 19:41:34 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0169.cvx22-bradley.dialup.earthlink.net ([209.179.198.169] helo=mindspring.com) by scaup.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 17QJ26-0002Mr-00; Thu, 04 Jul 2002 22:41:19 -0400 Message-ID: <3D2506F9.8B34FD80@mindspring.com> Date: Thu, 04 Jul 2002 19:39:53 -0700 From: Terry Lambert X-Mailer: Mozilla 4.7 [en]C-CCK-MCD {Sony} (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Daniel O'Connor Cc: Bruce Evans , Greg 'groggy' Lehey , Poul-Henning Kamp , Mario Goebbels , current@FreeBSD.ORG Subject: Re: About DEVFS (was: Re: About GEOM...) References: <20020704210304.Y21619-100000@gamplex.bde.org> <3D24BB6E.3829314A@mindspring.com> <1025835014.4223.5.camel@chowder.gsoft.com.au> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Daniel O'Connor wrote: > I am pretty sure you can put chmod/ln -s commands in /etc/rc.local (I > rc.devfs? My -current box is asleep ATM) which largely solves this > problem. If you have PCMCIA, PCCARD, USB, IEEE 1394, or a docking station, the devices that you are interested in do not necessarily exist at the time that your rc.local is run. If that's the case, this doesn't work. The obvious solution to this is the "devd" that Bruce mentioned; but if you take the obvious solution, you might as well be creating and deleting devices from the devd, rather than in the kernel in a devfs (this is what Bruce meant when he mentioned his "might as well"). The failure with this model is that there is a race on device deletion, which would leave a device present in /dev, when the hardware was no longer available. A devfs (if written correctly) will not have this problem. Note that the PCMCIA code was argues on the point of the two shorter pins, on card eject, about two years ago -- the consensus was that it was possible, but it would take a lot of work, to get to where Windows is, in terms of capability of handling ejected devices. > It isn't perfect but the current DEVFS has good advantages - especially > the hardware/node synchronisation which is very useful when you have to > shuffle hard drives and have neglected to make the right device nodes > first. Yes. It has advantages and disadvantages. It all depends on what you personally value. > > Personally, I've never been persuaded that the persistance of modifications > > argument against devfs had any validity; I have yet to see one case that > > can not be managed via rc.local or modification of driver defaults > > (e.g. I know of no transient device that results in the creation of > > multiple device nodes for the same major number). I personally think > > the correct way to handle this is to write the changes back to the > > kernel image, if we are talking about modifications to the primary > > instances of the devices. > > Loader? > ie on shutdown write a list of permissions etc into a file which the > loader can slurp up next boot and shove into the kernel and be parsed. This really doesn't work very well. You end up with two sets of data. Having done something like this in practice, and had to live with the aftermath, I don't recommend it (at all). > > But overall, it seems to be a move forward. I guess if you valued > > persistance (e.g. the ability to rename your floppy device to be > > /dev/mickeymouse) over the new features, I guess I could see your > > point. > > Mmmm.. unnecessary pain. Eye of the beholder. It's nice to not have to modify binaries with hard coded path strings in them, and instead just hardlink or symlink the local oddly named device to the system local name for the device. For tape devices, for example, the desire for tape rewind before access is really a site local policy preference, and is normally controlled through the device node -- and therefore device name used. THe "mt" command is relatively new, and is not really independent enough (as one example). -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message