Date: Thu, 01 Feb 2001 18:54:56 -0800 From: Dima Dorfman <dima@unixfreak.org> To: Poul-Henning Kamp <phk@critter.freebsd.dk> Cc: mi@aldan.algebra.com, jhb@FreeBSD.org, hackers@FreeBSD.org Subject: Re: mdconfig config file (was: cvs commit: src/sys/i386/conf GENERIC) Message-ID: <20010202025501.D4BB73E02@bazooka.unixfreak.org> In-Reply-To: Message from Poul-Henning Kamp <phk@critter.freebsd.dk> of "Wed, 31 Jan 2001 09:07:29 %2B0100." <36096.980928449@critter>
next in thread | previous in thread | raw e-mail | index | archive | help
[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: <unit> <type> <argument=value>,<arg=value>,... 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010202025501.D4BB73E02>