History log of /freebsd-11-stable/usr.sbin/fmtree/mtree.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 302408 07-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


/freebsd-11-stable/MAINTAINERS
/freebsd-11-stable/cddl
/freebsd-11-stable/cddl/contrib/opensolaris
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/print
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/zfs
/freebsd-11-stable/cddl/contrib/opensolaris/lib/libzfs
/freebsd-11-stable/contrib/amd
/freebsd-11-stable/contrib/apr
/freebsd-11-stable/contrib/apr-util
/freebsd-11-stable/contrib/atf
/freebsd-11-stable/contrib/binutils
/freebsd-11-stable/contrib/bmake
/freebsd-11-stable/contrib/byacc
/freebsd-11-stable/contrib/bzip2
/freebsd-11-stable/contrib/com_err
/freebsd-11-stable/contrib/compiler-rt
/freebsd-11-stable/contrib/dialog
/freebsd-11-stable/contrib/dma
/freebsd-11-stable/contrib/dtc
/freebsd-11-stable/contrib/ee
/freebsd-11-stable/contrib/elftoolchain
/freebsd-11-stable/contrib/elftoolchain/ar
/freebsd-11-stable/contrib/elftoolchain/brandelf
/freebsd-11-stable/contrib/elftoolchain/elfdump
/freebsd-11-stable/contrib/expat
/freebsd-11-stable/contrib/file
/freebsd-11-stable/contrib/gcc
/freebsd-11-stable/contrib/gcclibs/libgomp
/freebsd-11-stable/contrib/gdb
/freebsd-11-stable/contrib/gdtoa
/freebsd-11-stable/contrib/groff
/freebsd-11-stable/contrib/ipfilter
/freebsd-11-stable/contrib/ldns
/freebsd-11-stable/contrib/ldns-host
/freebsd-11-stable/contrib/less
/freebsd-11-stable/contrib/libarchive
/freebsd-11-stable/contrib/libarchive/cpio
/freebsd-11-stable/contrib/libarchive/libarchive
/freebsd-11-stable/contrib/libarchive/libarchive_fe
/freebsd-11-stable/contrib/libarchive/tar
/freebsd-11-stable/contrib/libc++
/freebsd-11-stable/contrib/libc-vis
/freebsd-11-stable/contrib/libcxxrt
/freebsd-11-stable/contrib/libexecinfo
/freebsd-11-stable/contrib/libpcap
/freebsd-11-stable/contrib/libstdc++
/freebsd-11-stable/contrib/libucl
/freebsd-11-stable/contrib/libxo
/freebsd-11-stable/contrib/llvm
/freebsd-11-stable/contrib/llvm/projects/libunwind
/freebsd-11-stable/contrib/llvm/tools/clang
/freebsd-11-stable/contrib/llvm/tools/lldb
/freebsd-11-stable/contrib/llvm/tools/llvm-dwarfdump
/freebsd-11-stable/contrib/llvm/tools/llvm-lto
/freebsd-11-stable/contrib/mdocml
/freebsd-11-stable/contrib/mtree
/freebsd-11-stable/contrib/ncurses
/freebsd-11-stable/contrib/netcat
/freebsd-11-stable/contrib/ntp
/freebsd-11-stable/contrib/nvi
/freebsd-11-stable/contrib/one-true-awk
/freebsd-11-stable/contrib/openbsm
/freebsd-11-stable/contrib/openpam
/freebsd-11-stable/contrib/openresolv
/freebsd-11-stable/contrib/pf
/freebsd-11-stable/contrib/sendmail
/freebsd-11-stable/contrib/serf
/freebsd-11-stable/contrib/sqlite3
/freebsd-11-stable/contrib/subversion
/freebsd-11-stable/contrib/tcpdump
/freebsd-11-stable/contrib/tcsh
/freebsd-11-stable/contrib/tnftp
/freebsd-11-stable/contrib/top
/freebsd-11-stable/contrib/top/install-sh
/freebsd-11-stable/contrib/tzcode/stdtime
/freebsd-11-stable/contrib/tzcode/zic
/freebsd-11-stable/contrib/tzdata
/freebsd-11-stable/contrib/unbound
/freebsd-11-stable/contrib/vis
/freebsd-11-stable/contrib/wpa
/freebsd-11-stable/contrib/xz
/freebsd-11-stable/crypto/heimdal
/freebsd-11-stable/crypto/openssh
/freebsd-11-stable/crypto/openssl
/freebsd-11-stable/gnu/lib
/freebsd-11-stable/gnu/usr.bin/binutils
/freebsd-11-stable/gnu/usr.bin/cc/cc_tools
/freebsd-11-stable/gnu/usr.bin/gdb
/freebsd-11-stable/lib/libc/locale/ascii.c
/freebsd-11-stable/sys/cddl/contrib/opensolaris
/freebsd-11-stable/sys/contrib/dev/acpica
/freebsd-11-stable/sys/contrib/ipfilter
/freebsd-11-stable/sys/contrib/libfdt
/freebsd-11-stable/sys/contrib/octeon-sdk
/freebsd-11-stable/sys/contrib/x86emu
/freebsd-11-stable/sys/contrib/xz-embedded
/freebsd-11-stable/usr.sbin/bhyve/atkbdc.h
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.c
/freebsd-11-stable/usr.sbin/bhyve/bhyvegc.h
/freebsd-11-stable/usr.sbin/bhyve/console.c
/freebsd-11-stable/usr.sbin/bhyve/console.h
/freebsd-11-stable/usr.sbin/bhyve/pci_fbuf.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.c
/freebsd-11-stable/usr.sbin/bhyve/pci_xhci.h
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.c
/freebsd-11-stable/usr.sbin/bhyve/ps2kbd.h
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.c
/freebsd-11-stable/usr.sbin/bhyve/ps2mouse.h
/freebsd-11-stable/usr.sbin/bhyve/rfb.c
/freebsd-11-stable/usr.sbin/bhyve/rfb.h
/freebsd-11-stable/usr.sbin/bhyve/sockstream.c
/freebsd-11-stable/usr.sbin/bhyve/sockstream.h
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.c
/freebsd-11-stable/usr.sbin/bhyve/usb_emul.h
/freebsd-11-stable/usr.sbin/bhyve/usb_mouse.c
/freebsd-11-stable/usr.sbin/bhyve/vga.c
/freebsd-11-stable/usr.sbin/bhyve/vga.h
# 290623 09-Nov-2015 bdrewery

