Commit Graph

87 Commits

Author SHA1 Message Date
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
sheldonh
2a5bc94ad6 * Order options in the SYNOPSIS correctly.
*	Re-order the list of options in teh DESCRIPTION as per
	the SYNOPSIS.
   *	Move the description of exit conditions from the
	DESCRIPTION section to a new DIAGNOSTICS section.
   *	Typo fix: "effect" -> "affect" when used as a verb.
   *	Clear the Nm macro as appropriate.
   *	Typo fix: "consider" -> "considers" for a singular subject.
   *	Use Nx instead of NetBSD.
2000-07-17 10:59:38 +00:00
ache
f94ad300fc Fix getopt string I forget 2000-07-16 08:22:38 +00:00
ache
ed2d9347d9 Revert back to original mtree default behaviour to not follow symlinks, to be
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
2000-07-16 07:55:07 +00:00
sheldonh
a79195f048 Fix the NAME section. Order the options which do not take arguments,
add the -P option (introduced in rev 1.22), and use mdoc word keeps
(Bk -words / Ek) for those options which do take arguments.
2000-07-14 10:30:36 +00:00
joe
50e032cc63 Use -P instead of -S to specify that no symlinks should be followed.
There's no reason to make it different from cp(1), chmod(1), chown(1)
etc.

Requested by:	sheldonh
2000-07-14 09:37:59 +00:00
joe
e018302a28 Allow symlinks to be created if they appear in the mtree specification.
PR:	bin/14171
2000-07-13 22:28:39 +00:00
joe
e2941aeeab Added a flag (-S) to mtree to specify that symlinks shouldn't be
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.
2000-07-13 22:13:42 +00:00
joe
d38d9a6248 Switch over to using the new fflagstostr and strtofflags library calls. 2000-06-17 14:19:33 +00:00
charnier
c5ef3204f6 Use .Fx 2000-05-28 15:03:14 +00:00
jake
5e208b0c18 Back out the previous change to the queue(3) interface.
It was not discussed and should probably not happen.

Requested by:		msmith and others
2000-05-26 02:09:24 +00:00
jake
1d685644e0 Change the way that the queue(3) structures are declared; don't assume that
the type argument to *_HEAD and *_ENTRY is a struct.

Suggested by:	phk
Reviewed by:	phk
Approved by:	mdodd
2000-05-23 20:41:01 +00:00
wollman
47f3139e86 Punctuation fix. 2000-05-16 16:41:28 +00:00
wollman
efe8d2f26d Add used includes. 2000-05-16 16:38:52 +00:00
wollman
b090fdd326 Add excludes.c (missed in previous commit).
PR:		16944
2000-05-13 03:11:45 +00:00
wollman
f6e5849f4b Give mtree the ability to exclude files and directories from its traversal.
PR:		16944
2000-05-12 03:03:00 +00:00
joe
bb1bbb6d1f Revert part of the last commit, remove {g|s}etflags from the libc
interface, and statically link them to the programs using them.
These functions, upon reflection and discussion, are too generically
named for a library interface with such specific functionality.
Also the api that they use, whilst ok for private use, isn't good
enough for a libc function.

Additionally there were complications with the build/install-world
process.  It depends heavily upon xinstall, which got broken by
the change in api, and caused bootstrap problems and general mayhem.

There is work in progress to address future problems that may be
caused by changes in install-chain tools, and better names for
{g|s}etflags can be derived when some future program requires them.
For now the code has been left in src/lib/libc/gen (it started off
in src/bin/ls).

It's important to provide library functions for manipulating file
flag strings if we ever want this interface to be adopted outside
of the source tree, but now isn't necessarily the right moment
with 4.0-release just around the corner.

Approved:	jkh
2000-02-05 18:42:36 +00:00
joe
a3a381812b Historically file flags (schg, uschg, etc) have been converted from
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 ;)
2000-01-27 21:17:01 +00:00