summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mtree/mtree.c
Commit message (Collapse)AuthorAgeFilesLines
* More -Wmissing-variable-declarations fixes.ed2012-10-201-1/+2
| | | | | | | | | | 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.
* mtree should use getcwd() instead of getwd(). getcwd() is safer,keramida2007-11-021-1/+1
| | | | | | | because it includes checks for the length of the buffer it uses. Reviewed by: phk, cperciva MFC after: 3 days
* Added forgotten -w to the usage().ru2004-06-041-1/+1
|
* Get rid of "lineno: 0" in error messages from create mode.phk2004-01-111-2/+5
| | | | | Add -w(arning) flag which makes failure to look up uid/gid a nonfatal warning instead of an error.
* Give mtree(8) the ability to take [two -f spec] arguments and comparephk2003-11-051-4/+18
| | | | the two specifications to each other.
* Rename spec() and verify() functions to have mtree_ prefix and takephk2003-11-051-1/+1
| | | | explicit file descriptor instead of assuming stdin.
* Remove clause 3 in the copyrights (according to permission in src/COPYRIGHT)phk2003-10-211-5/+1
| | | | Remove trailing whitespace.
* Remove "register" keywords.phk2003-10-211-1/+1
| | | | Use newspeak functions definitions.
* Use __FBSDID over rcsid[]. Protect copyright[] where needed.obrien2003-05-031-4/+4
|
* The -s option should not assume -U.tobez2003-03-191-0/+1
| | | | MFC After: 2 weeks
* - Align the function prototype of the external `crc' function withrobert2003-03-131-3/+1
| | | | | | | | | | | | | | 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.
* fixup for WARNS=4.alfred2002-07-111-3/+1
|
* de-__P()alfred2002-07-111-1/+1
|
* Re-add -P option (for POSIX-like command line interface)ache2000-09-251-2/+6
|
* Restore standard symlink default, return -L, remove -P, add missing -q to getoptache2000-09-151-7/+7
| | | | | | This is part of whole subsystem fixing Reviewed by: imp
* Add -q. this will cause the warning messages about missingimp2000-07-251-2/+5
| | | | | | | | | | | | 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
* Revert the reversion of the default mtree behaviour. The mtreemarcel2000-07-241-7/+7
| | | | | | command now follows symlinks again. Requested by: jkh
* Correct the usage() message as per rev 1.25 of mtree.8 .sheldonh2000-07-171-1/+1
|
* Fix getopt string I forgetache2000-07-161-1/+1
|
* Revert back to original mtree default behaviour to not follow symlinks, to beache2000-07-161-6/+6
| | | | | | | | 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
* Use -P instead of -S to specify that no symlinks should be followed.joe2000-07-141-5/+5
| | | | | | | There's no reason to make it different from cp(1), chmod(1), chown(1) etc. Requested by: sheldonh
* Added a flag (-S) to mtree to specify that symlinks shouldn't bejoe2000-07-131-1/+5
| | | | | | 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.
* Give mtree the ability to exclude files and directories from its traversal.wollman2000-05-121-2/+8
| | | | PR: 16944
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Create a new flag, "nochange", which will specify that a directory ispeter1998-06-051-2/+2
| | | | | | | | | | | | 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.
* Use err(3) instead of local redefinition.charnier1997-10-011-9/+12
|
* Change FTS_PHYSICAL (not follow symlinks but return them)ache1997-05-151-1/+1
| | | | | | | | | | | | | | | 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.
* compare return value from getopt against -1 rather than EOF, per the finalimp1997-03-311-1/+1
| | | | posix standard on the topic.
* Add -U option which does the same things as -u except exits with 0rgrimes1994-10-091-4/+12
| | | | instead of 2 on MISMATCH.
* 1. Remove commented out CFLAGS+=-DDEBUG from Makefilergrimes1994-09-181-4/+10
| | | | | | | | | | | | 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.
* BSD 4.4 Lite usr.sbin Sourcesrgrimes1994-05-261-0/+146
OpenPOWER on IntegriCloud