Commit Graph

1203 Commits

Author SHA1 Message Date
Ruslan Ermilov
cf5b29e126 Make ``df -l'' work when no network filesystems are loaded.
PR:		bin/32397
2001-12-19 08:38:02 +00:00
Andrey A. Chernov
3d09cebfce 1) Localize (LC_CTYPE)
2) Catch "" to 0 conversion for OSes that not catch it in strto*()
   (f.e. -stable). It is needed because POSIX agrees with both variants.
2001-12-17 23:14:14 +00:00
Andrey A. Chernov
9ea42c8e34 POSIX strto*() functions MAY return EINVAL, so don't assume that only one
errno from them allowed and it is always ERANGE
2001-12-14 23:20:54 +00:00
Luigi Rizzo
69393d0646 Add prototypes for main() so that these programs compile with -Werror
(which somehow now seems to be the default for compiling -current).
This error popped up while doing a PicoBSD cross-compile on a 4.3-ish system,
it may well be that there are other apps which have similar problems,
but I did not spot them as they are not included in my picobsd config.

Whether adding prototypes for main() is the correct solution or not
I have no idea, a request to -current on the matter went basically
unanswered. Those who have better ideas are welcome to back this out
and replace it with the correct fix.
2001-12-14 16:22:41 +00:00
Philippe Charnier
7b3a12a825 Do not dot terminate errx() strings 2001-12-11 18:22:01 +00:00
Stephen McKay
4a5db7acfb Preserve directory timestamps with -p. Allow non-empty read-only
directories to be copied.  Apply umask to newly created directories
when -p is not specified.

PR: 27970
PR: 31633

MFC after: 4 days
2001-12-11 13:18:10 +00:00
Stephen McKay
048e497627 Typo in warning message (chown should be chmod). 2001-12-11 13:14:15 +00:00
David Malone
9f5b04e925 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
Ruslan Ermilov
aa70e98b87 -lcipher is an installable library. 2001-12-06 10:50:23 +00:00
Giorgos Keramidas
c602ea21d7 Make a bit more clear the types of characters that -B option will
print in octal.

Reviewed by:	roam, silence on -doc
2001-12-06 00:30:53 +00:00
Ruslan Ermilov
a93dfd0f71 Spelling. 2001-12-04 14:20:46 +00:00
Ruslan Ermilov
b5f8218042 mdoc(7) police: s/LKM/KLD/, sort xrefs. 2001-12-04 14:17:52 +00:00
David E. O'Brien
a748290789 Default to WARNS=2. Binary builds that cannot handle this must explicitly
set WARNS=0.

Reviewed by:	mike
2001-12-04 01:57:47 +00:00
Chris D. Faulhaber
a540fec399 Move the code merging ACL_USER and ACL_GROUP objects from under
two nested while loops into a separate function.

Obtained from: 	TrustedBSD Project
2001-12-03 02:24:24 +00:00
Chris D. Faulhaber
993f5df628 Add defines for access and default ACLs (ACCESS_ACL/DEFAULT_ACL)
to enhance readability.

Obtained from:	TrustedBSD Project
2001-12-03 01:20:52 +00:00
Chris D. Faulhaber
a043a09da7 style(9) cleanups mostly consisting of:
o explicitly check return values and variables against a value
o return x; -> return (x);
o fix inconsistent sysexits usage by nuking it (partially
  suggested by bde)

Obtained from:	TrustedBSD Project
2001-12-03 00:51:36 +00:00
Chris D. Faulhaber
05da5209f6 Correct example to remove *all* extended ACL entries and
clarify description.
2001-12-03 00:27:15 +00:00
Mark Murray
f614104aeb Slight makefile style.
Use __FBSDID().
2001-12-02 23:04:14 +00:00
Chris D. Faulhaber
458ad6cb17 o Expand the explaination of the -b option WRT the resulting
group ACL entry in relation to the existing group and mask
  ACL entries.
o Move the explanation of multiple ACL entries on the command
  line to the ACL ENTRIES section.

Obtained from:	TrustedBSD Project
2001-12-02 18:46:33 +00:00
Chris D. Faulhaber
405c561518 o Correct error message forgotten in the last commit (malloc() -> calloc())
o Fix style nits

Submitted by:	bde
2001-12-02 18:15:53 +00:00
Chris D. Faulhaber
d0b8d0fdfc Use calloc(3) instead of rolling our own. 2001-12-02 01:52:34 +00:00
Brian Feldman
a240291a2a Note that stty is a utility and not... err... a program....
Submitted by:	ru
2001-11-29 15:46:54 +00:00
Brian Feldman
63f9c0358e Stty is a program, not a function. 2001-11-29 03:26:42 +00:00
Brian Feldman
7304f61f9e Add LOMAC options (the "Z" flag in both cases) to display extra information
in ls(1) and ps(1).

Sponsored by:	DARPA, NAI Labs
2001-11-26 22:21:15 +00:00
Akinori MUSHA
018d9f6237 Remove the printf builtin command from sh(1), which command is not
used so often that it's worth keeping it as a builtin.

Now that all the printf invocations from within the system startup
scripts, we can safely remove it.

Urged by:	sheldonh  :)

