diff options
Diffstat (limited to 'sbin/mdmfs')
-rw-r--r-- | sbin/mdmfs/Makefile | 1 | ||||
-rw-r--r-- | sbin/mdmfs/mdmfs.8 | 24 | ||||
-rw-r--r-- | sbin/mdmfs/mdmfs.c | 10 |
3 files changed, 20 insertions, 15 deletions
diff --git a/sbin/mdmfs/Makefile b/sbin/mdmfs/Makefile index 592ceaa152c2..0665dfcc20a3 100644 --- a/sbin/mdmfs/Makefile +++ b/sbin/mdmfs/Makefile @@ -1,4 +1,3 @@ - PACKAGE=runtime PROG= mdmfs LINKS= ${BINDIR}/${PROG} ${BINDIR}/mount_mfs diff --git a/sbin/mdmfs/mdmfs.8 b/sbin/mdmfs/mdmfs.8 index 6824e5ccac03..ff5b78068299 100644 --- a/sbin/mdmfs/mdmfs.8 +++ b/sbin/mdmfs/mdmfs.8 @@ -32,7 +32,7 @@ .Nd configure and mount an in-memory file system using the .Xr md 4 driver or the -.Xr tmpfs 5 +.Xr tmpfs 4 filesystem .Sh SYNOPSIS .Nm @@ -61,7 +61,7 @@ filesystem The .Nm utility is designed to be a work-alike and look-alike of the deprecated -.Xr mount_mfs 8 . +.Nm mount_mfs . The end result is essentially the same, but is accomplished in a completely different way. Based on @@ -69,7 +69,7 @@ Based on the .Nm utility either creates a -.Xr tmpfs 5 +.Xr tmpfs 4 filesystem, or it configures an .Xr md 4 disk using @@ -91,7 +91,7 @@ When is `auto', .Nm uses -.Xr tmpfs 5 +.Xr tmpfs 4 if it is present in the kernel or can be loaded as a module, otherwise it falls back to using .Xr md 4 @@ -102,14 +102,14 @@ When is `tmpfs', .Nm mounts a -.Xr tmpfs 5 +.Xr tmpfs 4 filesystem, translating the .Fl s size option, if present, into a `-o size=' mount option. Any .Fl o options on the command line are passed through to the -.Xr tmpfs 5 +.Xr tmpfs 4 mount. Options specific to .Xr mdconfig 8 @@ -120,7 +120,7 @@ are ignored. When .Ar md-device does not result in -.Xr tmpfs 5 +.Xr tmpfs 4 being used, then an .Xr md 4 device is configured instead. @@ -149,7 +149,7 @@ it uses the default arguments to all the helper programs. The following options are available. Where possible, the option letter matches the one used by -.Xr mount_mfs 8 +.Nm mount_mfs for the same thing. .Bl -tag -width indent .It Fl a Ar maxcontig @@ -404,10 +404,10 @@ Mount a vnode-backed cd9660 file system using automatic device numbering: The .Nm utility, while designed to be compatible with -.Xr mount_mfs 8 , +.Nm mount_mfs , can be useful by itself. Since -.Xr mount_mfs 8 +.Nm mount_mfs had some silly defaults, a .Dq compatibility mode is provided for the case where bug-to-bug compatibility is desired. @@ -421,7 +421,7 @@ or (as returned by .Xr getprogname 3 ) . In this mode, the following behavior, as done by -.Xr mount_mfs 8 , +.Nm mount_mfs , is duplicated: .Bl -bullet -offset indent .It @@ -435,8 +435,8 @@ was given on the command line. .El .Sh SEE ALSO .Xr md 4 , +.Xr tmpfs 4 , .Xr fstab 5 , -.Xr tmpfs 5 , .Xr mdconfig 8 , .Xr mount 8 , .Xr newfs 8 diff --git a/sbin/mdmfs/mdmfs.c b/sbin/mdmfs/mdmfs.c index dbd206f953d2..69149b3fb465 100644 --- a/sbin/mdmfs/mdmfs.c +++ b/sbin/mdmfs/mdmfs.c @@ -32,7 +32,6 @@ * the deprecated mount_mfs(8). */ -#include <sys/cdefs.h> #include <sys/param.h> #include <sys/linker.h> #include <sys/mdioctl.h> @@ -105,7 +104,7 @@ main(int argc, char **argv) bool detach, softdep, autounit, newfs; const char *mtpoint, *size_arg, *skel, *unitstr; char *p; - int ch, idx; + int ch, idx, rv; void *set; unsigned long ul; @@ -358,6 +357,13 @@ main(int argc, char **argv) do_mdconfig_attach(mdconfig_arg, mdtype); if (newfs) do_newfs(newfs_arg); + if (!softdep) { + rv = run(NULL, "%s %s /dev/%s%d", _PATH_TUNEFS, + "-n disable", mdname, unit); + if (rv) + errx(1, "tunefs exited %s %d", run_exitstr(rv), + run_exitnumber(rv)); + } do_mount_md(mount_arg, mtpoint); } |