It doesn't make sense to pollute 'mdconfig' with functions that we already have an API available to perform. An API called 'mount'. Why not write a 'mount_md' program to do all the magic based on fstab options, similar to what mount_mfs used to do for MFS? A 'mount_md' would give us instant integration into existing kernel mechanisms, including startup (/etc/rc) mechanisms. -Matt :[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 : [EMAIL PROTECTED] : :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 [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message