Commit Graph

660 Commits

Author SHA1 Message Date
Justin T. Gibbs
20bf9a142c Updated the ch(4) driver and chio(1) command to include volume
tag support.  These changes have been tested with a Breeze Hill
Q47 DLT and a DEC DLT2500 media changer.  The latter has no
volume tag support.

The chio(1) command was updated to include various flags to the
status subcommand.  These flags can be used to select additional
information to be displayed (like volume tags).

A new chio(1) subcommand named 'voltag' has been added which allows
for changes to volume tags inside the media changer controller.
This could not be tested as the Q47 does not provide the functio-
nality.

Submitted by:	Hans Huebner
1998-09-15 07:48:51 +00:00
Doug Rabson
3929d51888 Portability fixes when sizeof(int) != sizeof(long). 1998-09-14 08:32:20 +00:00
Warner Losh
d1762d1fbe Fix minor style bugs noticed by the Bruce Filter.[tm]
Bruce-Filter-By: bde
1998-09-13 19:54:54 +00:00
Tor Egge
5557a02a60 Be more consistent with handling of quote mark control character.
Don't output double-quotes inside variable expansion/arithmetic
expansion region in here-documents.  When leaving the arithmetic
expansion syntax mode, adjust the dblquote flag according to
previous syntax, in order to avoid splitting of quoted variables.
1998-09-13 19:24:57 +00:00
Warner Losh
a5da09996c Silence -Wall -W -Wkitchen-sink. Use ssize_t in preference to int,
make a char * const that should have been.  Use new style function
declaration for main.  Mostly a Bruce Filter[tm] test commit.
1998-09-11 05:48:06 +00:00
Martin Cracauer
9bbfa41541 Narrow down conditions to break wait() to process traps.
Improve comments.
1998-09-10 22:09:11 +00:00
Bruce Evans
e36039e731 Fixed breakage of %CPU and %MEM in the previous commit. sysctlbyname()
was called with wrong args so it always failed.

PR:		7881
1998-09-10 18:06:28 +00:00
Martin Cracauer
e6ac45dde2 Fix an inefficiency I introduced in my last commit.
Include "expand.h" vom memalloc.c to pull function declartion into scope
1998-09-10 14:51:06 +00:00
Martin Cracauer
135421ddbf If traps are set, they are now executed even when a signal-blocking
foreground child is running. Formerly, traps were exceuted after the
next child exit.

The enables the user to put a breaking wrapper around a blocking
application:
  (trap 'echo trap ; exit 1' 2; ./pestyblocker; echo -n)

The "echo -n" after the child call is needed to prevent sh from
optimizing the trap-executing shell away. I'm working on this.
1998-09-08 13:16:52 +00:00
Martin Cracauer
23f8fb3d1e Add -S flag to test for sockets.
PR:		bin/7507
Reviewed by:	I tested the patch
Submitted by:	Stefan `Sec` Zehl sec@42.org
1998-09-07 16:59:05 +00:00
Tor Egge
6f47734fd7 Better handling of word splitting. Don't record the same region
multiple times when performing nested variable expansion, and
preserve some quoting information in order to avoid removing
apparently empty expansion result.
1998-09-06 21:13:09 +00:00
Tor Egge
37f0a6708e Don't blindly eliminate `..' and the previous pathname component.
PR:		2541
Obtained from:	NetBSD
1998-09-06 21:01:57 +00:00
Gary Palmer
05da683dd4 Split lines into one subdir per line. 1998-08-30 20:22:15 +00:00
Martin Cracauer
1f40b47b46 Improve bookkeeping of in_waitcmd and style fixes.
Submitted by:	Bruce Evans
1998-08-25 09:33:34 +00:00
Martin Cracauer
40d009a717 Re-enable killing childs with SIGQUIT. Spotted by Bruce Evans. 1998-08-25 08:49:47 +00:00
Martin Cracauer
a1c7435ae3 Got two volatile sig_atomic_t and int mixed up. Spotted by Gary Palmer. 1998-08-24 19:15:48 +00:00
Martin Cracauer
7a8e920bb9 Do not exit on SIGINT in non-interactive shells, fixes PR 1206,
i.e. this makes emacs usable from system(3). Programs called from
shellscripts are now required to exit with proper signal status. That
means, they have to kill themself. Exiting with faked numerical exit
code is not sufficient.

