summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Luis Duran <jlduran@FreeBSD.org>2026-01-11 16:39:28 +0000
committerJose Luis Duran <jlduran@FreeBSD.org>2026-01-11 16:39:28 +0000
commit7e59b238fcf32f3d365e78ddc702ca494e1ff68d (patch)
tree87f636f2604b1908745197d079e3cb6d2053b3d9
parenteb2ccba0c11b405ac613c3046997765317cc8b5c (diff)
Vendor import of NetBSD's mtree at 2026-01-11vendor/NetBSD/mtree/20260111vendor/NetBSD/mtree
-rw-r--r--create.c7
-rw-r--r--mtree.824
2 files changed, 15 insertions, 16 deletions
diff --git a/create.c b/create.c
index 1a4f006bcfea..03ddf3591ee0 100644
--- a/create.c
+++ b/create.c
@@ -1,4 +1,4 @@
-/* $NetBSD: create.c,v 1.80 2025/12/18 18:16:48 christos Exp $ */
+/* $NetBSD: create.c,v 1.81 2026/01/10 14:53:39 christos Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)create.c 8.1 (Berkeley) 6/6/93";
#else
-__RCSID("$NetBSD: create.c,v 1.80 2025/12/18 18:16:48 christos Exp $");
+__RCSID("$NetBSD: create.c,v 1.81 2026/01/10 14:53:39 christos Exp $");
#endif
#endif /* not lint */
@@ -236,8 +236,7 @@ statf(FILE *fp, int indent, FTSENT *p)
offset += fprintf(fp, "%*s",
(INDENTNAMELEN + indent) - offset, "");
- if (keys & F_TYPE &&
- !S_ISREG(p->fts_statp->st_mode) && (flavor == F_NETBSD6 || !dflag))
+ if (!S_ISREG(p->fts_statp->st_mode) && (flavor == F_NETBSD6 || !dflag))
output(fp, indent, &offset, "type=%s",
inotype(p->fts_statp->st_mode));
if (keys & (F_UID | F_UNAME) && p->fts_statp->st_uid != uid) {
diff --git a/mtree.8 b/mtree.8
index 99e3199de943..4421cf735c99 100644
--- a/mtree.8
+++ b/mtree.8
@@ -1,4 +1,4 @@
-.\" $NetBSD: mtree.8,v 1.78 2023/12/02 13:26:09 christos Exp $
+.\" $NetBSD: mtree.8,v 1.80 2026/01/10 17:12:04 uwe Exp $
.\"
.\" Copyright (c) 1989, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -56,7 +56,7 @@
.\"
.\" @(#)mtree.8 8.2 (Berkeley) 12/11/93
.\"
-.Dd December 2, 2023
+.Dd January 8, 2026
.Dt MTREE 8
.Os
.Sh NAME
@@ -178,8 +178,8 @@ and
respectively.
.
.It Fl f Ar spec
-Read the specification from
-.Ar file ,
+Read the specification from the file
+.Ar spec ,
instead of from the standard input.
.Pp
If this option is specified twice, the two specifications are compared
@@ -242,18 +242,14 @@ If
is specified, add all of the other keywords.
.
.It Fl k Ar keywords
-Use the
+Use the mandatory
.Sy type
keyword plus the specified (whitespace or comma separated)
.Ar keywords
-instead of the current set of keywords.
+to replace the current set of keywords.
If
.Ql all
-is specified, use all of the other keywords.
-If the
-.Sy type
-keyword is not desired, suppress it with
-.Fl R Cm type .
+is specified, use all of the available keywords.
.
.It Fl L
Follow all symbolic links in the file hierarchy.
@@ -338,9 +334,13 @@ This occurs when the directory is a symbolic link.
.It Fl R Ar keywords
Remove the specified (whitespace or comma separated) keywords from the current
set of keywords.
+The
+.Sy type
+keyword is mandatory and is always retained.
If
.Ql all
-is specified, remove all of the other keywords.
+is specified, remove all keywords except
+.Sy type .
.
.It Fl r
Remove any files in the file hierarchy that are not described in the