Commit Graph

104 Commits

Author SHA1 Message Date
phk
d2e6e1566a 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
d081746235 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
2842b44c13 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
6c7fafd896 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
cded8eeadb 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
f8ccdc1dbe Update test-case to also fail on filenames containing '#' 2003-10-30 12:40:54 +00:00
phk
670097c87d 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
013d7d5d53 Add another test-script for mtree(8): Check symlinks with space in them. 2003-10-30 12:01:32 +00:00
phk
4302fb15aa 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
833518ce61 Add a test script which Mtree fails. 2003-10-30 10:46:23 +00:00
phk
1df98ec39d Remove clause 3 in the copyrights (according to permission in src/COPYRIGHT)
Remove trailing whitespace.
2003-10-21 08:27:05 +00:00
phk
4a75754af3 Remove "register" keywords.
Use newspeak functions definitions.
2003-10-21 07:58:52 +00:00
ru
f501f1b590 Get rid of duplicates. 2003-09-14 13:41:59 +00:00
obrien
7797e9f77e Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
tobez
cda67dc7bf The -s option should not assume -U.
MFC After:	2 weeks
2003-03-19 10:56:34 +00:00
robert
ad3af582d5 - 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
5823d30f39 Fix two minor mismatch reporting output errors.
Reviewed by:	phk
MFC After:		3 weeks
2003-03-13 15:14:56 +00:00
ru
88d368906e Uniformly refer to a file system as "file system".
Approved by:	re
2002-12-12 17:26:04 +00:00
ru
239c92ba3c 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
d8d5a39838 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
39aa3f201d Get rid of %qd, and unbreak Alpha build. 2002-07-15 12:17:31 +00:00
charnier
90baea60d8 The .Nm utility 2002-07-14 14:47:15 +00:00
alfred
d754ff4d71 fixup for WARNS=4. 2002-07-11 18:42:53 +00:00
alfred
a5526fd84b de-__P() 2002-07-11 18:31:16 +00:00
alfred
81063fb74b Assume __STDC__, remove non-__STDC__ code. 2002-05-28 19:23:47 +00:00
trhodes
1e5fa500d3 Consistancy check: s/file system/filesystem/g 2002-05-16 02:28:39 +00:00
max
f2a0acc46a Typo. 2002-05-10 03:53:00 +00:00
ru
ff2fe02cac Only compile with strtofflags.c from libc if bootstrapping. 2001-09-24 15:38:38 +00:00
ru
87f0855128 Fix the bootstrapping aid from revision 1.9.
WORLD was renamed to BOOTSTRAPPING.
2001-09-17 11:59:43 +00:00
ru
e6bcd7b5b8 mdoc(7) police: utilize the new .Ex macro. 2001-08-15 09:09:47 +00:00
sheldonh
a10ed321dd can not -> cannot 2001-08-08 18:32:06 +00:00
obrien
4b92fa588b 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
7d1013753f Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
kris
5e8cc45bc8 Mark a static function as __printflike()
MFC After:	1 week
2001-07-05 07:52:56 +00:00
ru
b15a893144 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:42:20 +00:00
ru
42350947e7 Set the default manual section for usr.sbin/ to 8. 2001-03-20 18:17:26 +00:00
ben
5a90713c4b 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
522216623a Prepare for mdoc(7)NG. 2000-12-27 15:30:30 +00:00
ru
c3189e713e mdoc(7) police: use the new features of the Nm macro. 2000-11-20 20:10:44 +00:00
ru
f9c7198049 Avoid use of direct troff requests in mdoc(7) manual pages. 2000-11-10 17:46:15 +00:00
phk
5190795ad0 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
fadfcd8824 Don't whine about modes on symlinks. 2000-10-06 12:27:36 +00:00
phk
dcbc210157 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
25ad27fd84 Re-add -P option (for POSIX-like command line interface) 2000-09-25 16:24:22 +00:00
ache
b436b49df3 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
fa7c371ffa 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
679331023e 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
8c4b6f6a00 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
bcb0ee3118 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
sheldonh
fd7e0f6b61 Correct the usage() message as per rev 1.25 of mtree.8 . 2000-07-17 11:00:55 +00:00