Commit Graph

983 Commits

Author SHA1 Message Date
Jason Evans
0384fff8c5 Major update to the way synchronization is done in the kernel. Highlights
include:

* Mutual exclusion is used instead of spl*().  See mutex(9).  (Note: The
  alpha port is still in transition and currently uses both.)

* Per-CPU idle processes.

* Interrupts are run in their own separate kernel threads and can be
  preempted (i386 only).

Partially contributed by:	BSDi (BSD/OS)
Submissions by (at least):	cp, dfr, dillon, grog, jake, jhb, sheldonh
2000-09-07 01:33:02 +00:00
Mark Ovens
04a578306c Fix markup typo
PR:		21084
Submitted by:	Gerhard Sittig <Gerhard.Sittig@gmx.net>
2000-09-06 20:09:39 +00:00
Sheldon Hearn
8ba8e2ef62 Fix style bugs and poor wording introduced in rev 1.12.
Submitted by:	bde
2000-08-17 16:09:27 +00:00
Sheldon Hearn
7e7574af89 Fix style bugs and inconsistencies introduced in rev 1.16.
Submitted by:	bde
2000-08-17 16:08:06 +00:00
Martin Cracauer
b5803eae6a Disable part of my 8-bits fixes from December 1999.
Serious fix still needed, see discussion on -current
(Subject: /bin/sh dumps core with here-document of 8bit text)

Problem in this code originally spotted by
Jun Kuriyama <kuriyama@FreeBSD.org>
2000-08-16 12:23:57 +00:00
Martin Cracauer
d753a42598 Fix type builtin for absolute paths and relative paths with directory
names in them.

Also use a colon in the answer of `type` everytime the questioned item
is not usable.

PR:		bin/20567
2000-08-16 12:08:02 +00:00
Martin Cracauer
84c3800cdc From submitter:
growstackblock() sometimes relocates a stack_block considered empty
without properly relocating stack marks referencing that block.
The first call to popstackmark() with the unrelocated stack mark
as argument then causes sh to abort.

Relocating the relevant stack marks seems to solve this problem.

The patch changes the semantics of popstackmark() somewhat.  It can
only be called once after a call to setstackmark(), thus cmdloop() in
main.c needs an extra call to setstackmark().

PR:		bin/19983
Submitted by:	Tor.Egge@fast.no
Reviewed by:	Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
2000-08-16 10:39:43 +00:00
Warner Losh
2c15efcfb5 Don't explicitly declare optarg and optind. These are declared in
unistd.h, which is already included.
2000-08-16 05:14:49 +00:00
Sheldon Hearn
7fcd5ae0d0 Add the -i option, as found in rm(1), which provides an interactive
mode in which the user is prompted for confirmation before an
existing file is replaced.

Submitted by:	alex
2000-08-14 08:48:55 +00:00
Josef Karthauser
d4413063b3 Un-deprecate the -G flag at obrien's request. Colour sequences are still
dependent upon the output being directed to a terminal however.
(Use the CLICOLOR_FORCE variable to force output).
2000-08-13 12:17:03 +00:00
Josef Karthauser
74e6090127 Correct spelling: depricated -> deprecated. 2000-08-12 23:53:11 +00:00
Josef Karthauser
3d2ddc9e1a A change to the way that colours are switched on in ls. The -G
flag has been depricated, although it still works with a warning
message, and replaced with an environment variable CLICOLOR (command
line interface colour).  This could be used by other tools that
want to be able to control colour output.

In addition if the environment variable CLICOLOR_FORCE is defined
colour sequences are output irrespective of whether the output is
directed to a terminal (as long as TERM references a colour capable
terminal of course ;)

PR:	bin/20291 and bin/20483
2000-08-12 22:40:14 +00:00
Gregory Neil Shapiro
88c75941e6 The rest of the changes needed to support the new version of sendmail (8.11.0).
Beyond changes to the build system, this includes fixing up the sample
freebsd.mc configuration for changes in defaults and syntax, removing
outdated documentation, and updating the release notes.
2000-08-12 22:39:25 +00:00
Josef Karthauser
aab56c46b2 ".It" -> ".It Ev" in a couple of places. 2000-08-12 21:10:11 +00:00
Peter Wemm
1510e9e7c6 Optimize out no-op chmod() syscalls. 2000-07-29 22:16:55 +00:00
John W. De Boskey
eba53b965a Try to clean the manpage up according to the mail from Sheldon
in committers (Message-Id: <72836.964344168@axl.ops.uunet.co.za>).

Also cleaned up a .Pq macro which was causing problems previous
to the original update I made.

