Teach mdmfs how to pass UFS version numbers through to newfs. Because
of an argument name collision with -O, use -v, and default to whatever the newfs default is for the platform (generally, UFS1). This is required to support diskless workstations that use UFS2 for their mdmfs file systems. Reviewed by: dd, bmah Approved by: re (bmah) Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
This commit is contained in:
parent
bb4c2b1298
commit
622448fa77
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=107475
@ -50,6 +50,7 @@ driver
|
|||||||
.Op Fl o Ar mount-options
|
.Op Fl o Ar mount-options
|
||||||
.Op Fl p Ar permissions
|
.Op Fl p Ar permissions
|
||||||
.Op Fl s Ar size
|
.Op Fl s Ar size
|
||||||
|
.Op Fl v Ar version
|
||||||
.Op Fl w Ar user : Ns Ar group
|
.Op Fl w Ar user : Ns Ar group
|
||||||
.Ar md-device
|
.Ar md-device
|
||||||
.Ar mount-point
|
.Ar mount-point
|
||||||
@ -69,6 +70,7 @@ driver
|
|||||||
.Op Fl O Ar optimization
|
.Op Fl O Ar optimization
|
||||||
.Op Fl o Ar mount-options
|
.Op Fl o Ar mount-options
|
||||||
.Op Fl s Ar size
|
.Op Fl s Ar size
|
||||||
|
.Op Fl v Ar version
|
||||||
.Ar md-device
|
.Ar md-device
|
||||||
.Ar mount-point
|
.Ar mount-point
|
||||||
.Sh DESCRIPTION
|
.Sh DESCRIPTION
|
||||||
@ -222,6 +224,15 @@ for compatibility.
|
|||||||
It is only really useful to negate the
|
It is only really useful to negate the
|
||||||
.Fl S
|
.Fl S
|
||||||
flag, should such a need occur.
|
flag, should such a need occur.
|
||||||
|
.It Fl v Ar version
|
||||||
|
Specify the UFS version number for use on the file system; it may be
|
||||||
|
either
|
||||||
|
.Dv 1
|
||||||
|
or
|
||||||
|
.Dv 2 .
|
||||||
|
The default is derived from the default of the
|
||||||
|
.Xr newfs 8
|
||||||
|
command.
|
||||||
.It Fl w Ar user : Ns Ar group
|
.It Fl w Ar user : Ns Ar group
|
||||||
Set the owner and group to
|
Set the owner and group to
|
||||||
.Ar user
|
.Ar user
|
||||||
|
@ -121,7 +121,7 @@ main(int argc, char **argv)
|
|||||||
compat = true;
|
compat = true;
|
||||||
|
|
||||||
while ((ch = getopt(argc, argv,
|
while ((ch = getopt(argc, argv,
|
||||||
"a:b:Cc:Dd:e:F:f:hi:LMm:Nn:O:o:p:Ss:t:Uw:X")) != -1)
|
"a:b:Cc:Dd:e:F:f:hi:LMm:Nn:O:o:p:Ss:t:Uv:w:X")) != -1)
|
||||||
switch (ch) {
|
switch (ch) {
|
||||||
case 'a':
|
case 'a':
|
||||||
argappend(&newfs_arg, "-a %s", optarg);
|
argappend(&newfs_arg, "-a %s", optarg);
|
||||||
@ -212,6 +212,9 @@ main(int argc, char **argv)
|
|||||||
case 'U':
|
case 'U':
|
||||||
softdep = true;
|
softdep = true;
|
||||||
break;
|
break;
|
||||||
|
case 'v':
|
||||||
|
argappend(&newfs_arg, "-O %s", optarg);
|
||||||
|
break;
|
||||||
case 'w':
|
case 'w':
|
||||||
if (compat)
|
if (compat)
|
||||||
usage();
|
usage();
|
||||||
|
Loading…
Reference in New Issue
Block a user