Rename usr.sbin/mtree to usr.sbin/fmtree since it is not what /usr/sbin/mtree
actually is (which is usr.sbin/nmtree).

This has tricked me numerous times.


# 241777 20-Oct-2012 ed

More -Wmissing-variable-declarations fixes.

In addition to adding missing `static' keywords:
- bin/dd: Pull in `extern.h' to guarantee consistency with source file.
- libexec/rpc.rusersd: Move shared globals into an extern.h.
- libexec/talkd: Move `debug' and `hostname' into extern.h.
- usr.bin/cksum: Put counters in extern.h, as they are used by ckdist/mtree.
- usr.bin/m4: Move `end_result' into extern.h.
- usr.sbin/services_mkdb: Move shared globals into an extern.h.


# 173282 02-Nov-2007 keramida

mtree should use getcwd() instead of getwd(). getcwd() is safer,
because it includes checks for the length of the buffer it uses.

Reviewed by: phk, cperciva
MFC after: 3 days


# 130094 04-Jun-2004 ru

Added forgotten -w to the usage().


# 124389 11-Jan-2004 phk

Get rid of "lineno: 0" in error messages from create mode.

Add -w(arning) flag which makes failure to look up uid/gid
a nonfatal warning instead of an error.


# 122141 05-Nov-2003 phk

Give mtree(8) the ability to take [two -f spec] arguments and compare
the two specifications to each other.


# 122135 05-Nov-2003 phk

Rename spec() and verify() functions to have mtree_ prefix and take
explicit file descriptor instead of assuming stdin.


# 121300 21-Oct-2003 phk

Remove clause 3 in the copyrights (according to permission in src/COPYRIGHT)
Remove trailing whitespace.


# 121299 21-Oct-2003 phk

Remove "register" keywords.
Use newspeak functions definitions.


# 114601 03-May-2003 obrien

Use __FBSDID over rcsid[]. Protect copyright[] where needed.


# 112403 19-Mar-2003 tobez

The -s option should not assume -U.

MFC After: 2 weeks


# 112214 13-Mar-2003 robert

- Align the function prototype of the external `crc' function with
how `crc' is actually defined.
- Remove an unnecessary `extern' variable declaration.
Data type corrections:
- Define a variable which contains a file byte offset value as type
off_t as required by the `crc' function.
- Change the type of a variable carrying a CRC checksum from `u_long'
to `uint32_t'.
- Substitute the wrong `extern' variable declaration of `crc_total'
by putting a correct one in the shared header extern.h.
`crc_total' is defined as an `uint32_t', thus fixing
incorrect mtree checksums on big-endian LP64 machines.


