NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/58885: mtree: Fix FreeBSD 9 compatibility output
>Number: 58885
>Category: bin
>Synopsis: mtree: Fix FreeBSD 9 compatibility output
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Dec 09 18:35:00 +0000 2024
>Originator: Jose Luis Duran
>Release: trunk
>Organization:
FreeBSD
>Environment:
>Description:
A FreeBSD user reports[^1] that the output of mtree with freebsd9 format should be "%s extra", not "extra: %s".
[^1]: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199075
>How-To-Repeat:
# mkdir /tmp/foo
# cd /tmp/foo
# touch bar
# mtree -c > /tmp/m
# touch baz
# mtree -f /tmp/m -F freebsd9
. changed
modification time expected Mon Dec 9 12:00:00 2024 found Mon Dec 9 12:00:00 2024
extra: baz
It should have been:
"baz extra", not "extra: baz".
>Fix:
Subject: [PATCH 1/2] mtree: Fix FreeBSD 9 compatibility
The output on FreeBSD should be "%s extra", not "extra: %s".
FreeBSD PR: 199075
---
usr.sbin/mtree/verify.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/usr.sbin/mtree/verify.c b/usr.sbin/mtree/verify.c
index cfe335686afb..be11002cef85 100644
--- a/usr.sbin/mtree/verify.c
+++ b/usr.sbin/mtree/verify.c
@@ -147,7 +147,10 @@ vwalk(void)
continue;
extra:
if (!eflag && !(dflag && p->fts_info == FTS_SL)) {
- printf("extra: %s", RP(p));
+ if (flavor == F_FREEBSD9)
+ printf("%s extra", RP(p));
+ else
+ printf("extra: %s", RP(p));
if (rflag) {
#if HAVE_STRUCT_STAT_ST_FLAGS
if (rflag > 1 &&
--
Jose Luis Duran
Home |
Main Index |
Thread Index |
Old Index