No MFC is planned so far because it may break compatibility and
violate POLA.
2001-11-20 18:33:59 +00:00
Akinori MUSHA
bd90b9c76e Fix style bugs I found, and add a comment. 2001-11-19 20:39:24 +00:00
Akinori MUSHA
25e04004ff Oops sorry, forgot to add a #include. 2001-11-19 20:15:10 +00:00
Akinori MUSHA
d919a882fd - Do not reference argv[1] if no argument is given.
Reported by:	brian

- Call error() instead of errx() if compiled as sh(1) builtin.
2001-11-19 19:57:45 +00:00
Akinori MUSHA
d90c5c4ab4 Make test(1) a builtin command of our sh(1) for efficiency. The
binary size increase is 3,784 bytes (about 0.6%).

I don't drop the printf builtin while I'm here because some /etc/rc.*
scripts seem to use it before mounting /usr where printf(1) resides.

Reviewed by:	arch (sheldonh)
Inspired by:	NetBSD, ksh
Clued by:	ume (on how the printf builtin is used)
2001-11-17 19:10:11 +00:00
Robert Watson
9331ef537f o Update licenses, comments.
Obtained from:	TrustedBSD Project
2001-11-16 15:59:46 +00:00
Dima Dorfman
ad3f90f6ca Deuglify the usage message by putting the program name after the
"usage:" string.  This is how most (all?) other programs in the system
do it.

PR:		31596
Submitted by:	Cyrille Lefevre <clefevre@citeweb.net>
2001-11-15 15:46:45 +00:00
Tor Egge
f14c1c47f9 Don't call setvar() with the VTEXTFIXED flag. A copy is created by
setvar() and passed to setvareq(). When the VTEXTFIXED flag is set,
that copy is never freed, causing a memory leak.

PR:		31533
Submitted by:	maxim@macomnet.ru
2001-11-07 23:00:05 +00:00
Matthew Dillon
dbd9746f71 Use a quad int conversion routine for time_t instead of ulong, capable of
decoding tar's full time buffer (12 digits).
2001-10-28 02:51:43 +00:00
Matthew Dillon
2ad45bbe3d Various string fields for certain cpio types are 11 rather then 8
characters.  Use quad conversion functions rather then long conversion
where appropriate to handle the available range.  Mainly fixes time_t
but there was also a st_size ulong conversion in there that has to be
quad or cpio cannot be used to copy files > 2G.

MFC after:	1 day
2001-10-28 02:45:04 +00:00
Matthew Dillon
6e63a1049a Remove unnecessary casts in timeval.tv_sec load from st_*time 2001-10-28 02:42:26 +00:00
Matthew Dillon
cd9c425794 Remove assumption that time_t is an int
MFC after:	1 day
2001-10-28 02:28:04 +00:00
Ruslan Ermilov
4a70bdf9f6 mdoc(7) police: join OS version with the corresponding macro. 2001-10-19 14:44:13 +00:00
Tor Egge
c4c8394066 Repair normally unused is_digit() macro. 2001-10-14 21:11:33 +00:00
David E. O'Brien
757eeda04b *** empty log message *** 2001-10-01 08:43:58 +00:00
Ruslan Ermilov
43e09ab2db WARNSify. 2001-09-26 11:34:14 +00:00
Ruslan Ermilov
1b00c916a1 The "cat - -" feature was broken by the last commit.
Restore the code that avoided closing and reopening
stdin.  This is also required by POSIX.  As a bonus,
enable multiple stdin reads with the -benstv flags,
by resetting the EOF condition on stdin.
2001-09-26 11:32:23 +00:00
Ruslan Ermilov
0ec8be8404 mdoc(7) police: fixed markup. 2001-09-25 18:10:18 +00:00
Ruslan Ermilov
db1909f7d2 mdoc(7) police: markup nits. 2001-09-21 07:04:47 +00:00
Tor Egge
d2653b8806 Don't check uninitialized memory for having the shell control character
value CTLARI since this might break expansion of arithmetic expressions.

Don't access memory below start of stackblock.

Problem analyzed by hunt@iprg.nokia.com, slightly different patch applied.

PR:		24443
Submitted by:	hunt@iprg.nokia.com
2001-09-19 20:16:38 +00:00
Tor Egge
0c4eedda7b BASESYNTAX, DQSYNTAX, SQSYNTAX and ARISYNTAX handles negative indexes.
Allow those to be used to properly quote characters in the shell
control character range.
2001-09-19 20:07:47 +00:00
Tor Egge
5f2359b374 Adjust some type checks to include CTLQUOTEMARK in the range of
shell control characters.
2001-09-19 19:58:09 +00:00
Matthew Dillon
cbf2d71f0d Give /bin/cat the ability to connect to and read unix-domain sockets
MFC after:	1 week
2001-09-15 00:39:14 +00:00
Julian Elischer
b40ce4165d KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after:    ha ha ha ha
2001-09-12 08:38:13 +00:00
Peter Wemm
85012e7c95 UPAGES as a constant is gone in KSE. We are going to have to trust
and/or fix ki_rssize.
2001-09-10 07:19:26 +00:00
Mark Peek
2441ae608e Enable BSD style color ls support.
PR:		23161
Submitted by:	Anand Ranganathan <anand@blandings.com>
2001-09-05 22:56:58 +00:00