Reviewed by:	sheldonh
Approved by:	jkh
2000-07-28 02:51:43 +00:00
Sheldon Hearn
1b9735e6f2 Mark up the -a flag to unalias as a flag (Fl), not an argument (Ar). 2000-07-24 15:02:04 +00:00
Sheldon Hearn
5d3b843b57 Add missing punctuation to one line. 2000-07-24 14:59:50 +00:00
John W. De Boskey
b4a3a03827 Expand the -r option to support hex. Though undocumented, the -r
option already supported octal. Add a comment to the -r option
in the man page so it's a bit more specific.

Discrepancy brought to my attention by: sasdrq@unx.sas.com
Approved by:	jkh
2000-07-22 22:08:39 +00:00
Stefan Eßer
915198b41b Add overflow tests 2000-07-22 10:59:36 +00:00
Brian Feldman
133099f36c Add the missing flags to ls(1)'s usage: -Bb. 2000-07-22 05:28:46 +00:00
Brian Feldman
5976ee7e31 Make the comment regarding ftruncate() correct. 2000-07-20 19:21:40 +00:00
SADA Kenji
f698dde983 Don't emit a warning message if fchflags() returns EOPNOTSUPP
Requested by:	FUJISHIMA Satsuki <k5@cheerful.com>
Obtained from:	OpenBSD
2000-07-20 18:30:00 +00:00
Sheldon Hearn
a6b651021d Update stale references to update(4) with references to the new
syncer(4) manual page.
2000-07-19 07:39:08 +00:00
Sheldon Hearn
888d5fad11 Fix one grammar problem which crept in from rev 1.40 to rev 1.42, and
one mdoc problem from rev 1.40 (unnecessarily populated Nm macro).
2000-07-18 12:02:15 +00:00
Mark Ovens
501e74b7ca Document the builtin echo command
Reviewed by:	Matthew Hunt <mph@astro.caltech.edu>
2000-07-17 23:37:55 +00:00
Sheldon Hearn
ed9b87e322 Locale support was added by ache long ago. 2000-07-17 10:40:48 +00:00
SADA Kenji
3c2ddcf514 To make inherit file flags when mv(1) moves file between directories
on different file systems.

PR:		bin/12375
Submitted by:	Takashi SHIRAI <shirai@nintendo.co.jp>
No response by:	steve
No problem with:	building 5-current world
2000-07-15 14:59:02 +00:00
Mark Ovens
e7b7b6e4c4 Re-worded the description of the -r option
PR:		18792
Submitted by:	Bob Johnson <bobj@atlantic.net>
Approved by:	Alexander Langer <alex@freebsd.org>
2000-07-15 14:55:54 +00:00
SADA Kenji
410fb0acaa Fixd with alias missing.
PR:		bin/19475
Approved by:	Martin Cracauer <cracauer@cons.org> (with conditions)
2000-07-15 14:34:37 +00:00
Alexander Langer
68dee1e331 Now, the mdoc fixes, such as:
* remove hard sentence breaks
* use of Fl with Ar if argument available
* Dq -> Sq where better
* Ql -> Dq and Ql -> Fa where better
* include sections to Xr macro
* It Ar .ss -> It Ar ss
2000-07-14 15:49:36 +00:00
Alexander Langer
60ad2ab574 As per request by sheldonh and others on IRC, seperate language and mdoc
fixes (very important in this case).  Version 1.40 should be discarded.

This version includes the language diffs.  To receive them, use
cvs diff [-u] -r 1.39 -r 1.41
2000-07-14 15:38:38 +00:00
Alexander Langer
8135b667d1 Fix several language, style and mdoc improvements (such as correct
usage of .Xr and removal of hard sentence breaks).

PR:		18880
Submitted by:	Christian Weisgerber <naddy@unix-ag.uni-kl.de>
Obtained from:	OpenBSD (in parts)
2000-07-14 14:18:04 +00:00
David Malone
a95d6fda80 Use lstat(2) instead of stat(2) when deciding if we should fastcopy
a file. This fixes moving symlinks across partitions.