# 99802 11-Jul-2002 alfred

fixup for WARNS=4.


# 99800 11-Jul-2002 alfred

de-__P()


# 66357 25-Sep-2000 ache

Re-add -P option (for POSIX-like command line interface)


# 65882 15-Sep-2000 ache

Restore standard symlink default, return -L, remove -P, add missing -q to getopt
This is part of whole subsystem fixing

Reviewed by: imp


# 63853 25-Jul-2000 imp

Add -q. this will cause the warning messages about missing
directories to not be printed. This is from OpenBSD (and I think
NetBSD also) and makes our mtree more compatible with other BSDs.
This makes cross compilation easier than it was before. Other changes
will be needed to allow NetBSD or OpenBSD to cross build on FreeBSD,
but this is a start.

Reviewed by: andrey
Obtained from: OpenBSD
Concentric Red Circles by: My own stupidity


# 63786 24-Jul-2000 marcel

Revert the reversion of the default mtree behaviour. The mtree
command now follows symlinks again.

Requested by: jkh


# 63305 17-Jul-2000 sheldonh

Correct the usage() message as per rev 1.25 of mtree.8 .


# 63261 16-Jul-2000 ache

Fix getopt string I forget


# 63255 16-Jul-2000 ache

Revert back to original mtree default behaviour to not follow symlinks, to be
compatible with other *BSD camp. Add -L option to follow symlinks, so remove
-P option which is now default. The next step will be to add -L to building
process.

Asked-by: bde


# 63127 14-Jul-2000 joe

Use -P instead of -S to specify that no symlinks should be followed.
There's no reason to make it different from cp(1), chmod(1), chown(1)
etc.

Requested by: sheldonh


# 63086 13-Jul-2000 joe

Added a flag (-S) to mtree to specify that symlinks shouldn't be
followed. This allows type=link matches to work properly and match
the link itself, instead of the file/directory that the link is
pointing to.


# 60418 12-May-2000 wollman

Give mtree the ability to exclude files and directories from its traversal.

PR: 16944


# 50479 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 36670 05-Jun-1998 peter

Create a new flag, "nochange", which will specify that a directory is
to be created if it's missing, otherwise completely ignore it's modes and
owners. Primary intended targets: /usr/src and /usr/obj.

Adjust the 'not created: File exists' message to mention that it's a
directory that's the problem, otherwise it doesn't make sense.

I had created chown-style -L and -P flag to control logical/physical mode
(ie: whether symlinks were followed), but the nochange flag is enough to
get the blasted thing out of my hair so I took them back out.


# 30027 01-Oct-1997 charnier

Use err(3) instead of local redefinition.


# 25831 15-May-1997 ache

Change FTS_PHYSICAL (not follow symlinks but return them)
to FTS_LOGICAL (follow symlinks and return their targets)

Because
1) In the real system there is a lot of symlinks nowdays over
/var, /spool, etc. Mtree can't do anything for them, i.e. change
permissions/owner. I.e. if you have /var/mail -> /somewhere
it will never be changed to group "mail" 775 like -current does now,
symlink totally confuses mtree.

2) Mtree can't deal with symlinks properly in any case (they are created
separately in other places now), so we lost no functionality by making
them invisible for mtree.


# 24428 31-Mar-1997 imp

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


# 3468 09-Oct-1994 rgrimes

Add -U option which does the same things as -u except exits with 0
instead of 2 on MISMATCH.


# 2860 18-Sep-1994 rgrimes

1. Remove commented out CFLAGS+=-DDEBUG from Makefile

2. Clean up code so it compiles -Wall (except for sccsid's and copyright).
This included fixing several printf formats that where not correct,
and changing the data types of a few things.

3. Implement new option -i that produces indented mtree output files.

4. Implement new option -n that turns off directory comments.

5. Only emit /set records if something has changed since the last one.


# 1554 26-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1553,
which included commits to RCS files with non-trunk default branches.


# 1553 26-May-1994 rgrimes

BSD 4.4 Lite usr.sbin Sources