Exit with proper signal status if script exits on signal.

Make the wait builtin interruptable, both with and without traps set.

Use volatile sig_atomic_t where (and only where) appropriate.

(Almost) fix printing of newlines on SIGINT.

Make traps setable from trap handlers. This is needed for shellscripts
that catch SIGINT for cleanup work but intend to exit on it, hance
have to kill themself from a trap handler. I.e. mkdep.

While I'm at it, make it -Wall clean. -Wall is not enabled in
Makefile, since vararg warnx() macro calls in usr.bin/printf/printf.c
are not -Wall-able.
PR:		1206
Obtained from:	Basic SIGINT fix from Bruce Evans
1998-08-24 10:20:37 +00:00
John Birrell
00bc12659e Now that alpha uses FreeBSD syscalls, all these work. 1998-08-15 12:27:23 +00:00
Doug Rabson
d1ade4ad42 Silence some warnings when building on the alpha. 1998-08-07 09:39:11 +00:00
Mark Murray
448bbb5805 Fix LIBDIR (for aout/ELF). 1998-08-06 21:41:13 +00:00
Peter Wemm
9723ac470b Use sendmail-8.9.1 rmail (with our changes). 1998-08-04 15:19:16 +00:00
Tim Vanderhoek
bb2b4fafae Add missing "else", without whom the prev. commit is a null change.
Fix a 2nd level indentation style bug.
1998-08-02 22:47:11 +00:00
Bruce Evans
06db156986 Fixed printf format errors (time_t is not necessarily long). 1998-08-02 14:25:24 +00:00
Joseph Koshy
fab2680594 Document behaviour of "-" and "--" on the command line.
PR: docs/5399
1998-07-30 04:47:56 +00:00
Tim Vanderhoek
545f583c55 Allow env. variable LS_COLWIDTHS to specify minimum column widths,
effectively overriding the dynamically-sized-column feature.  This
is mostly useful for non-interactive use, where it may be necessary
to ensure that listings taken at different times have columns that
line-up correctly.  I have been assured that at least one large,
well-known program will soon be taking advantage of this.  :-)

PR:		bin/7011
Submitted by:	Joel Ray Holveck <joelh@gnu.org>
1998-07-29 00:46:13 +00:00
Jacques Vidrine
16c93fc052 Document the printf built-in. 1998-07-27 21:31:19 +00:00
Jacques Vidrine
0bc998d8ab csh built-in printf now expands arguments. e.g.
printf '%d\n' `echo 23`
now works as expected.
PR:		bin/2969
Submitted by:	Gareth McCaughan <gjm11@dpmms.cam.ac.uk>
1998-07-27 21:15:52 +00:00
Joseph Koshy
056103b6d3 Fix use of -man macro, correct description of the behaviour of the `+n'
command to match whats there in the source.

PR: 7328
1998-07-21 04:53:18 +00:00
Bruce Evans
3c3472fb32 Added a `build-tools' target for internal tools.
Removed explicit dependencies of foo.o on foo.c.  These were mainly
placeholders for comments about missing dependencies of tools objects
on headers.  This problem needs to be handled more generally.
1998-07-07 01:06:58 +00:00
Poul-Henning Kamp
85082fc3c3 Pick up kernel variables/constants using sysctl rather than through /dev/mem
Use /dev/null for opening the kvm library, we don't need access to /dev/mem
anymore.

