From owner-freebsd-hackers Thu Feb 1 18:55:20 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from bazooka.unixfreak.org (bazooka.unixfreak.org [63.198.170.138]) by hub.freebsd.org (Postfix) with ESMTP id 3DA1A37B4EC; Thu, 1 Feb 2001 18:55:02 -0800 (PST) Received: by bazooka.unixfreak.org (Postfix, from userid 1000) id D4BB73E02; Thu, 1 Feb 2001 18:55:01 -0800 (PST) Received: from unixfreak.org (localhost [127.0.0.1]) by bazooka.unixfreak.org (Postfix) with ESMTP id CDB4F3C10B; Thu, 1 Feb 2001 18:55:01 -0800 (PST) To: Poul-Henning Kamp Cc: mi@aldan.algebra.com, jhb@FreeBSD.org, hackers@FreeBSD.org Subject: Re: mdconfig config file (was: cvs commit: src/sys/i386/conf GENERIC) In-Reply-To: Message from Poul-Henning Kamp of "Wed, 31 Jan 2001 09:07:29 +0100." <36096.980928449@critter> Date: Thu, 01 Feb 2001 18:54:56 -0800 From: Dima Dorfman Message-Id: <20010202025501.D4BB73E02@bazooka.unixfreak.org> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG [cvs-(all|commiters) -> -hackers] > >> If anybody writes a patch to mdconfig to DTRT based on some > >> less bogus /etc/fstab entries, I'll happily review and commit it. > > > >Does this sort of functionality really belong in mdconfig? > > Not by definition, and I'm not religious about it. Okay, any objections then to jhb's configuration file idea? The idea is that mdconfig parses a file (md.conf or something) and sets up some memory disks accordingly, including optional disklabel/newfs stuff. Later, a simple 'ffs'-type fstab entry will mount it wherever the user wants. This may be a little complicated for the simple /tmp case, but I can think of some environments where this would be useful. vnconfig also supports a similar config file option, so I think it's fitting that mdconfig should, too. I've come up with a preliminary patch to teach mdconfig(8) to parse a config file. It's a little early to be of practical use (and it lacks the disklabel/newfs option), but it's a start. It's a little long because I made some of the code in the switch(ch) block into functions to avoid having two blocks doing the same thing, so I've decided not to attach it not to bother the uninterested parties. If you could take a minute or two and comment on it I'd appreciate it. You can find it at http://www.unixfreak.org/~dima/mdconfig1.diff The current format of the config file is: ,,... for example: md0 swap size=64m Comments? Suggestions? Thanks in advance Dima Dorfman dima@unixfreak.org P.S. Is there any reason the -b (baseaddr) option for preload disks is currently unimplemented? The patch implements it (it was one line, so I thought 'what the heck'); the ioctl works, but I was unable to test it. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message