Commit Graph

42 Commits

Author SHA1 Message Date
markm
0336d895cd Remove clause 3 from the UCB licenses.
OK'ed by:	imp, core
2004-04-06 20:06:54 +00:00
ceri
10e2049365 Only call chflags() on directories once.
Approved by:	ru
MFC after:	1 week
2004-02-18 18:45:11 +00:00
ru
893eb75dd2 mdoc(7) police: Fix document date.
Approved by:	re (blanket)
2003-05-16 21:18:01 +00:00
obrien
572f026053 Make GCC 3.3 STFU about copyright[]. 2003-05-01 14:45:27 +00:00
johan
48aef263a7 Document how to clear flags with negative-logic, currently only
the nodump flag.

PR:		46912
Reported by:	dave@syix.com <dave@syix.com>
MFC after:	2 weeks
2003-03-24 20:15:58 +00:00
obrien
22f21fa049 We can simplify this Makefile down to a single line now. 2003-02-19 16:56:30 +00:00
dwmalone
e3e153e6ce ANSIify function definitions.
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.

Reviewed by:	md5
2002-09-04 23:29:10 +00:00
jmallett
51dc8825ab Remove local prototypes for main(). 2002-08-19 03:07:56 +00:00
markm
ef86bac488 Reorder for style. 2002-04-28 13:54:45 +00:00
imp
0338ac6a1a remove __P 2002-03-22 01:22:50 +00:00
markm
72f8b8d824 Remove leaf node WARNS?=2 (that mainly I added). This should
help the GCC3 transition and CURRENT in general.
2002-02-08 22:31:43 +00:00
dwmalone
7a4ad1e332 Style improvements recommended by Bruce as a follow up to some
of the recent WARNS commits. The idea is:

1) FreeBSD id tags should follow vendor tags.
2) Vendor tags should not be compiled (though copyrights probably should).
3) There should be no blank line between including cdefs and __FBSDIF.
2001-12-10 21:13:08 +00:00
markm
de53fee7fb Slight makefile style.
Use __FBSDID().
2001-12-02 23:04:14 +00:00
ru
e6bcd7b5b8 mdoc(7) police: utilize the new .Ex macro. 2001-08-15 09:09:47 +00:00
dd
ec59248b42 WARNS= -> WARNS?=
Submitted by:	Mike Barcroft <mike@q9media.com>
2001-06-22 21:38:30 +00:00
ru
363940f316 Follow symbolic links named as command line arguments if run without -R.
This is required by symlink(7), ``Commands not traversing a file tree''
subsection, third paragraph:

: It is important to realize that this rule includes commands which may
: optionally traverse file trees, e.g. the command ``chown file'' is
: included in this rule, while the command ``chown -R file'' is not.

For chown(8) and chgrp(1), this is also is compliance with the latest
POSIX 1003.1-200x draft.

MFC after:	1 week
2001-05-28 12:58:10 +00:00
ru
74c5a70065 Make it clear that -P is the default.
PR:		docs/27629
2001-05-25 07:32:58 +00:00
kris
bff48195c5 Silence WARNS=2 and BDECFLAGS on alpha and i386
MFC after:      1 week
2001-05-20 06:21:12 +00:00
ru
655e7db87e Prepare for mdoc(7)NG. 2000-12-19 16:00:12 +00:00
ru
0957874304 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 19:21:22 +00:00
obrien
3dea197160 Install `chflags' in the root partition, NOT /usr where it is not available
in single user mode.
2000-11-10 05:31:52 +00:00
joe
d38d9a6248 Switch over to using the new fflagstostr and strtofflags library calls. 2000-06-17 14:19:33 +00:00
bde
76860644ae Fixed prototype for setflags(). setflags() returns int, not u_long,
and "extern" in function prototypes is a style bug.  The type mismatch
broke chflags(1) on i386's with 64-bit longs and may have broken it on
alphas.
2000-04-04 14:12:35 +00:00
jdp
375ea71f6b Document that the flags can be specified as an octal number. 2000-04-03 22:10:58 +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
joe
f6504eea50 Added missing DPADD's. Removed unrequired SRCS's.
Obtained from:	bde
2000-01-01 15:44:11 +00:00
joe
e1558fa7cb Moved flags_to_string and string_to_flags into libutil. It's used in
many places nowadays.
1999-12-30 13:15:15 +00:00
charnier
8d7a247695 Correct use of .Nm. Add DIAGNOSTICS section. Add rcsid 1999-11-21 16:11:56 +00:00
bde
84fc24eb00 Yet another previously forgotten merge from Lite2. (Describe
`opaque', fix reversed description of `nodump', and don't use
`nodump' as an example of adding a `no' prefix since the double
negative would be confusing (it's still confusing -- the implicitly
documented `nonodump' flag doesn't exist).)
1999-08-30 03:40:26 +00:00
peter
e4b04a2b21 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
archie
b24c3efc8e Tweaks to allow compiling -Wall (mostly adding "const" to char rcsid[]). 1998-12-06 22:58:23 +00:00
pst
c22f14d51d NOSHARED takes a yes/YES no/NO value, not "true, false, hey mon!".
NOPIC is used to not generate a shared library, not NOSHARED.
Make NOSHARED advisory where appropriate.
Remove bogus NOSHARED (kbdio).
1997-06-29 06:03:42 +00:00
charnier
288769b4a5 Document the use of `ls -lo' to see flags.
Obtained from: OpenBSD.
1997-06-24 06:57:11 +00:00
julian
900c29f67a Submitted by: Whistle Communications (archie Cobbs)
These changes add the ability to specify that a UFS file/directory
cannot be unlinked. This is basically a scaled back version
of the IMMUTABLE flag. The reason is to allow an administrator
to create a directory hierarchy that a group of users
can arbitrarily add/delete files from, but that the hierarchy
itself is safe from removal by them.
If the NOUNLINK definition is set to 0
then this results in no change to what happens normally.
(and results in identical binary (in the kernel)).
It can be proven that if this bit is never set by the admin,
no new behaviour is introduced..
Several "good idea" comments from reviewers plus one grumble
about creeping featurism.

This code is in production in 2.2 based systems
1997-06-02 06:24:52 +00:00
imp
cd84ece5fd compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.
1997-03-29 04:34:07 +00:00
mpp
297ecb20eb Use the .Bx macro in the HISTORY section. 1997-02-19 07:14:30 +00:00
obrien
9f6eb5fe55 Add history section. Follows chflags(2). 1997-02-19 00:32:35 +00:00
rgrimes
c20c5aa1a5 Set NOSHARED=true, having this binary static makes it much easier to
fix /usr/lib/*.so problems.

Submitted by:	davidg
1995-07-24 01:44:17 +00:00
rgrimes
79e59e9123 Remove trailing whitespace. 1995-05-30 06:41:30 +00:00
bde
1a4b09b93b Document the arch flag. It has always worked in 2.0.
Document aliases for the flags.

The formatting of the section describing the flags is poor.
1994-12-27 16:49:08 +00:00
rgrimes
b65ae149ea BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00