ps can now run without the setgid(kmem) bit.  If it does it will not be
able to show argv/envp for another uid's processes unless you are root.
1998-06-30 21:34:14 +00:00
Bruce Evans
ce0cab88c1 Fixed printf format errors (second round with non-i386 typedefs). 1998-06-28 21:05:48 +00:00
Bruce Evans
fe6f0b0824 Fixed printf format errors. 1998-06-28 21:00:04 +00:00
Bruce Evans
86e14119e9 Oops, the previous log message should have read "Fixed type mismatches -
don't assume that time_t is long".
1998-06-28 18:26:18 +00:00
Bruce Evans
f8ec5fe282 Fixed printf format errors. 1998-06-28 18:19:13 +00:00
Bruce Evans
0eb7b1cad0 Fixed printf format errors. 1998-06-28 18:08:54 +00:00
Joseph Koshy
c7bca09356 Remove compile time dependency on ARG_MAX.
PR: 1791 (partial)
Reviewed by: Bruce Evans <bde@freebsd.org>, Tor Egge <tegge@freebsd.org>
1998-06-17 11:33:10 +00:00
Peter Wemm
4faaa03777 Don't attempt to change owner/mode/flags that don't need to changed.
This should calm down attempts to `cp -p' to a nfs mount or some other
filesystem that doesn't accept flags or all combinations of flags.
It will warn if it fails to change flags though.
1998-06-10 06:29:23 +00:00
Dmitrij Tejblum
f6fa1b35fd Print correct error message if we copy an unreadable directory. 1998-06-09 13:42:51 +00:00
Warner Losh
8a20f85ccb Make sure we don't overflow the path buffer. Exit if we do.
Obtained from or inspired by: A similar change in OpenBSD by theo
1998-06-09 03:39:38 +00:00
Warner Losh
e00e592a7a Make sure we pass the length - 1 to readlink, since it adds its own
NUL at the end of the path.
Inspired by: OpenBSD's changes in this area by theo de raadt
1998-06-09 03:38:43 +00:00
Steve Price
32c2131395 Fix a bunch of spelling errors.
PR:		6856
Submitted by:	Josh Gilliam <josh@quick.net>
1998-06-04 21:06:07 +00:00
Joseph Koshy
55cb6cf5fb Fix errors that crept into the previous commit. 1998-06-04 07:02:59 +00:00
Joseph Koshy
77027e301b 1. ps' output now shows 3 characters in the TT' field, not 2, after
rev 1.6 of "ps.c".
2. Reword description of `-f' option.

PR: 5340
Submitted by: Jorge Goncalves <j@bug.fe.up.pt>
1998-06-04 06:46:13 +00:00
Joseph Koshy
d693a28e3c Correct description of -crtscts.
PR: 6836
Submitted by: Andrew <andrew@ugh.net.au>
1998-06-03 04:07:59 +00:00
Steve Price
9e74704eb2 Clarify the example a bit.
PR:		6801
Reviewed by:	David Kelly <dkelly@hiwaay.net>
1998-05-31 22:43:57 +00:00
Bruce Evans
5832a75246 Fixed imperfections in previous commit (a poor variable name,
excessive 64-bit arithmetic, and excessive changes).
1998-05-31 12:09:50 +00:00
Poul-Henning Kamp
e796e00de3 Some cleanups related to timecounters and weird ifdefs in <sys/time.h>.
Clean up (or if antipodic: down) some of the msgbuf stuff.

Use an inline function rather than a macro for timecounter delta.

Maintain process "on-cpu" time as 64 bits of microseconds to avoid
needless second rollover overhead.

Avoid calling microuptime the second time in mi_switch() if we do
not pass through _idle in cpu_switch()

This should reduce our context-switch overhead a bit, in particular
on pre-P5 and SMP systems.

WARNING:  Programs which muck about with struct proc in userland
will have to be fixed.

Reviewed, but found imperfect by:       bde
1998-05-28 09:30:28 +00:00
Poul-Henning Kamp
5734ac28b4 "make world" replaces /bin/rmail even when NO_SENDMAIL has been set to
true in /etc/make.conf.  Both qmail and smail use a different rmail, so
replacing rmail is a Bad Thing.

PR:		6762
Reviewed by:	phk
Submitted by:	Bill Trost <trost@cloud.rain.com>
1998-05-27 09:25:22 +00:00
Steve Price
191b38b5fa Don't append a '/' to the destination directory if there
is already one there.

PR:		3025
1998-05-25 22:44:16 +00:00
Steve Price
ad863cac06 If no value is present for the login name set it to '-'.
Also pretty-up the display of 'ps -Ortprio'.

