summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgjb <gjb@FreeBSD.org>2013-08-16 05:30:13 +0000
committergjb <gjb@FreeBSD.org>2013-08-16 05:30:13 +0000
commit4d4391770dcf9af5dbc1268cc96494ee661b5d7d (patch)
tree6e1242a314508cab8e7bd72846f07a14b106b1e6
parente46116864019a4bea0415b802b1e07a53e0b4577 (diff)
downloadFreeBSD-src-4d4391770dcf9af5dbc1268cc96494ee661b5d7d.zip
FreeBSD-src-4d4391770dcf9af5dbc1268cc96494ee661b5d7d.tar.gz
Mark the makefs(8) '-p' flag as deprecated in preference for
the '-Z' flag for compatibility with NetBSD. Submitted by: Eric van Gyzen (via stable@) MFC after: 3 days
-rw-r--r--usr.sbin/makefs/makefs.811
-rw-r--r--usr.sbin/makefs/makefs.c10
2 files changed, 16 insertions, 5 deletions
diff --git a/usr.sbin/makefs/makefs.8 b/usr.sbin/makefs/makefs.8
index 4d81e45..51e536f 100644
--- a/usr.sbin/makefs/makefs.8
+++ b/usr.sbin/makefs/makefs.8
@@ -35,7 +35,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd August 22, 2012
+.Dd August 16, 2013
.Dt MAKEFS 8
.Os
.Sh NAME
@@ -43,7 +43,7 @@
.Nd create a file system image from a directory tree or a mtree manifest
.Sh SYNOPSIS
.Nm
-.Op Fl Dpx
+.Op Fl DxZ
.Op Fl B Ar byte-order
.Op Fl b Ar free-blocks
.Op Fl d Ar debug-mask
@@ -191,7 +191,10 @@ Set file system specific options.
is a comma separated list of options.
Valid file system specific options are detailed below.
.It Fl p
-Create the image as a sparse file.
+Deprecated.
+See the
+.Fl Z
+flag.
.It Fl S Ar sector-size
Set the file system sector size to
.Ar sector-size .
@@ -213,6 +216,8 @@ ISO 9660 file system.
.El
.It Fl x
Exclude file system nodes not explicitly listed in the specfile.
+.It Fl Z
+Create the image as a sparse file.
.El
.Pp
Where sizes are specified, a decimal number of bytes is expected.
diff --git a/usr.sbin/makefs/makefs.c b/usr.sbin/makefs/makefs.c
index 03ff1ac..bf10034 100644
--- a/usr.sbin/makefs/makefs.c
+++ b/usr.sbin/makefs/makefs.c
@@ -113,7 +113,7 @@ main(int argc, char *argv[])
start_time.tv_sec = start.tv_sec;
start_time.tv_nsec = start.tv_usec * 1000;
- while ((ch = getopt(argc, argv, "B:b:Dd:f:F:M:m:N:o:ps:S:t:x")) != -1) {
+ while ((ch = getopt(argc, argv, "B:b:Dd:f:F:M:m:N:o:ps:S:t:xZ")) != -1) {
switch (ch) {
case 'B':
@@ -205,6 +205,7 @@ main(int argc, char *argv[])
break;
}
case 'p':
+ /* Deprecated in favor of 'Z' */
fsoptions.sparse = 1;
break;
@@ -233,6 +234,11 @@ main(int argc, char *argv[])
fsoptions.onlyspec = 1;
break;
+ case 'Z':
+ /* Superscedes 'p' for compatibility with NetBSD makefs(8) */
+ fsoptions.sparse = 1;
+ break;
+
case '?':
default:
usage();
@@ -354,7 +360,7 @@ usage(void)
fprintf(stderr,
"usage: %s [-t fs-type] [-o fs-options] [-d debug-mask] [-B endian]\n"
"\t[-S sector-size] [-M minimum-size] [-m maximum-size] [-s image-size]\n"
-"\t[-b free-blocks] [-f free-files] [-F mtree-specfile] [-px]\n"
+"\t[-b free-blocks] [-f free-files] [-F mtree-specfile] [-xZ]\n"
"\t[-N userdb-dir] image-file directory | manifest [extra-directory ...]\n",
prog);
exit(1);
OpenPOWER on IntegriCloud