Commit Graph

105 Commits

Author SHA1 Message Date
phk
7b725c873e Add a small testcase for the new -f-f mode. 2003-11-05 22:26:39 +00:00
phk
7a3cd410f3 Give mtree(8) the ability to take [two -f spec] arguments and compare
the two specifications to each other.
2003-11-05 22:26:08 +00:00
phk
c1f70887cd Rename spec() and verify() functions to have mtree_ prefix and take
explicit file descriptor instead of assuming stdin.
2003-11-05 20:07:40 +00:00
phk
a88a9d9e80 Take advantage of the fact that we know the err(3) function does not
return to eliminate some else clauses and gain some "outdenting".
2003-11-05 20:05:05 +00:00
bde
5e44220cea Fixed breakage of my world in rev.1.30. #include <sys/time.h> instead of
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.
2003-11-01 08:43:54 +00:00
phk
4ad1bf0342 Make mtree's update function update the modification time too.
Submitted by:	Dan Nelson <dnelson@allantgroup.com>
PR:	53063
2003-10-31 13:39:19 +00:00
phk
bb5c5b4c57 Update test-case to also fail on filenames containing '#' 2003-10-30 12:40:54 +00:00
phk
10c0052ec4 Use vis(3) to encode/decode the target for symlinks.
Make vis(3) decode errors fatal for both symlink targets and fienames.
2003-10-30 12:03:25 +00:00
phk
3b266c3cbf Add another test-script for mtree(8): Check symlinks with space in them. 2003-10-30 12:01:32 +00:00
phk
039259050d Fix bug in mtree(8)'s create mode where files or directories with had
names containing glob(3) expressions would appear verbatim in the
output.

If such an mtree file were used by mtree in update mode, wrong things
would happen.
2003-10-30 10:48:43 +00:00
phk
69589e7dad Add a test script which Mtree fails. 2003-10-30 10:46:23 +00:00
phk
d17fa4e775 Remove clause 3 in the copyrights (according to permission in src/COPYRIGHT)
Remove trailing whitespace.
2003-10-21 08:27:05 +00:00
phk
b8f582b886 Remove "register" keywords.
Use newspeak functions definitions.
2003-10-21 07:58:52 +00:00
ru
cc9d2aeb39 Get rid of duplicates. 2003-09-14 13:41:59 +00:00
obrien
7293a24a2b Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
tobez
c56269f940 The -s option should not assume -U.
MFC After:	2 weeks
2003-03-19 10:56:34 +00:00
robert
f0edd7ef8f - 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.
2003-03-13 23:35:30 +00:00
tobez
48bb025c58 Fix two minor mismatch reporting output errors.
Reviewed by:	phk
MFC After:		3 weeks
2003-03-13 15:14:56 +00:00
ru
041d1287e8 Uniformly refer to a file system as "file system".
Approved by:	re
2002-12-12 17:26:04 +00:00
ru
309ad85605 mtree(8) wasn't a bootstrap tool since 2000/07/23 (Makefile.inc1,v 1.161). 2002-11-13 12:03:27 +00:00
wollman
aa09d8b564 Make the threatened fts(3) ABI fix. FTSENT now avoids the use of the struct
hack, thereby allowing future extensions to the structure (e.g., for extended
attributes) without rebreaking the ABI.  FTSENT now contains a pointer to the
parent stream, which fts_compar() can then take advantage of, avoiding the
undefined behavior previously warned about.  As a consequence of this change,
the prototype of the comparison function passed to fts_open() has changed
to reflect the required amount of constness for its use.  All callers in the
tree are updated to use the correct prototype.

Comparison functions can now make use of the new parent pointer to access
the new stream-specific private data pointer, which is intended to assist
creation of reentrant library routines which use fts(3) internally.