PR:		17847
Reviewed by:	bde
2000-07-11 18:01:42 +00:00
Stefan Eßer
64867286e5 Extend numeric operations to support 64 bit numbers. 2000-07-10 21:30:55 +00:00
Stefan Eßer
de96f24080 Add support for 64bit integer comparisons. 2000-07-10 21:29:28 +00:00
Kris Kennaway
daad7b8c8e Don't call warn() with no format string. This is potentially exploitable, although it
would be difficult both technically and in practise.
2000-07-10 08:31:35 +00:00
Peter Wemm
c87a63c10f Initial kenv(1) hack for dumping the kernel environment. This can be
used to extract modified boot hints to make loader(8)-time changes
"sticky".  It tries to use \ style quoting so that it can be used directly
with foo.conf files.  It can also extract specific variables.
2000-07-08 08:33:40 +00:00
Will Andrews
f8c9c11c5c Fix the exit code for the case where nentries == 0; if a PID doesn't exist,
ps(1) should not be returning a success code (0), it should return an
error code (1).  This was fixed on OpenBSD over 3 years ago.

PR:		19069
Submitted by:	Jim Sloan <odinn@atlantabiker.net>
Reviewed by:	rwatson
2000-07-08 05:13:10 +00:00
Sheldon Hearn
16481ad9d4 Explain the dependence of colour support on the capabilities of the
terminal emulator.

As pointed out by jhb, a more scalable solution would be preferable
when multiple applications in the base system begin linking against
libh.

Submitted by:	Doug Barton <DougB@gorean.org>
2000-07-07 14:46:13 +00:00
Andrey A. Chernov
c8ac461f3a restore tabs lost from prev commit
Asked-by:	bde
2000-07-07 08:27:59 +00:00
Andrey A. Chernov
7cc55b5092 curses -> termcap, mainly for purity and to indicate which functions family
really used
2000-07-06 22:05:41 +00:00
Assar Westerlund
ee579ffbea make sure we do not write out non-printable characters in file names
and symbolic links (by default)

PR:		bin/19354
Reviewed by:	silence on -current
2000-07-04 23:09:23 +00:00
Brian Feldman
c15c898eff Various cleanups are made to reduce warnings and make code prettier :)
Also, check for ftruncate() return value and die on failure, but only
try to ftruncate() when the file is a regular file.
2000-07-01 05:36:25 +00:00
Neil Blakey-Milner
e7919a4303 Fix the rmdir -p a/b/c/ case, where rmdir -p a/b/c works, and rmdir c/
works.

PR:		PR 6521
Submitted by:	Rudolf Cejka <xcejka00@dcse.fee.vutbr.cz>
Reviewed by:	eivind (in brief retrograde)
2000-06-28 14:54:07 +00:00
Mike Pritchard
af63ed3ce0 Grumble. The previous commit still had the wrong date in the
example.  Oct 29 0:30 +3 hours is still Oct 29, no matter what the
DST setting is, and not Oct 30..
2000-06-28 09:20:06 +00:00
Mike Pritchard
861c69ca3e Typo fix.
PR:		docs/19554
Submitted by:	Kazuo Horikawa <horikawa@psinet.com>
2000-06-28 09:13:32 +00:00
Sheldon Hearn
5091080e15 Use Dq Li (double-quoted literal) instead of Ic (internal command) to
mark up a sample invocation, since it is not a command internal to the
described utility.

Do not use Ar (argument) to mark up something which is not an argument
to the utility or one of its internal commands.
2000-06-27 18:22:13 +00:00
Matthew Hunt
a585d13451 Add \a and \e to "echo -e" escape handling. 2000-06-26 22:43:30 +00:00
Andrey A. Chernov
195c7083da Use %Ef 2000-06-22 16:57:39 +00:00
Sheldon Hearn
728a64be3f Fix changes from 1.34 through 1.37:
Remove newly added hard sentence breaks.
Mark ANSI up as a type name (Tn).
Avoid parenthesized sentences and paragraphs.
2000-06-22 10:07:46 +00:00
Brian Somers
714c609be5 Mention the timezone where appropriate (for the -v option).
correct one of the -v options.
2000-06-22 10:02:33 +00:00
Josef Karthauser
e5516847ea Order the ENVIRONMENT section alphabetically. 2000-06-21 21:56:50 +00:00
Josef Karthauser
1e715e3437 I broke locale sensitive ordering of date and month in
the long -l output format with the last commit.  Fix it
by replacing the "%b %e" strftime format with "%Ef".

Make a note in the manual page that the LANG environment
variable affects the running of ls.

Reviewed by:	ache
2000-06-21 21:49:57 +00:00
Josef Karthauser
97e4e97bd1 Don't assume that the output of strftime for "%c" ("national
representation of time and date") won't change in time.  Instead
of hard coding the locations of the time elements and hoping that
they don't move use strftime to generate the desired formats in
the first place.

