summaryrefslogtreecommitdiffstats
path: root/sbin/mdmfs
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-09-22 09:46:28 +0000
committerphk <phk@FreeBSD.org>2002-09-22 09:46:28 +0000
commit1a1c831c079c1ee94f02ce7436727f9f3c5ff767 (patch)
tree81e92b100710e75a65f84b91e1e5f5ab88d78d99 /sbin/mdmfs
parentc7bade38097bd9c486ed997f7cc45f5f754439bf (diff)
downloadFreeBSD-src-1a1c831c079c1ee94f02ce7436727f9f3c5ff767.zip
FreeBSD-src-1a1c831c079c1ee94f02ce7436727f9f3c5ff767.tar.gz
Don't disklabel(8) the md(4) device, it is not needed, and we don't want
to propagete BSD disklabels to architectures not already so polluted. Sponsored by: DARPA & NAI Labs.
Diffstat (limited to 'sbin/mdmfs')
-rw-r--r--sbin/mdmfs/mdmfs.83
-rw-r--r--sbin/mdmfs/mdmfs.c21
-rw-r--r--sbin/mdmfs/pathnames.h1
3 files changed, 3 insertions, 22 deletions
diff --git a/sbin/mdmfs/mdmfs.8 b/sbin/mdmfs/mdmfs.8
index 135f938..3f75574 100644
--- a/sbin/mdmfs/mdmfs.8
+++ b/sbin/mdmfs/mdmfs.8
@@ -84,8 +84,6 @@ utility configures an
.Xr md 4
disk using
.Xr mdconfig 8 ,
-labels it using
-.Xr disklabel 8 ,
puts a UFS file system on it using
.Xr newfs 8 ,
and mounts it using
@@ -331,7 +329,6 @@ was given on the command line.
.Sh SEE ALSO
.Xr md 4 ,
.Xr fstab 5 ,
-.Xr disklabel 8 ,
.Xr mdconfig 8 ,
.Xr mount 8 ,
.Xr newfs 8
diff --git a/sbin/mdmfs/mdmfs.c b/sbin/mdmfs/mdmfs.c
index 2dcd791..1ed069d 100644
--- a/sbin/mdmfs/mdmfs.c
+++ b/sbin/mdmfs/mdmfs.c
@@ -25,7 +25,7 @@
*/
/*
- * mdmfs (md/MFS) is a wrapper around mdconfig(8), disklabel(8),
+ * mdmfs (md/MFS) is a wrapper around mdconfig(8),
* newfs(8), and mount(8) that mimics the command line option set of
* the deprecated mount_mfs(8).
*/
@@ -75,7 +75,6 @@ static size_t mdnamelen; /* Length of mdname. */
static void argappend(char **, const char *, ...) __printflike(2, 3);
static void debugprintf(const char *, ...) __printflike(1, 2);
-static void do_disklabel(void);
static void do_mdconfig_attach(const char *, const enum md_types);
static void do_mdconfig_attach_au(const char *, const enum md_types);
static void do_mdconfig_detach(void);
@@ -265,7 +264,6 @@ main(int argc, char **argv)
do_mdconfig_attach_au(mdconfig_arg, mdtype);
else
do_mdconfig_attach(mdconfig_arg, mdtype);
- do_disklabel();
do_newfs(newfs_arg);
do_mount(mount_arg, mtpoint);
do_mtptsetup(mtpoint, &mi);
@@ -320,19 +318,6 @@ debugprintf(const char *fmt, ...)
}
/*
- * Label the memory disk.
- */
-static void
-do_disklabel(void)
-{
- int rv;
-
- rv = run(NULL, "%s -r -w %s%d auto", PATH_DISKLABEL, mdname, unit);
- if (rv)
- errx(1, "disklabel exited with error code %d", rv);
-}
-
-/*
* Attach a memory disk with a known unit.
*/
static void
@@ -439,7 +424,7 @@ do_mount(const char *args, const char *mtpoint)
{
int rv;
- rv = run(NULL, "%s%s /dev/%s%dc %s", PATH_MOUNT, args,
+ rv = run(NULL, "%s%s /dev/%s%d %s", PATH_MOUNT, args,
mdname, unit, mtpoint);
if (rv)
errx(1, "mount exited with error code %d", rv);
@@ -489,7 +474,7 @@ do_newfs(const char *args)
{
int rv;
- rv = run(NULL, "%s%s /dev/%s%dc", PATH_NEWFS, args, mdname, unit);
+ rv = run(NULL, "%s%s /dev/%s%d", PATH_NEWFS, args, mdname, unit);
if (rv)
errx(1, "newfs exited with error code %d", rv);
}
diff --git a/sbin/mdmfs/pathnames.h b/sbin/mdmfs/pathnames.h
index d072cf2..2dfccb1 100644
--- a/sbin/mdmfs/pathnames.h
+++ b/sbin/mdmfs/pathnames.h
@@ -3,7 +3,6 @@
#define MDMFS_PATHNAMES_H
#define PATH_MDCONFIG "/sbin/mdconfig"
-#define PATH_DISKLABEL "/sbin/disklabel"
#define PATH_NEWFS "/sbin/newfs"
#define PATH_MOUNT "/sbin/mount"
OpenPOWER on IntegriCloud