aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/mtree/verify.c
Commit message (Collapse)AuthorAgeFilesLines
* collect all "extern bla" stuff in extern.h in order to get cross-filePoul-Henning Kamp2004-01-111-5/+0
| | | | | | | type checking. No bugs found. Notes: svn path=/head/; revision=124387
* Rename spec() and verify() functions to have mtree_ prefix and takePoul-Henning Kamp2003-11-051-2/+2
| | | | | | | explicit file descriptor instead of assuming stdin. Notes: svn path=/head/; revision=122135
* Remove clause 3 in the copyrights (according to permission in src/COPYRIGHT)Poul-Henning Kamp2003-10-211-6/+2
| | | | | | | Remove trailing whitespace. Notes: svn path=/head/; revision=121300
* Remove "register" keywords.Poul-Henning Kamp2003-10-211-10/+8
| | | | | | | Use newspeak functions definitions. Notes: svn path=/head/; revision=121299
* Use __FBSDID over rcsid[]. Protect copyright[] where needed.David E. O'Brien2003-05-031-4/+4
| | | | Notes: svn path=/head/; revision=114601
* - Align the function prototype of the external `crc' function withRobert Drehmel2003-03-131-2/+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. Notes: svn path=/head/; revision=112214
* fixup for WARNS=4.Alfred Perlstein2002-07-111-1/+2
| | | | Notes: svn path=/head/; revision=99802
* de-__P()Alfred Perlstein2002-07-111-2/+2
| | | | Notes: svn path=/head/; revision=99800
* Make the output of mtree(8) more systematic and machine readable.Poul-Henning Kamp2000-10-031-2/+2
| | | | | | | | | | | | | | | The new format is: filename {changed,missing,extra} $field expected $foo found $bar ... Fix various bugs along the way: Don't complain about directory sizes differing. Correctly check flags. Notes: svn path=/head/; revision=66584
* Add -q. this will cause the warning messages about missingWarner Losh2000-07-251-3/+11
| | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=63853
* Allow symlinks to be created if they appear in the mtree specification.Josef Karthauser2000-07-131-4/+19
| | | | | | | PR: bin/14171 Notes: svn path=/head/; revision=63087
* Added a flag (-S) to mtree to specify that symlinks shouldn't beJosef Karthauser2000-07-131-0/+1
| | | | | | | | | 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. Notes: svn path=/head/; revision=63086
* Give mtree the ability to exclude files and directories from its traversal.Garrett Wollman2000-05-121-0/+4
| | | | | | | PR: 16944 Notes: svn path=/head/; revision=60418
* Added support for file flags, mostly merged from the NetBSD version.Josef Karthauser1999-12-091-0/+6
| | | | | | | | | | | The way is now open to schg and sappnd key files and directories in our tree. There are recommendations in bin/15229. PR: bin/15229 Reviewed by: imp, brian Notes: svn path=/head/; revision=54375
* -Wall fixes.Bill Fumerola1999-09-271-2/+2
| | | | | | | Submitted by: nrahlstr Notes: svn path=/head/; revision=51705
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50479
* There is no need to make nochange imply ignore as well.Peter Wemm1998-06-101-2/+2
| | | | | | | Suggested by: bde Notes: svn path=/head/; revision=36841
* Create a new flag, "nochange", which will specify that a directory isPeter Wemm1998-06-051-7/+8
| | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=36670
* Use err(3) instead of local redefinition.Philippe Charnier1997-10-011-7/+11
| | | | Notes: svn path=/head/; revision=30027
* Use p->fts_level instead of unsuccessfully trying to keep track of theBruce Evans1995-07-241-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | level ourself. We failed for unreadable directories. E.g., `mtree -d -f /etc/mtree/BSD.usr.dist -p /usr' run by `nobody' was confused after it couldn't descend into /usr/games/hide. It looked for /usr/include and subsequent directories in /usr/games. Don't search for `extra' files when the spec depth is less than the fts level. The spec depth isn't incremented for leaf nodes because that would give a NULL level pointer and make it inconvenient to go back to the parent level. Leaf nodes are built for directories that are empty in the spec. Since they are empty in the spec, all files in them are extra. The search looked for files one spec level too high, so for `mtree -d -f /etc/mtree/BSD.usr.dist -p /usr', obj/sbin matched ./sbin and wasn't considered extra, so it was descended into and lots of bogus extra things in it were found. This was harmful for `mtree -U' (as reported in pr623) and worse for `mtree -r'. Use rmdir(), not unlink(), to remove `extra' directories. unlink() succeeds for root but unlinking directories normally damages the file system. Report `fts_errno' instead of `errno' when the former applies. Notes: svn path=/head/; revision=9675
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-3/+3
| | | | Notes: svn path=/head/; revision=8857
* 1. Remove commented out CFLAGS+=-DDEBUG from MakefileRodney W. Grimes1994-09-181-4/+5
| | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=2860
* BSD 4.4 Lite usr.sbin SourcesRodney W. Grimes1994-05-261-0/+202
Notes: svn path=/cvs2svn/branches/WIN_TUE_NL/; revision=1553