summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mtree/compare.c
Commit message (Collapse)AuthorAgeFilesLines
* Change all our own code to use st_*tim instead of st_*timespec.ed2010-03-281-3/+3
| | | | Also remove some local patches to diff(1) which are now unneeded.
* Adds sha256 support. While it is a good idea to also add sha384 andtobez2005-03-291-0/+21
| | | | | | | | | | | | | | sha512, I did not do that since it is not entirely clear where "the one true place" to hold their implementations is going to be. Sha256 is different since mtree already links against libmd. Make recommended procedure for integrity checking in the manpage consistent. Fix a bug with -f spec1 -f spec2 comparison, which prevented test/tes03.sh from running successfully. Reviewed by: phk, cperciva
* collect all "extern bla" stuff in extern.h in order to get cross-filephk2004-01-111-3/+0
| | | | type checking. No bugs found.
* Give mtree(8) the ability to take [two -f spec] arguments and comparephk2003-11-051-3/+1
| | | | the two specifications to each other.
* Fixed breakage of my world in rev.1.30. #include <sys/time.h> instead ofbde2003-11-011-13/+9
| | | | | | | | | | | | | depending on namespace pollution in <sys/stat.h> for the declarations of struct timeval and utimes(). Fixed some style bugs in rev.1.30 and some nearby style bugs (mainly unsorting and missing or extra blank lines). Removed a wrong comment that was obtained from NetBSD in rev.1.14. It said that chflags() reset the times that were set "above" by utimes(), but utimes wasn't "above" in FreeBSD until rev.1.30, and chflags() does't actually reset the times.
* Make mtree's update function update the modification time too.phk2003-10-311-1/+14
| | | | | Submitted by: Dan Nelson <dnelson@allantgroup.com> PR: 53063
* Use vis(3) to encode/decode the target for symlinks.phk2003-10-301-3/+6
| | | | Make vis(3) decode errors fatal for both symlink targets and fienames.
* Remove clause 3 in the copyrights (according to permission in src/COPYRIGHT)phk2003-10-211-6/+2
| | | | Remove trailing whitespace.
* Remove "register" keywords.phk2003-10-211-11/+5
| | | | Use newspeak functions definitions.
* Use __FBSDID over rcsid[]. Protect copyright[] where needed.obrien2003-05-031-4/+4
|
* - Align the function prototype of the external `crc' function withrobert2003-03-131-3/+3
| | | | | | | | | | | | | | 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.
* Fix two minor mismatch reporting output errors.tobez2003-03-131-2/+2
| | | | | Reviewed by: phk MFC After: 3 weeks
* Get rid of %qd, and unbreak Alpha build.des2002-07-151-2/+3
|
* fixup for WARNS=4.alfred2002-07-111-5/+6
|
* de-__P()alfred2002-07-111-1/+1
|
* Don't try to compare other attributes if the type doesn't match, it'sphk2000-10-061-0/+1
| | | | nothing but trouble, and no use anyway.
* Don't whine about modes on symlinks.phk2000-10-061-0/+1
|
* Make the output of mtree(8) more systematic and machine readable.phk2000-10-031-41/+37
| | | | | | | | | | | | 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.
* Pass a useful pathname to rlink(). Many thanks to the PR originatorsheldonh2000-09-131-1/+2
| | | | | | | | for all the debugging work. PR: 21017 Reported by: Gerhard Sittig <Gerhard.Sittig@gmx.net> Submitted by: Jos Backus <josb@cncdsl.com>,
* Switch over to using the new fflagstostr and strtofflags library calls.joe2000-06-171-4/+9
|
* Historically file flags (schg, uschg, etc) have been converted fromjoe2000-01-271-2/+2
| | | | | | | | | | | | | | | | | string to u_long and back using two functions, flags_to_string and string_to_flags, which co-existed with 'ls'. As time has progressed more and more other tools have used these private functions to manipulate the file flags. Recently I moved these functions from /usr/src/bin/ls to libutil, but after some discussion with bde it's been decided that they really ought to go in libc. There are two already existing libc functions for manipulating file modes: setmode and getmode. In keeping with these flags_to_string has been renamed getflags and string_to_flags to setflags. The manual page could probably be improved upon ;)
* Added support for file flags, mostly merged from the NetBSD version.joe1999-12-091-0/+22
| | | | | | | | 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
* -Wall fixes.billf1999-09-271-1/+2
| | | | Submitted by: nrahlstr
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Add support for SHA-1 and RIPEMD160, now that libmd includes them. Makewollman1999-02-261-2/+48
| | | | | all of the hashes (including MD5) conditionalized in case we want to turn one of them off later.
* Fixed printf format errors.bde1998-08-021-3/+3
|
* Use correct size for readlink buffer. This is the size of theimp1998-06-091-2/+2
| | | | | | buffer -1 since readlink adds its own NUL to the end. Inspired by: Similar changes in OpenBSD
* Use err(3) instead of local redefinition.charnier1997-10-011-3/+9
|
* ts_sec -> tv_secnate1996-09-201-4/+4
| | | | | | ts_nsec -> tv_nsec Pointed out by: bde
* Fix to match new MD5 api, faster.phk1995-07-121-5/+2
|
* Remove trailing whitespace.rgrimes1995-05-301-3/+3
|
* mtree * MD5 = better securitywollman1995-02-101-0/+21
| | | | Idea from: Dr. John T. Wroclawski
* Fixed bug caused by missing set of paranthesis when checking the modificationdg1994-09-241-3/+3
| | | | | | | time. This caused differences in the nanosecond portion of the time to screwup the logic and made mtree think it should compare the modtime even though "time" wasn't specified. The end result is that mtree couldn't deal with procfs because procfs sets the mtime with high accuracy via microtime().
* 1. Remove commented out CFLAGS+=-DDEBUG from Makefilergrimes1994-09-181-7/+7
| | | | | | | | | | | | 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/+271
OpenPOWER on IntegriCloud