From b7e368f7c1402aea220c65c631f19322d51aaa99 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sun, 22 Sep 2002 09:46:28 +0000 Subject: [PATCH] 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. --- sbin/mdmfs/mdmfs.8 | 3 --- sbin/mdmfs/mdmfs.c | 21 +++------------------ sbin/mdmfs/pathnames.h | 1 - 3 files changed, 3 insertions(+), 22 deletions(-) diff --git a/sbin/mdmfs/mdmfs.8 b/sbin/mdmfs/mdmfs.8 index 135f9386d5d9..3f7557452385 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 2dcd7911e2ca..1ed069dd8180 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); @@ -319,19 +317,6 @@ debugprintf(const char *fmt, ...) fflush(stderr); } -/* - * 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. */ @@ -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 d072cf2db771..2dfccb1d9809 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"