summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2022-11-19 08:02:12 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2022-11-19 08:02:12 +0000
commit3b1640615b95f7c3efbfae7a9a913f67b6ef4ea8 (patch)
treedcb25bd96b631ef00b880393ca72fe6901d2259c /sbin
parent937ccbba24cf7a10df4916545da92f018bb0766d (diff)
Add O: to the getopt string for newfs in mount_mfs mode, allowing it to
optionally use FFS2 (stu@ ran into a problem when running some tests on an MFS filesystem that involved future dates). Correct the manual which said that FFS2 is the default, which isn't the case for mount_mfs. lgtm miod@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/newfs/newfs.811
-rw-r--r--sbin/newfs/newfs.c4
2 files changed, 9 insertions, 6 deletions
diff --git a/sbin/newfs/newfs.8 b/sbin/newfs/newfs.8
index 2ad76eca4b1..2bf932ea0cb 100644
--- a/sbin/newfs/newfs.8
+++ b/sbin/newfs/newfs.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: newfs.8,v 1.78 2021/06/03 06:42:03 otto Exp $
+.\" $OpenBSD: newfs.8,v 1.79 2022/11/19 08:02:11 sthen Exp $
.\" $NetBSD: newfs.8,v 1.12 1995/03/18 14:58:41 cgd Exp $
.\"
.\" Copyright (c) 1983, 1987, 1991, 1993, 1994
@@ -30,7 +30,7 @@
.\"
.\" @(#)newfs.8 8.3 (Berkeley) 3/27/94
.\"
-.Dd $Mdocdate: June 3 2021 $
+.Dd $Mdocdate: November 19 2022 $
.Dt NEWFS 8
.Os
.Sh NAME
@@ -65,6 +65,7 @@
.Op Fl f Ar frag-size
.Op Fl i Ar bytes
.Op Fl m Ar free-space
+.Op Fl O Ar filesystem-format
.Op Fl o Ar options
.Op Fl P Ar file
.Op Fl s Ar size
@@ -191,9 +192,11 @@ format file system.
This option is primarily used to build root file systems that can
be understood by older boot ROMs.
.It 1
-Fast File System (FFS).
+Fast File System (FFS), the default for
+.Nm mount_mfs .
.It 2
-Enhanced Fast File System (FFS2), the default.
+Enhanced Fast File System (FFS2), the default for
+.Nm .
.El
.It Fl o Ar optimization
.Ar space
diff --git a/sbin/newfs/newfs.c b/sbin/newfs/newfs.c
index 76d254d35c1..815b9b946ca 100644
--- a/sbin/newfs/newfs.c
+++ b/sbin/newfs/newfs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: newfs.c,v 1.115 2021/06/03 06:42:03 otto Exp $ */
+/* $OpenBSD: newfs.c,v 1.116 2022/11/19 08:02:11 sthen Exp $ */
/* $NetBSD: newfs.c,v 1.20 1996/05/16 07:13:03 thorpej Exp $ */
/*
@@ -203,7 +203,7 @@ main(int argc, char *argv[])
fatal("insane maxpartitions value %d", maxpartitions);
opstring = mfs ?
- "P:T:b:c:e:f:i:m:o:s:" :
+ "O:P:T:b:c:e:f:i:m:o:s:" :
"NO:S:T:b:c:e:f:g:h:i:m:o:qs:t:";
while ((ch = getopt(argc, argv, opstring)) != -1) {
switch (ch) {