PR:	bin/7826
2000-06-18 22:18:04 +00:00
Josef Karthauser
141d77b8cb Switch over to using the new fflagstostr and strtofflags library calls. 2000-06-17 14:19:33 +00:00
Andrey A. Chernov
e1eb172980 Activate Japanese NLS and KANJI support 2000-06-11 03:26:08 +00:00
Andrey A. Chernov
18d8a22b61 Fix one conditionalization in my prev. commit 2000-06-06 13:02:52 +00:00
Andrey A. Chernov
22ff3e9e29 Greately simplify oxtabs fix by simple setting f_notabs for f_color 2000-06-06 12:44:29 +00:00
Andrey A. Chernov
322b47fd88 Honor f_notabs flag even in COLORLS 2000-06-06 12:25:17 +00:00
Andrey A. Chernov
6cd5adff75 Back out spaces to TABs replace removing for COLORLS
Rewrite corresponding comment to say what happens in reality with oxtabs
and current terminal column.
2000-06-06 12:10:07 +00:00
Andrey A. Chernov
82dd3eab13 Don't replace TABs with spaces for COLORLS because "some terminals get confused"
as comment says. I know no terminal confused by this. If even such terminal
exists, it must be termcap flag for this, not hardcoded in ls.
2000-06-06 07:32:20 +00:00
Andrey A. Chernov
a04eaf5b2e Add -G to usage: if COLORLS 2000-06-06 07:29:43 +00:00
Andrey A. Chernov
1bf1478a9f Staticize more functions 2000-06-06 07:19:50 +00:00
Andrey A. Chernov
fd4e4d608f Move colorquit() prototype to extern.h
Add "extern" to variables declarations in extern.h to not make them
commons into each compiled file.
2000-06-06 07:14:01 +00:00
Andrey A. Chernov
38782c258d Make signal handler safe - don't use stdio (pointed by bde)
Staticize some color functions
Add yet one tolower() call which is forgotten after check
Don't check for OOPS - not really needed
2000-06-06 06:52:03 +00:00
Andrey A. Chernov
4304e142c2 Reflect reality:
yellow -> brown
white -> light grey
2000-06-06 00:42:24 +00:00
Andrey A. Chernov
c85e2c8e57 Get rid of curses completely - use tgoto instead of tparm 2000-06-05 20:54:46 +00:00
Martin Cracauer
ab08444f95 Do SIGINT cleanup for SIGQUIT as well. 2000-06-05 20:38:47 +00:00
Andrey A. Chernov
faebfe2e07 Kill yourself in ^C handler, not exit(1) to allow script to sense signal 2000-06-05 20:08:50 +00:00
Andrey A. Chernov
47bb6b11f3 Cosmetique of prev. optimization - don't use global variable 2000-06-05 19:56:52 +00:00
Andrey A. Chernov
cf0feaeee9 Don't use curses includes, include termcap.h instead
Don't use curses functions, use tputs instead
Add ^C reaction - reset colors
Optimization - don't turn off colors after EACH file printed.
Fix wrong ctype macro arg type in LSCOLORS parsing
2000-06-05 19:39:39 +00:00
Andrey A. Chernov
bd82d8ab8f Don't use curses includes, include termcap.h instead
Add ^C reaction set
2000-06-05 19:36:06 +00:00
Andrey A. Chernov
ecb7192ace Don't use ncurses, use termcap
Add DPADD
2000-06-05 19:34:31 +00:00
Josef Karthauser
5a890e22bf Don't look up the ANSI sequences each time a colour is changed,
this is extremely inefficient, instead write them all down at the
beginning.

The correct sequence to switch colours off is to first use 'op' if
it exists, otherwise use 'oc'.  If neither of these exist then we
shouldn't be doing colour with this terminal.

Reviewed by:	ache
2000-06-05 03:51:29 +00:00
Josef Karthauser
3ad254b3de Disable colour support in ls when building the fixit floppy, and make
a note of it in the release Makefile.
2000-06-05 02:25:55 +00:00
Josef Karthauser
74985094ef * Re-implement colour support using termcap's AF and AB capabilities
to manage the ANSI colour sequences.  Colour support is disabled
  unless the TERM environment variable references a valid termcap.

* Allow optional compilation of the colour support in the Makefile,
  defaulting to yes.  This allows us to switch it off for fixit
  floppies and other mediums where space is an issue and the extra
  bloat of statically linking with ncurses isn't acceptable.

* Display a warning if colour is requested with '-G' but support
  for it isn't compiled in.
