[ cvs-(all|commiters) --> -hackers ] > :<snip> > :> > :> (this whole thing is predicated on someone writing a mount_md wrapper > :> for MD that mimics the options mount_mfs accepts, for compatibility). > : > :I'll do it. Would it be safe to assume that it's acceptable to write > :a C program to parse the arguments, build command lines to > :appropriately invoke disklabel, newfs, maybe tunefs, and mount, then > :call system(3) to execute them? > : > : Dima Dorfman > : [EMAIL PROTECTED] > > Yes, though preferably I'd fork/exec the sub-programs (and use > absolute paths) rather then use system(), because the mount program > will be running during booting and its important to have it use as > few system resources as possible in case the system is screwed up. > We don't want it exec'ing /bin/sh. Point taken. I kind of figured system() was a little evil; that's why I asked. I've written the majority of the code. You can find it at: http://www.unixfreak.org/~dima/home/mount_md.c. It is mostly functional. It accepts just about all of the arguments that mount_mfs does, plus a few others. It has the ability to create vnode, swap, and malloc -backed disks. It's not terribly well-documented (I'll write up a man page if it's decided that this is acceptable), but most of the options are easily explained by looking at a few lines of code. Some thoughts: - If you want softupdates, you need to specify the -S flag. Should softupdates be the default? - To suppress the output of disklabel/newfs/etc., it closes fds 0-2. Is this evil? Should I devise another method of doing this (something like opening /dev/null and dup2'ing that fd to 0-2)? - Should there be an option to make use of md's autounit feature? I don't think it will be very hard to implement, but I don't know how useful it would be. I think that's it. Comments? Suggestions? Thanks in advance Dima Dorfman [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message