Not objected to in spirit by: -arch
2002-09-21 01:28:41 +00:00
des
e0ecf9a222 Get rid of %qd, and unbreak Alpha build. 2002-07-15 12:17:31 +00:00
charnier
d2168fe021 The .Nm utility 2002-07-14 14:47:15 +00:00
alfred
5071cb67d9 fixup for WARNS=4. 2002-07-11 18:42:53 +00:00
alfred
c40ae61c8c de-__P() 2002-07-11 18:31:16 +00:00
alfred
197cf7d2ba Assume __STDC__, remove non-__STDC__ code. 2002-05-28 19:23:47 +00:00
trhodes
7d7bd3ffde Consistancy check: s/file system/filesystem/g 2002-05-16 02:28:39 +00:00
max
ab8b1fb87e Typo. 2002-05-10 03:53:00 +00:00
ru
a6b2db14f6 Only compile with strtofflags.c from libc if bootstrapping. 2001-09-24 15:38:38 +00:00
ru
8a8366047f Fix the bootstrapping aid from revision 1.9.
WORLD was renamed to BOOTSTRAPPING.
2001-09-17 11:59:43 +00:00
ru
bde8ec1b70 mdoc(7) police: utilize the new .Ex macro. 2001-08-15 09:09:47 +00:00
sheldonh
7950d85ec2 can not -> cannot 2001-08-08 18:32:06 +00:00
obrien
9c97c8f02d Perform a major cleanup of the usr.sbin Makefiles.
These are not perfectly in agreement with each other style-wise, but they
are orders of orders of magnitude more consistent style-wise than before.
2001-07-20 06:20:32 +00:00
dd
911ca14c87 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
kris
38cc36696a Mark a static function as __printflike()
MFC After:	1 week
2001-07-05 07:52:56 +00:00
ru
afd506414e - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:42:20 +00:00
ru
f10dc9aca1 Set the default manual section for usr.sbin/ to 8. 2001-03-20 18:17:26 +00:00
ben
aa10518020 Convert to use the <sys/queue.h> macros rather than fiddling with the queue
structure internals.

Reviewed by:	markm
2000-12-29 18:04:54 +00:00
ru
4bb5f49662 Prepare for mdoc(7)NG. 2000-12-27 15:30:30 +00:00
ru
71e2293ad4 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 20:10:44 +00:00
ru
a6f5d950d8 Avoid use of direct troff requests in mdoc(7) manual pages. 2000-11-10 17:46:15 +00:00
phk
78f27a920c Don't try to compare other attributes if the type doesn't match, it's
nothing but trouble, and no use anyway.
2000-10-06 12:48:55 +00:00
phk
2e5c04d01b Don't whine about modes on symlinks. 2000-10-06 12:27:36 +00:00
phk
42e3d092ba Make the output of mtree(8) more systematic and machine readable.
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.
2000-10-03 13:13:47 +00:00
ache
4de572eae8 Re-add -P option (for POSIX-like command line interface) 2000-09-25 16:24:22 +00:00
ache
d58c3debc9 Restore standard symlink default, return -L, remove -P, add missing -q to getopt
This is part of whole subsystem fixing

Reviewed by:	imp
2000-09-15 08:05:37 +00:00
sheldonh
35614d23c5 Pass a useful pathname to rlink(). Many thanks to the PR originator
for all the debugging work.

PR:		21017
Reported by:	Gerhard Sittig <Gerhard.Sittig@gmx.net>
Submitted by:	Jos Backus <josb@cncdsl.com>,
2000-09-13 12:54:33 +00:00
imp
054be419e8 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
2000-07-25 19:05:09 +00:00
marcel
35aeef29b5 Revert the reversion of the default mtree behaviour. The mtree
command now follows symlinks again.

Requested by: jkh
2000-07-24 02:57:27 +00:00
imp
58095102ff First attempt to fix a buildworld from -stable machine. Explicitly
include strtofflags.c from lib/libc/gen when building mtree until the
current dependency mess with mtree is fixed.
2000-07-23 06:15:54 +00:00