2000-06-05 02:14:01 +00:00
John W. De Boskey
93a3fa19b5 Add -g for gigabyte sizes.
Approved by:	jkh
2000-06-03 20:17:39 +00:00
Josef Karthauser
3885812c8c Add colour support to /bin/ls (at a cost of 1056 bytes on my system).
It is not switched on by default and must be enabled with the -G
flag.  When using ls -G the output behaviour is modified with ANSI
colour sequences wrapped around filenames to help distinguish file
types.  (Colours can be redefined in the LSCOLORS environment
variable as described in the manual page.)

Colour support is silently disabled (if switched on) if stdout
isn't a tty.

Based on:	asami's colorls port.
PR:		bin/18900 && ports/18616.
2000-06-02 14:53:42 +00:00
David E. O'Brien
015a53cfff Fix ``dd if=/dev/zero of=/dev/daN'' on the Alpha by allowing the label
to be overwritten.

Submitted by:	green
2000-05-24 06:47:10 +00:00
Brian Somers
7ecff35b0d Propogate the ``call mktime'' flag from adjwday() down to adjday().
Submitted by: Christian Weisgerber <naddy@mips.inka.de>
2000-05-23 23:58:18 +00:00
Daniel Baker
d5dc63cc0a Correct confusion and differentiate appropriately between GMT and UTC when
date is launched with the "u" argument.  It now operates in the documented
manner.

Fix typo in date man page.

Submitted by:	David McNett <nugget@slacker.com>
2000-05-19 18:02:25 +00:00
David E. O'Brien
0e2e66b060 In its current state, this file is no longer needed. 2000-05-15 17:50:38 +00:00
Bruce Evans
d94edef5b5 Don't forget to clean csh.1.
Fixed some style bugs.
2000-05-15 14:24:32 +00:00
Martin Cracauer
98e05fd3ef Fix parsing of string for eval command.
PR:		18447
Submitted by:	Koji Mori <mori@tri.asanuma.co.jp>
2000-05-15 13:02:07 +00:00
Martin Cracauer
b2acf8878e Fix environment passung to eval'ed commands.
PR:		bin/6577
Submitted by:	Anatoly Vorobey <mellon@pobox.com>
Approved by:	silence amoung other sh experts
2000-05-15 12:33:17 +00:00
Sheldon Hearn
0f5fcaa3f1 Supply only one author name per instance of %A, as per mdoc.samples(7).
PR:		18465
Submitted by:	Kazu TAKAMUNE <takamune@avrl.mei.co.jp>
2000-05-10 09:49:04 +00:00
Sheldon Hearn
f167d7fb3e Fix miscellaneous mdoc macro argument limit infringements.
PR:		18465
Reported by:	Kazu TAKAMUNE <takamune@avrl.mei.co.jp>
2000-05-09 14:02:06 +00:00
Kris Kennaway
97ccc6c7ab Remove test for block device. 2000-05-07 08:56:21 +00:00
Joseph Koshy
54e0092517 Install a manual page for `tcsh(1)', for completeness.
Approved by:	obrien
2000-05-05 08:12:11 +00:00
Jeroen Ruigrok van der Werven
69757cf969 Remove unused #include. 2000-05-01 18:34:36 +00:00
Josef Karthauser
2ef72bc152 Fixes a potential buffer overflow with 'ed [MAXPATHLEN + 1 characters]'.
Submitted by:	Mike Heffner <spock@techfour.net>
Submitted on:	audit@freebsd.org
2000-04-30 20:46:14 +00:00
Andrey A. Chernov
43175e5e19 Fix warn format
Pointed-by: bde
2000-04-30 17:12:49 +00:00
Andrey A. Chernov
df41cfee75 Back out all drainwait changes. It is enough controllable via sysctl or
comcontrol, having it in stty cause too many problems with existing drivers
and tty access permissings of non-superuser.

Asked-by: bde
2000-04-30 17:04:26 +00:00
Andrey A. Chernov
3363a08f8c gfmt: set drainwait only if changed
It allows to restore tty state without a warning for non-superuser
2000-04-30 16:22:09 +00:00
Andrey A. Chernov
441e1d5cb8 Describe drainwait 2000-04-27 22:08:29 +00:00
Andrey A. Chernov
b2953dfa7d part of gfmt really changed commit 2000-04-27 21:48:48 +00:00
Andrey A. Chernov
18430c2095 gfmt: set 'changed' flags only if something really changed. 2000-04-27 21:45:41 +00:00
Andrey A. Chernov
d0834e7f9d Add ability to manipulate with drain wait time 2000-04-27 21:31:23 +00:00
Andrey A. Chernov
be2c49b193 Activate ja nls if WANT_KANJI
Fix 'make release'
Suppress 'make distribute'
2000-04-24 08:14:16 +00:00