PR:		4947
Submitted by:	Martin Kammerhofer <dada@sbox.tu-graz.ac.at>
1998-05-25 05:07:18 +00:00
Joseph Koshy
d5440753aa Improve description of absolute modes.
Submitted by: Josh Gilliam <josh@quick.net>
PR: 6634
1998-05-19 06:24:50 +00:00
Philippe Charnier
9ba8bd6557 Correct use of .Nm. Add rcsid. 1998-05-18 06:51:59 +00:00
Philippe Charnier
44dc619ed6 Correct use of .Nm. Add section number to .Xr references. Add rcsid. 1998-05-18 06:50:17 +00:00
Philippe Charnier
3d7b5b9302 Add rcsid. Spelling. 1998-05-18 06:44:24 +00:00
Philippe Charnier
1aad99bc66 Correct use of .Nm. Add rcsid. 1998-05-18 06:40:56 +00:00
Philippe Charnier
df73a899fc Correct use of .Nm. Add section number to .Xr references. 1998-05-18 06:39:17 +00:00
Philippe Charnier
f43e9d2251 .Nm rm -> .Nm. 1998-05-18 06:37:35 +00:00
Joseph Koshy
c38eceafa4 kill.1: Remove reference to obsolete sigvec(2) man page. Removed
self reference in sigaction(2) man page.

Submitted by: Josh Gilliam <josh@quick.net>
PR: 6617
1998-05-18 03:33:11 +00:00
Philippe Charnier
c9a8d1f4dd Correct use of .Nm. Add rcsid. 1998-05-15 06:30:58 +00:00
Philippe Charnier
06f628852a correct use of .Nm. Add rcsid. 1998-05-15 06:23:45 +00:00
Philippe Charnier
542ed50153 Correct use of .Nm. Typo. 1998-05-15 06:22:30 +00:00
Philippe Charnier
2a170595d1 Correct use of .Nm. Add rcsid. 1998-05-15 06:19:05 +00:00
Poul-Henning Kamp
84717b42e8 .Sh ENVIRONMENT VARIABLES -> .Sh ENVIRONMENT
PR:		6599
Reviewed by:	phk
Submitted by:	Josh Gilliam <josh@quick.net>
1998-05-13 07:57:49 +00:00
Philippe Charnier
61c9c5ebee Correct use of .Nm. Add rcsid. 1998-05-13 07:47:35 +00:00
Philippe Charnier
15638d89b5 Correct use of .Nm. 1998-05-13 07:43:56 +00:00
Philippe Charnier
00c2adfe12 Convert to mdoc. 1998-05-13 07:41:13 +00:00
Philippe Charnier
95d0bf6556 Correct use of .Nm. Add rcsid. 1998-05-13 07:39:11 +00:00
Philippe Charnier
d072138a0a Correct use of .Nm. 1998-05-13 07:35:44 +00:00
Philippe Charnier
1ba0e048a2 Restore Lite-2 sccsid. Restore include of sys/types.h. 1998-05-13 07:33:54 +00:00
Philippe Charnier
574d120677 Restore Lite-2 sccsid. Restore include of sys/param.h. 1998-05-13 07:31:42 +00:00
Philippe Charnier
91ac062612 Restore include of sys/types.h and sys/param.h. 1998-05-13 07:29:15 +00:00
Philippe Charnier
c194af34bd Restore Lite-2 sccsid. 1998-05-13 07:25:17 +00:00
Philippe Charnier
d4e2eddf9d Restore original Lite-2 sccsid. Restore include of sys/types.h. 1998-05-13 07:22:11 +00:00
Philippe Charnier
930ab418d3 Do not remove include of <sys/param.h> and <sys/types.h>. They should
be here before including almost any POSIX header.
Requested by:	Bruce
1998-05-13 07:19:45 +00:00
Philippe Charnier
12f93eb9b1 Restore Lite2 sccsids by removing `const'. Improve documentation a little.
Suggested by:	Bruce
1998-05-13 07:16:37 +00:00
John Birrell
e4dbdeafbe Of these programs, only df and ps aren't compatible with FreeBSD/Alpha.
All the rest work! Actually, I don't know if chio works because I can't
test that. df can be built using NetBSD's mount.h. ps depends on libkvm
so there is no point trying.
1998-05-09 06:42:52 +00:00
Bruce Evans
3ef22d496d Backed out previous backout. Put y.tab.h back in SRCS. 1998-05-06 15:33:59 +00:00
Philippe Charnier
cbf6f7d358 Correct use of .Nm and other cosmetics. Add rcsid. Remove unused #inc. 1998-05-06 06:51:42 +00:00
Philippe Charnier
4c95995fe0 Correct use of .Nm, .An and other cosmetics. Add rcsid. Remove unused #inc. 1998-05-06 06:49:16 +00:00
Bruce Evans
e43e36af7d Backed out previous commit. It was tested, but not for the case where
a separate object tree doesn't exist.  Crufty makefiles will have to
put y.tab.h in SRCS so that we know not to create foo.h from foo.y.
1998-05-05 07:36:55 +00:00
Bruce Evans
b681d90662 Fixed races in `make -jN' using new yacc rules. 1998-05-04 20:09:06 +00:00
Bruce Evans
7e44350e47 Simplified using new yacc rules and by not generating y.tab.h. 1998-05-04 18:41:16 +00:00
Martin Cracauer
686ed44763 When calling a shell function, remember whether exit status is tested.
This is needed for the '-e' option. See the PR for more details.
PR:		6047
Reviewed by:	PR submitter, silence on review request.
1998-05-04 07:24:10 +00:00
Warner Losh
9ca13eea68 Add note about BLOCKSIZE variable to -s flag. 1998-04-29 18:39:51 +00:00
Bruce Evans
cddfa6c981 Backed out most of rev.1.19 (explicit dependencies of object files
on generated headers).  This is now handled generally in bsd.prog.mk.
1998-04-26 16:12:23 +00:00
Andrey A. Chernov
d9a1c82ad1 Fix nasty error in len_octal, result not initialized 1998-04-25 00:12:32 +00:00
Andrey A. Chernov
70183462ad Fix ctype error #1 - chars must be unsigned 1998-04-25 00:10:24 +00:00
Dag-Erling Smørgrav
a2a029d24a Remove the bogus -? option after reading the getopt() manual :) 1998-04-24 20:15:43 +00:00
Dag-Erling Smørgrav
3a34dbf728 o Removed two unused variables (f_dirname and f_newline) in ls.c
o Added the -H and -P options for treatment of symbolic links.

