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.
This commit is contained in:
parent
1851342297
commit
b7e368f7c1
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=103798
@ -84,8 +84,6 @@ utility configures an
|
|||||||
.Xr md 4
|
.Xr md 4
|
||||||
disk using
|
disk using
|
||||||
.Xr mdconfig 8 ,
|
.Xr mdconfig 8 ,
|
||||||
labels it using
|
|
||||||
.Xr disklabel 8 ,
|
|
||||||
puts a UFS file system on it using
|
puts a UFS file system on it using
|
||||||
.Xr newfs 8 ,
|
.Xr newfs 8 ,
|
||||||
and mounts it using
|
and mounts it using
|
||||||
@ -331,7 +329,6 @@ was given on the command line.
|
|||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr md 4 ,
|
.Xr md 4 ,
|
||||||
.Xr fstab 5 ,
|
.Xr fstab 5 ,
|
||||||
.Xr disklabel 8 ,
|
|
||||||
.Xr mdconfig 8 ,
|
.Xr mdconfig 8 ,
|
||||||
.Xr mount 8 ,
|
.Xr mount 8 ,
|
||||||
.Xr newfs 8
|
.Xr newfs 8
|
||||||
|
@ -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
|
* newfs(8), and mount(8) that mimics the command line option set of
|
||||||
* the deprecated mount_mfs(8).
|
* 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 argappend(char **, const char *, ...) __printflike(2, 3);
|
||||||
static void debugprintf(const char *, ...) __printflike(1, 2);
|
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(const char *, const enum md_types);
|
||||||
static void do_mdconfig_attach_au(const char *, const enum md_types);
|
static void do_mdconfig_attach_au(const char *, const enum md_types);
|
||||||
static void do_mdconfig_detach(void);
|
static void do_mdconfig_detach(void);
|
||||||
@ -265,7 +264,6 @@ main(int argc, char **argv)
|
|||||||
do_mdconfig_attach_au(mdconfig_arg, mdtype);
|
do_mdconfig_attach_au(mdconfig_arg, mdtype);
|
||||||
else
|
else
|
||||||
do_mdconfig_attach(mdconfig_arg, mdtype);
|
do_mdconfig_attach(mdconfig_arg, mdtype);
|
||||||
do_disklabel();
|
|
||||||
do_newfs(newfs_arg);
|
do_newfs(newfs_arg);
|
||||||
do_mount(mount_arg, mtpoint);
|
do_mount(mount_arg, mtpoint);
|
||||||
do_mtptsetup(mtpoint, &mi);
|
do_mtptsetup(mtpoint, &mi);
|
||||||
@ -319,19 +317,6 @@ debugprintf(const char *fmt, ...)
|
|||||||
fflush(stderr);
|
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.
|
* Attach a memory disk with a known unit.
|
||||||
*/
|
*/
|
||||||
@ -439,7 +424,7 @@ do_mount(const char *args, const char *mtpoint)
|
|||||||
{
|
{
|
||||||
int rv;
|
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);
|
mdname, unit, mtpoint);
|
||||||
if (rv)
|
if (rv)
|
||||||
errx(1, "mount exited with error code %d", rv);
|
errx(1, "mount exited with error code %d", rv);
|
||||||
@ -489,7 +474,7 @@ do_newfs(const char *args)
|
|||||||
{
|
{
|
||||||
int rv;
|
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)
|
if (rv)
|
||||||
errx(1, "newfs exited with error code %d", rv);
|
errx(1, "newfs exited with error code %d", rv);
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
#define MDMFS_PATHNAMES_H
|
#define MDMFS_PATHNAMES_H
|
||||||
|
|
||||||
#define PATH_MDCONFIG "/sbin/mdconfig"
|
#define PATH_MDCONFIG "/sbin/mdconfig"
|
||||||
#define PATH_DISKLABEL "/sbin/disklabel"
|
|
||||||
#define PATH_NEWFS "/sbin/newfs"
|
#define PATH_NEWFS "/sbin/newfs"
|
||||||
#define PATH_MOUNT "/sbin/mount"
|
#define PATH_MOUNT "/sbin/mount"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user