o Removed the #ifdef BSD4_4_LITE, since it does not seem to do anything
  useful

o Fixed up prn_octal() so its output looks more like that of AT&T Unices
  when -b is given.

The next two lines apply only to the first two changes above:

PR:		bin/6140
Submitted by:	Max Euston
1998-04-24 12:43:26 +00:00
Dag-Erling Smørgrav
a8ce505bcb Updated references to the behaviour of ls(1).
PR:		bin/6140
Submitted by:	Max Euston
1998-04-24 12:38:18 +00:00
Dag-Erling Smørgrav
0d86878ce0 o Renamed '-b' (show unprintables in octal) to '-B'
o Added a new '-b' which behaves as in AT&T Unices (show unprintables in
  octal, using C escape codes when possible)

o Added '?' to the getopt() string, since the code in the switch considers
  it as a valid option.
1998-04-24 07:49:51 +00:00
Dag-Erling Smørgrav
7ea3064820 Added -b option to display unprintables in octal.
PR: 1315
1998-04-21 22:02:01 +00:00
Robert Nordier
336f22af33 Spelling/typo fixes: (preceeded, friday). 1998-04-20 21:06:38 +00:00
Mark Murray
dd1383e87b Rats. I was too quick. Work needs to be done on the non-Kerberos
case. Re-enable SUID mode.
1998-03-26 19:41:18 +00:00
Mark Murray
4eff93dd4e KTH announced a weakness in their implementation of KerberosIV.
FreeBSD was not vulnerable, but their fix had some useful features.
Incorporate the best of those - rcp(1) no longer needs to be SUID
to root.
1998-03-26 18:15:00 +00:00
Philippe Charnier
05e61fd508 .Sh AUTHOR -> .Sh AUTHORS
Use .An/.Aq
1998-03-19 07:26:37 +00:00
John Birrell
5c931089a9 Some things only work on i386. 1998-03-13 19:41:06 +00:00
Bruce Evans
8199f5c431 Fixed existence test for secure sources (don't test for secure objects).
Fixed some formatting.
1998-03-06 16:05:18 +00:00
James Raynard
37c77f547a Don't assume sigset_t and int are equivalent. 1998-02-28 10:50:02 +00:00
Bruce Evans
7eaa685e41 Exit with a nonzero status if we get killed by a SIGINT. POSIX.2
specifies exiting with a zero status if the file was copied
successfully, and with a nonzero status if an error occurred.  We
are too sloppy to tell if the file was copied successfully when we
get killed by a SIGINT, but it is unlikely to have been.  Added a
comment about related sloppiness (calling exit() from a signal
handler).
1998-02-24 01:45:05 +00:00