Matthew N. Dodd
00d321a2b3
Add a SIGINFO handler.
2003-04-07 11:00:56 +00:00
Johan Karlsson
ab46875a2a
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
Philippe Charnier
45ebb0c103
The .Nm utility
2003-03-24 16:09:07 +00:00
Tim J. Robbins
5821bf03d8
Flush the output buffers before forking a child process to avoid
...
the child process writing data that the parent should have written.
PR: 50051
MFC after: 2 weeks
2003-03-17 11:28:56 +00:00
Ruslan Ermilov
bfd86a6070
ssize_t is not required to be the same width as size_t by the
...
specs, so cast to intmax_t where appropriate.
Pointed out by: bde
2003-03-15 13:34:48 +00:00
Ruslan Ermilov
024ae00499
Fixed (soon might be fatal) -Wformat warnings.
2003-03-15 07:56:59 +00:00
Marcel Moolenaar
4832865490
Add an -o filename option to have the output written to a file.
...
This option is present on most uuidgen(1) implementations even
though normal file redirection can be used to achieve the same.
Submitted by: Hiten Pandya <hiten@unixdaemons.com>
2003-03-15 02:27:10 +00:00
Mark Murray
7503d74f54
WARNS=4 fixes. This would be WARNS=9 if we were -std=99 instead of
...
-ansi, due to 'long long'.
Reviewed by: green (slightly earlier version)
2003-02-27 18:04:54 +00:00
Marcel Moolenaar
caecb2f4c0
Third attempt at removing machdep.h and using ALIGN from <sys/param.h>.
...
The initial stack_block is staticly allocated and will be aligned
according to the alignment requirements of pointers, which does not
necessarily match the alignment enforced by ALIGN. To solve this a
more involved change is required: remove the static initial stack
and deal with an initial condition of not having a stack at all. This
change is therefore more risky than the previous ones, but unavoidable
(other than not using the platform default alignment).
Discussed with: tjr
Approved and reviewed by: tjr
Tested on: alpha, i386, ia64 and sparc64
2003-02-24 08:07:05 +00:00
Ruslan Ermilov
522ccf3f35
mdoc(7) police: markup laundry.
2003-02-23 01:47:49 +00:00
Ruslan Ermilov
8b6eff89b0
Grammar.
2003-02-23 01:43:45 +00:00
David E. O'Brien
fe79b917d4
We can simplify this Makefile down to a single line now.
2003-02-19 16:56:30 +00:00
David E. O'Brien
e0d2c36186
Add an example to help one manually set the date on one machine taking the out
...
put from another.
2003-02-18 23:12:55 +00:00
David E. O'Brien
f534f8f72b
chflags(1) repo copied, usr.bin->bin.
...
We've been installing chflags(1) into /bin since 2000-11-10, so this
shouldn't cause any problems.
2003-02-18 19:51:59 +00:00
Tim J. Robbins
b228ca4dea
Revert ALIGN change for the second and last time. I can't figure out
...
why this is breaking sparc64.
2003-02-18 02:08:20 +00:00
Tim J. Robbins
decb00f677
Second attempt at removing machdep.h and using ALIGN from <sys/param.h>.
...
The problem with the previous attempt, as noticed by Marcel, was that
stacknxt was being aligned to a pointer boundary instead of an
ALIGNBYTES + 1 boundary, which broke sparc64.
2003-02-17 03:51:44 +00:00
Tim J. Robbins
da5f5439a4
Temporarily back out machdep.h/ALIGN changes. It seems that on sparc64,
...
using the alignment from sys/param.h (16) instead of the alignment
from machdep.h (8) tickled a nasty bug in the memory allocator that I
haven't been able to track down yet.
2003-02-16 03:28:11 +00:00
Tim J. Robbins
457ae4f0d4
Use the ALIGN macro from <sys/param.h> instead of defining our own
...
incorrect version in machdep.h. Delete machdep.h.
2003-02-14 23:53:19 +00:00
Maxim Sobolev
6f15bc16ed
Fix slight disorder that broke sorting. Put in bold warning about the
...
fact that in this case order matters.
Submitted by: Peter Edwards <pmedwards@eircom.net>
2003-02-05 19:22:39 +00:00
Philippe Charnier
53a24b9359
Add FBSDID.
2003-02-05 13:23:46 +00:00
Philippe Charnier
eaed5652bf
Display elapsed time (-o etime) using [[dd-]hh:]mm:ss, which according to
...
Solaris man page is the POSIX way.
Reviewed by: jmallett
2003-02-05 13:18:17 +00:00
Philippe Charnier
e869e50704
Enclose sccsid according to style(9).
...
udp/timed -> timed/udp
2003-02-05 12:56:40 +00:00
Tom Rhodes
b63094f6ec
Remove another unused doc Makefile.
2003-02-04 20:46:23 +00:00
Tom Rhodes
02b911053d
Cross ref chflags(1).
...
Suggested by: Craig Carey <research@ijs.co.nz) on -doc.
2003-02-04 20:38:51 +00:00
Tony Finch
1413f7de53
Improve the layout of the description of the various parameter expansion
...
modifiers. The paragraph that explains the difference between ${foo:-bar}
and ${foo-bar} etc. was not very visible.
2003-02-03 23:03:05 +00:00
Maxime Henrion
572417c7e4
Remove now unnecessary main() prototype.
2003-01-29 21:46:12 +00:00
Tim J. Robbins
c57bc2b10e
Ensure that the TTY file descriptor is greater than or equal to 10 so that
...
it doesn't interfere with the user's redirections.
PR: 47136
MFC after: 1 week
2003-01-27 07:41:12 +00:00
Poul-Henning Kamp
cd967e322a
Don't call DIOCWLABEL on disks, it is not implemented, and calling it
...
like this negated any practical value of the feature.
2003-01-26 11:13:40 +00:00
Tim J. Robbins
6da31df83b
Make this compile with DEBUG defined now that WARNS=0 has been removed
...
from the Makefile:
- Print pointers with %p instead of %x.
- Include missing headers to get prototypes.
Noticed by: benno
2003-01-21 10:06:04 +00:00
Chris Costello
d2e59e8d5d
Reference maclabel(7).
...
Sponsored by: DARPA, Network Associates Laboratories
2003-01-20 21:25:00 +00:00
David E. O'Brien
d8ac087563
kenv(1) has been repo copied from usr.bin to bin.
...
Sometimes we need kenv(1) in /etc/rc.diskless*.
2003-01-20 17:56:25 +00:00
Juli Mallett
78b1878a16
Per-variable\ entry headers, to allow the 'ps -otime -otime=FOO' or similar
...
case to do the right thing and affect exactly one column. This is consistent
with GNU ps(1) in BSD mode, and POLA.
2003-01-19 00:31:16 +00:00
Juli Mallett
fde411d5a1
When inserting a non-user-specified (e.g. not via -o or -O) format, don't dupe
...
one that is already there. This is consistent with GNU ps(1)'s BSD mode, and
POLA.
Reported by: Andy Farkas <andyf@speednet.com.au>
Tested by: Andy Farkas <andyf@speednet.com.au>
2003-01-19 00:22:34 +00:00
Juli Mallett
775bba9fd8
Refer to the process label as proclabel, as there is a function called label,
...
and that's what these locals were called before.
2003-01-18 03:31:30 +00:00
Johan Karlsson
de216a83c2
realpath(3) should use PATH_MAX instead of MAXPATHLEN according to POSIX.
...
This also reverts the PATH_MAX -> MAXPATHLEN part of
rev 1.3 of src/bin/realpath/realpath.c
Requested by: imp
Reviewed by: imp, bde
2003-01-15 21:22:55 +00:00
David E. O'Brien
2e79837f7b
Make the "tarcp" example more direct.
2003-01-10 17:37:23 +00:00
Tim J. Robbins
9c92e72c7f
Do not strip CTL* escapes from redirection filenames in exptilde(),
...
expari(), expbackq() and evalvar(). Similar to revision 1.39.
Patch from Tor Egge.
PR: 45349
MFC after: 2 weeks
2003-01-08 10:50:08 +00:00
Jens Schweikhardt
9d5abbddbf
Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
...
especially in troff files.
2003-01-01 18:49:04 +00:00
Jens Schweikhardt
d64ada501a
Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/
...
Add FreeBSD Id tag where missing.
2002-12-30 21:18:15 +00:00
Mike Barcroft
dc474219b6
Back out rev 1.44; getbsize(3)'s original interface has been restored.
...
Approved by: markm
2002-12-30 18:10:37 +00:00
Robert Watson
8051fddedc
Add "-h" arguments to getfacl and setfacl, which behave in a manner
...
similar to "-h" on chown, chmod, etc, causing the operation to occur
on a final symlink in the provided path, rather than its target.
Obtained from: TrustedBSD Project
2002-12-30 15:36:29 +00:00
Tim J. Robbins
2c25061f18
Add the "wordexp" shell built-in command which will be used to implement
...
the POSIX wordexp() function.
2002-12-26 14:28:54 +00:00
Ruslan Ermilov
facc67676f
mdoc(7) police: Deal with self-xrefs.
2002-12-24 13:41:48 +00:00
Ruslan Ermilov
463cfa804d
Fixed the abuses of .Ql visible on stderr in troff mode.
...
PR: docs/37176
2002-12-23 16:04:51 +00:00
Ruslan Ermilov
f5d1157fd1
mdoc(7) police: markup nit.
2002-12-23 15:21:38 +00:00
David Malone
f656dbec97
Use '\033' rather than '\e' as the latter is a gccism.
...
PR: 46015
Submitted by: Jeroen Ruigrok van der Werven <asmodai@wxs.nl>
MFC after: 1 week
2002-12-22 21:35:14 +00:00
Tim J. Robbins
3fceb9fd5b
pathconf() and acl_get_file() follow links so they cannot be used to
...
determine whether a symlink has an ACL. Instead, assume that symbolic
links don't have ACLs and don't bother checking. Avoids spurious
ENOENT warnings when listing directories containing broken symlinks
on filesystems with ACLs enabled.
Pointed out by: rwatson, bde
2002-12-19 01:13:23 +00:00
Robert Watson
3c3f5f9cab
Improve handling of symlink targets when listing MAC labels: don't
...
do the wrong thing when the symlink doesn't have a target, by
considering !f_label in the construction of ch_options.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
2002-12-18 21:05:15 +00:00
Johan Karlsson
894fd2da78
Remove undocumented behavior (return current work dir if no path
...
is given as argument) that is not present in 4-Stable.
It was introduced when realpath(1) was split out of pwd(1).
The removed behavior is provided by pwd(1).
Reviewed by: mike
2002-12-18 11:50:28 +00:00
Johan Karlsson
9a26e46eb4
- use MAXPATHLEN per realpath(3)
...
- use the problematic part of the path, instead of the argument,
when reporting an error.
Reviewed by: mike
2002-12-18 10:20:40 +00:00
Tom Rhodes
304199ce19
The code uses trapsasync, however the manual page uses asynctraps. Fix the
...
manual page to reflect the code.
PR: 45820
Submitted by: Marco Molteni <molter@tin.it>
Discussed with: tjr
2002-12-17 20:27:48 +00:00
Tony Finch
162ae3ae7f
Document trap EXIT
and trap SIGNAME
.
2002-12-17 17:31:44 +00:00
Tim J. Robbins
2e3684f843
When job control is disabled, never show the job id when reporting the
...
status of a background process that has terminated because of a signal.
2002-12-14 01:08:04 +00:00
Ruslan Ermilov
db8993ce9e
Capitalize ASCII code names.
...
Approved by: re
2002-12-05 08:50:00 +00:00
Ruslan Ermilov
e27480d64d
mdoc(7) police:
...
Revert to using the .Tn POSIX and .Tn ANSI instead of \*[Px] and \*[Ai]
strings; using these strings is unsafe in troff mode, as they include a
change in a font size.
Approved by: re
2002-11-26 17:55:41 +00:00
Ruslan Ermilov
2267d53b43
mdoc(7) police: In DESCRIPTION, list the options in pure alphabetical
...
order, as required by style(9). Document the effect of the -f option
on exit status. Fixed some spacing.
Submitted by: bde
Approved by: re
2002-11-25 14:18:42 +00:00
Ruslan Ermilov
1734e39a1a
mdoc(7) police: markup fixes.
...
Approved by: re
2002-11-25 13:52:57 +00:00
Ruslan Ermilov
98d13c7e51
mdoc(7) police: markup fixes.
...
Approved by: re
2002-11-25 13:20:30 +00:00
Nate Lawson
e9a4552b14
Minimal take on previous commit -- remove getopt and printf. Static size
...
is reduced by 40k, dynamic by a few bytes.
Functional changes:
* "sleep -- arg" now returns usage() instead of ignoring the --
* "sleep -1" now returns immediately instead of returning usage()
Reviewed by: jmallett
2002-11-14 01:14:35 +00:00
Nate Lawson
e021938408
Back out previous commit since there is controversy about changing so much
...
in sleep including duping strtol(3). Code changes also increased
dynamic size of sleep(1).
2002-11-14 00:20:58 +00:00
Nate Lawson
174005b7f0
Remove getopt and strtol dependencies, reducing size of static exe.
...
Preserve older desired behavior, accept [+-]*[0-9]*\.[0-9]*
Remove a few unnecessary casts.
%ls -l /bin/sleep
-r-xr-xr-x 1 root wheel 61332 Oct 28 05:16 /bin/sleep
%ls -l /usr/obj/usr/src/bin/sleep/sleep
-rwxr-xr-x 1 root wheel 19124 Nov 13 12:12 /usr/obj/usr/src/bin/sleep/sleep
Submitted by: Tim Kientzle <kientzle@acm.org>
2002-11-13 20:12:26 +00:00
Nate Lawson
ef3e71dac3
Put echo on a diet, removing unnecessary use of stdio and getopt.
...
Before...
-r-xr-xr-x 1 root wheel 58636 Oct 28 05:16 /bin/echo
After...
-rwxr-xr-x 1 root wheel 12824 Nov 12 17:39 /usr/obj/usr/src/bin/echo/echo
Submitted by: Tim Kientzle <kientzle@acm.org>
2002-11-13 01:39:02 +00:00
Tim J. Robbins
e09fdabddf
Use warn() instead of perror() or fprintf() where appropriate.
2002-11-06 01:18:12 +00:00
Tim J. Robbins
745d94fc5f
Cross-reference setfacl(1).
2002-11-04 06:46:53 +00:00
Tim J. Robbins
4e65ab954d
- Consistent use of warn() vs. perror().
...
- Gracefully handle the case where standard input is missing
a newline at EOF.
- Exit with status 1 instead of -1 (really 255) on error.
- Add a Diagnostics section to the manual page documenting
exit status.
Approved by: rwatson
2002-11-03 23:22:34 +00:00
Tim J. Robbins
dd9aaeb0f7
Print a `+' character after the standard UNIX permission fields in long
...
listings if the file has an extended ACL (more than the required 3 entries).
This is what Solaris and IRIX do, and what the withdrawn POSIX.2c standard
required.
Reviewed by: rwatson (an earlier version of the patch)
2002-11-03 07:29:08 +00:00
Thomas Moestl
297cf923e7
The hw.availpages sysctl has an unsigned long value now, fix the retrieval
...
to match that.
2002-11-01 23:26:20 +00:00
Marcel Moolenaar
9b2f268fb5
o Remove $Id$ from copyright; there's $FreeBSD$,
...
o Remove static function uuid_print(); use uuid_to_string(3) in
combination with printf(3) to achieve the same,
o Remove unneeded includes,
o Add a reference to uuid(3) to the manpage.
2002-11-01 06:20:14 +00:00
Tim J. Robbins
01e5f16641
Do not print a header line if it would be empty; required by 1003.1-2001.
2002-10-31 13:41:37 +00:00
Tim J. Robbins
0cda444bef
Delete worthless comments.
2002-10-30 06:34:52 +00:00
Garrett Wollman
c9885518de
Create a small library function, check_utility_compat(3), to determine
...
whether a named utility should behave in FreeBSD 4.x-compatible mode
or in a standard mode (default standard). The configuration is done
malloc(3)-style, with either an environment variable or a symlink.
Update expr(1) to use this new interface.
2002-10-28 00:15:43 +00:00
Garrett Wollman
688dfe4533
Do not include <sys/syslimits.h> directly; it is not intended for general
...
consumption.
2002-10-27 17:44:33 +00:00
Robert Watson
4df6daba42
Attempt improved use of fts results: use the correct path to the
...
object to retrieve label information on, rather than directly
consuming the fts-provided paths (none of which are quite right).
This is based on the similar readlink() code, and may contain
the same bugs.
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
2002-10-24 01:01:53 +00:00
Robert Watson
4d33b62edc
Teach "ls -Z" to use the policy-agnostic MAC label interfaces rather
...
than the LOMAC-specific interfaces for listing MAC labels. This permits
ls to view MAC labels in a manner similar to getfmac, when ls is used
with the -l argument. Next generation LOMAC will use the MAC Framework
so should "just" work with this and other policies. Not the prettiest
code in the world, but then, neither is ls(1).
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
2002-10-24 00:07:30 +00:00
Robert Watson
2af538eb48
Use the MAC interface to list process MAC labels rather than using
...
the LOMAC-specific interface (which is being deprecated). The
revised LOMAC using the MAC framework will export levels listable
using this mechanism.
Approved by: re
Obtained from: TrustedBSD Project
Sponsored by: DARPA, Network Associates Laboratories
2002-10-24 00:00:57 +00:00
Mark Murray
0b66b1e8eb
Fix for changed getbsize arg type.
2002-10-23 22:09:05 +00:00
Mark Murray
9d32ecfcdf
Be consistent about declaring a function "static", and consistent
...
about the type of argv.
2002-10-23 10:23:38 +00:00
Mark Murray
ca2993fb41
Constify, staticify, rationalise types and fix other related warnings.
2002-10-23 10:20:01 +00:00
Mark Murray
099bda679e
Constify to squash some warnings.
2002-10-23 10:15:44 +00:00
Mark Murray
4e3b1d65e6
Staticify for lint.
2002-10-18 14:48:48 +00:00
Mark Murray
ba8acd9de2
Constify and staticify for lint.
2002-10-18 14:45:00 +00:00
Tim J. Robbins
1656f85050
Print non-printing characters in directory names, as well as file names,
...
as `?' or `\ooo', depending on whether the -b or -B flags were used.
PR: 43995
MFC after: 1 month
2002-10-18 10:59:45 +00:00
Tim J. Robbins
728b72c237
Avoid accidentally making "-h" a synonym for "fc".
...
Obtained from: NetBSD
2002-10-18 10:33:32 +00:00
Dima Dorfman
598420ee63
Output "human-readable" values with a non-0 precision where
...
appropriate. Before this, a 2.9 GB file was misleadingly reported as
"2G". This mostly brings unit_adjust() in line with what is in du(1).
Reviewed by: jmallett
Approved by: nik
2002-10-18 04:06:59 +00:00
Mark Murray
d8456c7ada
Dekerberise. The corresponding userland stuff has been dekerberised
...
for ages, and no-one seems to have noticed. Viva PAM!
2002-10-16 16:10:46 +00:00
Tim J. Robbins
c121fd80b8
Do not strip CTL* escapes from redirection filenames in argstr(); they
...
are later stripped with rmescapes() in expandarg(). If the filename has
already been unescaped, doing it again in rmescapes() can walk off the
end of the string, leading to memory corruption and eventually SIGSEGV.
Noticed by: kris
2002-10-08 11:22:49 +00:00
Tim J. Robbins
76900889fa
Clean up use of <stdarg.h> macros: always call va_end after va_start,
...
reset with a call to va_start before each use of the va_list.
Obtained from: NetBSD
2002-10-06 11:14:21 +00:00
Tim J. Robbins
e79f14fad9
Ensure all va_starts have a matching va_end.
...
Obtained from: NetBSD
2002-10-06 09:23:58 +00:00
Philippe Charnier
7e61a4ae7b
While removing a memory leak, rev 1.32 introduced a
...
free-memory-and-reuse-it-after. Correct both problems and
make rcp -r work again under /etc/malloc.conf -> AJ.
2002-10-06 09:09:27 +00:00
Tim J. Robbins
e7ed0f64bf
/dev/sa0 is the default tape device, not /dev/rst0.
2002-10-06 07:56:27 +00:00
Tim J. Robbins
427748f7df
Disallow empty condition parts of "if", "while" and "until" compound
...
commands. Commands like "if then ... fi" and "while do ... done" are no
longer accepted. Bodies of compound commands are still allowed to be
empty, because even though POSIX does not allow them, most shells do.
2002-10-06 06:35:51 +00:00
Tim J. Robbins
8b9f20c622
Use %jd in format string and cast argument to intmax_t instead of using
...
%qd to print struct stat.st_size. Remove WARNS=0 and WFORMAT=0 from
Makefile.
Tested on: alpha, sparc64, i386
2002-10-06 03:50:06 +00:00
Tim J. Robbins
5b94264c20
Fix format string errors relating mainly to the use of %qu to print off_t's.
...
Instead use %ju and cast the argument.
WFORMAT=0 is still required in the Makefile because gcc warns about
some strftime() calls (I don't think this behaviour is useful.)
Tested on: sparc64, alpha, i386
2002-10-06 03:20:27 +00:00
Bruce Evans
bb2d6f211d
Oops, the previous version was a last minute test version with off_t
...
replaced by int instead of size_t.
Spotted by: fanf
2002-10-03 17:19:36 +00:00
Bruce Evans
684370e703
Use a non-bogus type for representing the values of offsets in structs.
...
off_t is for offsets in files, and it is signed so it was no better
than the original type of int for avoiding warnings from broken lints,
except accidentally on machines like i386's where size_t is smaller
than off_t.
2002-10-03 15:00:07 +00:00
Tony Finch
35704b2f29
Fix some twelve hour clock braindamage. The range for hours is 0-23 not 1-12.
...
MFC After: 1 week
2002-10-03 14:11:29 +00:00
John Baldwin
0d6326492b
Catch up to SMTX -> SLOCK changes.
2002-10-02 20:33:52 +00:00
Tim J. Robbins
54beeb39c2
Use %d in a printf() format string and cast the argument to int instead of
...
using %td when we know that the number is between 0 and 9; mksyntax is a
build tool and needs to work on -stable.
2002-10-02 09:57:54 +00:00
Tom Rhodes
0237755d1a
Return the ``u''
2002-10-01 20:32:59 +00:00
Tim J. Robbins
658a755b6a
Back out experimental changes to fmtstr() that I didn't mean to include
...
in the previous commit.
2002-10-01 13:41:13 +00:00
Tim J. Robbins
7e73d40ee5
Replace a home-grown printf() clone with a fwopen() wrapper around
...
libc's vfprintf() that writes to a `struct output' instead of a file.
Inspired by NetBSD's similar changes (they used asprintf() instead).
2002-10-01 13:22:12 +00:00
Maxime Henrion
ca5434bae6
It is now safe to remove WARNS=0 and WFORMAT=0.
...
Tested on: alpha, i386, sparc64
2002-10-01 12:12:45 +00:00
Tim J. Robbins
8c39572997
Restore "not found" error message when searching for (or executing)
...
a program fails because the file or a path component does not exist.
Suggested by: bde
2002-10-01 11:48:18 +00:00
Maxime Henrion
0c1661b754
- Don't use quad_t when we really mean rlim_t.
...
- Cast rlim_t to intmax_t when printing it.
This should fix the last format errors in sh(1).
Tested on: i386, sparc64
2002-10-01 11:44:38 +00:00
Tim J. Robbins
fce40e6ec6
Add back WARNS=0 and WFORMAT=0; gcc is finding nonexistent format string
...
errors with %qd formats.
2002-10-01 08:55:28 +00:00
Maxime Henrion
ec65e9977a
Use the %t format modifier to print differences between
...
pointers. This fixes two format warnings on 64 bits
archs which are fatal now that WFORMAT=0 has been removed.
It doesn't fully fix the sh(1) build on 64 bits platforms
though, there is still some quad_t issues that need to be
fixed.
Tested on: i386, sparc64
2002-10-01 08:40:07 +00:00
Tim J. Robbins
b7f23f5be5
Remove WARNS=0 and WFORMAT=0. The shell compiles cleanly at WARNS=2
...
on at least i386. If there are warnings on other archs, I'd rather hear
about them than pretend they didn't exist.
2002-10-01 07:26:35 +00:00
Tim J. Robbins
c515abc535
Remove some kind of profiling support that required the 4.2BSD monitor()
...
function in libc.
2002-10-01 01:30:33 +00:00
Tim J. Robbins
b1a667509b
Remove bits and pieces of support for atty, which was made obsolete by
...
adding history and vi/emacs-style line editing to the shell itself.
Atty was a user-mode terminal emulator (like screen and window) that did
line editing and history.
2002-10-01 00:54:14 +00:00
Tim J. Robbins
abe2dc6158
Callers of error() don't need to supply a program name prefix in the
...
error message. Stops ulimit giving error messages like "ulimit: ulimit: xyz".
2002-09-30 13:29:32 +00:00
Tim J. Robbins
f7a9b7fe3a
Allow a left parenthesis before patterns in case blocks. POSIX requires
...
us to accept this, but I've never seen a script that uses it.
2002-09-30 13:25:00 +00:00
Tim J. Robbins
e00e16ad7f
Allow empty case/esac statements; POSIX requires this, and recent versions
...
of autoconf are generating scripts that use this feature.
PR: 43275 35879
Submitted by: Dan Nelson <dnelson@allantgroup.com>
2002-09-30 10:57:44 +00:00
Tim J. Robbins
9a7cafd9b8
Remove dead code which supported systems without O_APPEND, O_CREAT or SIGTSTP.
2002-09-29 12:38:25 +00:00
Tim J. Robbins
1c59560de9
Convert the remaining callers of errmsg() to use strerror(), and remove
...
errmsg() and its table of error messages.
2002-09-29 11:37:39 +00:00
Juli Mallett
f7f23e15f8
Mark the signo as __unused in a lazy signal handler.
2002-09-29 07:59:57 +00:00
Tom Rhodes
ca4a28f770
s/behaviour/behavior/ in the chmod(1) manual
2002-09-28 23:05:58 +00:00
Juli Mallett
8dd2eb05bf
List valid keywords, ala kill(1), rather than the csh builtin kill, which
...
tells people to type kill -l, when no valid ones are specified.
Sponsored by: Bright Path Solutions
MFC after: 4 days
2002-09-27 01:44:30 +00:00
Juli Mallett
36b025da93
Ala kill(1), tell people to type 'ps -L' for a list of format keywords.
...
Sponsored by: Rachel Hestilow <rachel@jerkcity.com>
MFC after: 2 weeks
2002-09-27 01:40:30 +00:00
Stephen McKay
eedc99e7b5
cp -p could report success even if a file copy failed. This was due to
...
the cumulative exit status being overwritten when directory permissions
were being set. This was particularly bad when called from mv(1) to
perform a cross-device move as the original files were deleted even if
the copy failed.
Reported by: Slaven Rezic <slaven.rezic@berlin.de>
Patch by: bde
PR: 42789
2002-09-22 11:15:56 +00:00
Garrett Wollman
0d3bcc2e80
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
Juli Mallett
362d62ba07
Rename new PLONG type to PGTOK as the conversion is more important than the
...
size (which is mostly undefined anyway).
Submitted by: bde
2002-09-17 17:13:52 +00:00
Juli Mallett
760bbf7d6d
Conglomerate printing of ps_pgtok'd data into a PLONG type. I couldn't think
...
of a better name, except PINT, but I decided to go with assuming LONG to
be safe, rather than assuming INT.
2002-09-17 02:52:44 +00:00
Juli Mallett
f3073b05b7
Perform keyword.c:1.27 properly, implement -orss in the New World Order of
...
ps(1) formatting, using pgtok() to get the value in K, rather than printing
it in pages. This is consistent with behaviour before keyword.c:1.26 (et al)
which exists in STABLE today, and which uses the same metric as VSZ.
Submitted by: bde
2002-09-16 20:19:51 +00:00
Juli Mallett
4086fd8e70
Remove some NOTINUSE stuff. Good housekeeping.
2002-09-16 20:06:04 +00:00
Peter Wemm
6327ab9cd1
Do not risk using the kernel pgtok() which assumes the page size is
...
constant.
2002-09-13 07:13:33 +00:00
Jacques Vidrine
dde97b32ff
Correct a usage of fnctl that could not be right and results in a
...
no-op. I assume it was meant that the close-on-exec flag be set here.
2002-09-11 16:38:33 +00:00
David Malone
f4ac32def2
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
Juli Mallett
daed3ad661
Prevent ps(1) from doing idiotic munging of things in a -ofmt= string.
...
God I hate the backwards compatability crap here.
2002-09-03 05:44:00 +00:00
Giorgos Keramidas
872b3fe268
Fix a warning of "possibly used before initialisation".
...
Reviewed by: tjr
2002-08-29 14:29:09 +00:00
Giorgos Keramidas
d1d578b2cd
Add <stdlib.h> to get a prototype for exit().
...
Reviewed by: tjr
2002-08-29 14:26:49 +00:00
Giorgos Keramidas
99479039bb
Grammar fix.
...
PR: docs/42021
Submitted by: Jeff Ito <jeffi@rcn.com>
MFC after: 3 days
2002-08-26 06:16:51 +00:00
Tom Rhodes
55c639b2d9
Fix 'SYNOPSIS' and 'usage'
2002-08-26 04:56:23 +00:00
Philippe Charnier
0d9f1a69d8
Replace various spellings with FALLTHROUGH which is lint()able
2002-08-25 13:01:47 +00:00
Tim J. Robbins
df9e587beb
There is a built-in command called "builtin"; spell its name correctly
...
after rev. 1.77 called it "built-in".
2002-08-24 12:41:23 +00:00
Tim J. Robbins
488edd5bd3
Don't show the process ID of background jobs that have terminated,
...
for consistency with ksh.
2002-08-24 07:19:01 +00:00
Bruce Evans
b4bb70cca3
Removed extra $FreeBSD$. Moved #if 0 for the vendor id to the correct
...
place. Restored indent protection of copyright comment.
2002-08-22 01:07:16 +00:00
Tom Rhodes
7d971bbf29
s/filesystem/file system/ as discussed on -developers
2002-08-21 17:32:44 +00:00
Jens Schweikhardt
8eed22b1a6
Fix a few typos, among them s/builtin/built-in/ (except for the ref
...
to the builtin(1) man page.) This is for consistency with the spelling
both proposed by ispell as well as IEEE Std 1003.1-2001.
MFC after: 3 days
2002-08-21 15:05:55 +00:00
Ruslan Ermilov
84a0a0eeac
mdoc(7) police: fixed the document date.
...
Submitted by: iedowse
2002-08-19 07:15:20 +00:00
Juli Mallett
3a7fc8ce59
Remove local prototypes for main().
2002-08-19 03:07:56 +00:00
Tim J. Robbins
4f8fa749f0
Avoid accessing the current job's process table in the child part of
...
forkshell() after it has been freed. This caused mysterious behaviour
when anything but the first command in a pipeline tried to access the
terminal when the `junk' malloc() option was enabled (which is the default).
2002-08-18 06:43:44 +00:00
Tim J. Robbins
6c56d93528
Show job control ID, command text, etc. when foreground processes are
...
suspended. This is a followup to rev. 1.51.
MFC after: 1 week
2002-08-17 13:57:47 +00:00
Johan Karlsson
e849cfacaa
Bump document date for the -n option.
...
Approved by: sheldonh (mentor)
2002-08-16 03:13:59 +00:00
Maxim Konovalov
6c62b0477e
o Backout rev. 1.40 and rev. 1.49.
...
o Add argv[] boudary check.
PR: bin/40117
Reviewed by: silence on -audit
MFC after: 2 months
2002-08-15 14:53:20 +00:00
Tim J. Robbins
ad2eaa7e87
Claim conformance to 1003.2-1992 instead of 1003.1-2001 due to doubts
...
raised by Lukas Ertl over symbolic link handling.
PR: 41576
MFC after: 1 week
2002-08-12 12:34:03 +00:00
Jens Schweikhardt
2b239dd118
Fix typos; each file has at least one s/seperat/separat/
...
(I skipped those in contrib/, gnu/ and crypto/)
While I was at it, fixed a lot more found by ispell that I
could identify with certainty to be errors. All of these
were in comments or text, not in actual code.
Suggested by: bde
MFC after: 3 days
2002-08-11 13:05:30 +00:00
Tim J. Robbins
d8d737d751
Allow redirections by themselves between "&&" and "||" operators.
...
For example, >/dev/null && echo foo
Pointed out by: FUJISHIMA Satsuki
MFC after: 1 week
2002-08-11 03:04:23 +00:00
Maxime Henrion
5965373e69
- Introduce a new struct xvfsconf, the userland version of struct vfsconf.
...
- Make getvfsbyname() take a struct xvfsconf *.
- Convert several consumers of getvfsbyname() to use struct xvfsconf.
- Correct the getvfsbyname.3 manpage.
- Create a new vfs.conflist sysctl to dump all the struct xvfsconf in the
kernel, and rewrite getvfsbyname() to use this instead of the weird
existing API.
- Convert some {set,get,end}vfsent() consumers to use the new vfs.conflist
sysctl.
- Convert a vfsload() call in nfsiod.c to kldload() and remove the useless
vfsisloadable() and endvfsent() calls.
- Add a warning printf() in vfs_sysctl() to tell people they are using
an old userland.
After these changes, it's possible to modify struct vfsconf without
breaking the binary compatibility. Please note that these changes don't
break this compatibility either.
When bp will have updated mount_smbfs(8) with the patch I sent him, there
will be no more consumers of the {set,get,end}vfsent(), vfsisloadable()
and vfsload() API, and I will promptly delete it.
2002-08-10 20:19:04 +00:00
Hajimu UMEMOTO
cc0f2cfaca
IPv6 support for rcp.
...
You cannot specify a raw IPv6 address for now.
MFC after: 1 week
2002-08-09 16:12:08 +00:00
Ruslan Ermilov
9ba31ca074
mdoc(7) police: tidying.
2002-08-09 10:59:20 +00:00
Ruslan Ermilov
43cf90aa10
mdoc(7) police: whitespace nits.
2002-08-09 10:49:50 +00:00
Ruslan Ermilov
ca38f0ddf7
mdoc(7) police: tidy up, bump document date on behalf of the -n option.
2002-08-09 10:46:00 +00:00
Ruslan Ermilov
c3ff3e424c
mdoc(7) police: grammar.
2002-08-09 10:38:34 +00:00
Ruslan Ermilov
154f47dd8d
mdoc(7) police: kill hard sentence breaks and one double space.
2002-08-09 10:34:57 +00:00
David E. O'Brien
30d90946d1
Allow "-v -v" to mean very verbose.
...
Reviewed by: freebsd-standards
PR: 40709
Submitted by: Edward Brocklesby <nighthawk@unrealircd.com>, johan
2002-08-04 05:29:13 +00:00
Mark Murray
5bb23f3653
Remove the last reference to NOUUCP - we don't have UUCP in the base
...
system.
2002-08-02 10:55:51 +00:00
Mark Murray
f193e3fc68
Fix an easy WARNS.
2002-07-31 16:53:59 +00:00
Mark Murray
13fcef50d0
Fix some easy WARNS.
2002-07-31 16:52:16 +00:00
Mark Murray
9f82c1d3b1
Give lint a small bit of help.
2002-07-31 16:50:21 +00:00
David Malone
6576952ca5
Make test check the tv_nsec part of a struct stat when comparing
...
the mtimes of a file. (This is probably only useful if you have
vfs.timestamp_precision set to something nonzero).
PR: 39163
Submitted by: Hal Burch <hburch@lumeta.com>
MFC after: 2 weeks
2002-07-27 22:53:44 +00:00
Tim J. Robbins
7e1975c2b2
Add a -P/-o physical option which behaves similarly to bash/ksh's options
...
by the same name. This option makes the cd and pwd builtins behave physically
(as opposed to logically) by default.
Submitted by: fanf
2002-07-25 10:57:39 +00:00
Tim J. Robbins
050f7913c9
Set opterr to zero to avoid duplicate warnings from getopt(3) for unknown
...
options.
2002-07-25 10:47:38 +00:00
Tim J. Robbins
93c0dc5ea6
Use PATH_MAX instead of a local guess at it, which happened to be incorrect.
...
Suggested by: fanf
2002-07-25 09:56:08 +00:00
Tim J. Robbins
b5ae692823
pwdcmd()'s argc and argv arguments are no longer unused, remove __unused.
...
Pointed out by: fanf
2002-07-25 09:46:31 +00:00
Mark Peek
317aee9760
Remove WARNS and WFORMAT overrides.
2002-07-24 22:26:44 +00:00
Tim J. Robbins
be58cc483e
Avoid calling el_resize() from a signal handler, even though libedit
...
itself does that if you set EL_SIGNAL. Instead, set a flag and check it
before calling el_gets(). This is safer, but slower to respond to changes.
Pointed out by: mp
2002-07-24 02:06:07 +00:00
Tim J. Robbins
9de7305e58
Catch SIGWINCH in interactive shells and call el_resize() to update
...
libedit's idea of the window size.
2002-07-23 15:05:00 +00:00
Tim J. Robbins
ecd807fb6d
Call el_source() to read the contents of .editrc when line editing is enabled.
...
Obtained from: NetBSD
MFC after: 2 weeks
2002-07-23 12:26:34 +00:00
Tim J. Robbins
088acf9001
Add a `bind' builtin command, which is simply a wrapper around libedit's
...
builtin command of the same name. This allows the key bindings for the
shell's line editor to be changed.
MFC after: 2 weeks
2002-07-23 11:50:53 +00:00
Johan Karlsson
786c276fe4
Add the -n option, which automatically answers "no" to the overwrite question.
...
PR: 7828
Suggested by: Daniel O'Connor <doconnor@gsoft.com.au>
Approved by: sheldonh (mentor)
MFC after: 2 weeks
2002-07-23 00:42:56 +00:00
Tim J. Robbins
776600e6de
Don't allow "||" or "&&" to be the first tokens of a command.
...
PR: 40386
MFC after: 2 weeks
2002-07-22 05:50:12 +00:00
Tim J. Robbins
2babaf74b5
Implement the P1003.2 `command' builtin command, which is used to suppress
...
shell function and alias lookup. The -p option has been implemented, the
UPE -v and -V options have not. The old `command' command has been renamed
to `builtin'.
2002-07-21 06:49:14 +00:00
Tim J. Robbins
558175ca15
Document that only one of the -n and -e options may be specified for
...
sh(1)'s echo(1) builtin command.
PR: 32935, 40747
MFC after: 1 week
2002-07-20 04:39:23 +00:00
Tim J. Robbins
2628ebdbd1
Remove broken and incomplete support for old releases of System V,
...
don't support system that implement getcwd(3) with a pipe to /bin/pwd.
2002-07-19 08:09:04 +00:00
Tim J. Robbins
5b99fa0514
Don't assume file descriptors fit in a short, use an int instead.
2002-07-18 12:24:35 +00:00
Tim J. Robbins
b80be28218
Avoid using ints or shorts to store process id's, use pid_t instead.
...
The pgrp member of struct job was declared as a short and could not store
every possible process group ID value, the rest of them were benign because
pid_t happens to be an int.
2002-07-18 10:22:42 +00:00
Tim J. Robbins
f1ae2c66c8
Make the message that is printed when the foreground process is terminated
...
by a signal the same as pdksh/bash/sh before rev. 1.34.
2002-07-18 09:37:51 +00:00
Sheldon Hearn
ced4deb156
Revert previous delta, which is not required with rev 1.5 of
...
src/contrib/gcc/c-format.c .
2002-07-15 12:08:21 +00:00
Giorgos Keramidas
cd8fb74d84
Fix a couple of typos in a comment.
...
PR: docs/33559
Submitted by: Marc Olzheim <marcolz@ilse.nl>
2002-07-15 02:03:30 +00:00
Tim J. Robbins
90833c99de
Complain if more than one file argument is given to unlink(1) like we did
...
before I made unlink use getopt().
2002-07-12 07:20:20 +00:00
Giorgos Keramidas
b11b570d7b
Don't duplicate the description of the sticky bit that is already
...
part of chmod(2) and sticky(8), but refer to those manpages instead.
PR: docs/35605
Submitted by: Gary W. Swearingen <swear@blarg.net>
2002-07-12 01:57:44 +00:00
Bruce Evans
c1f903a031
Fixed a printf format error that was fatal on alphas. Adding WFORMAT=0
...
to the Makefile didn't affect this bug because WFORMAT only controls
higher- level format checking (not the -Wformat that is implicit in
-Wall).
Fixed a nearby printf format error that was benign and 3 nearby style bugs.
2002-07-11 17:28:29 +00:00
Sheldon Hearn
a3ee32f3f7
Set WFORMAT=0, because our compiler currently complains about NULL
...
arg 2 to err() and friends, and warnings are promoted to errors.
This allows the following revisions to be reverted:
rev 1.39 src/bin/cp/cp.c
rev 1.26 src/bin/chmod/chmod.c
rev 1.40 src/bin/rm/rm.c
The following revisions can already be reverted, because they were
already covered by WFORMAT=0:
rev 1.8 src/bin/ls/lomac.c
rev 1.63 src/bin/ls/ls.c
rev 1.8 src/bin/ps/lomac.c
rev 1.34 src/bin/rcp/rcp.c
2002-07-11 08:45:38 +00:00
Tim J. Robbins
6c8bbe749e
Don't assume the shell's controlling terminal is attached to file descriptor
...
2. Instead, open /dev/tty. This problem stopped commands in subshells from
being executed correctly if standard error was redirected.
PR: 36671
Obtained from: NetBSD (but simplified)
2002-07-11 06:42:11 +00:00
Tim J. Robbins
17f08ec1bc
Remove support for the "old" tty driver by unifdef -UOLD_TTY_DRIVER;
...
many other parts of the shell are no longer compatible with this, and it
makes jobs.c quite cluttered with #ifdef's.
2002-07-11 06:26:48 +00:00
Tim J. Robbins
0d3d4c12c3
When growing the job table, don't relocate the jobmru pointer if it's NULL.
2002-07-11 04:22:41 +00:00
Matthew Dillon
5ad9e45f96
err() is documented as allowing NULL for the format string but GCC isn't
...
happy about it any more so change the usage to make buildworld work again.
2002-07-10 20:44:55 +00:00
Matthew Dillon
3951e2ab28
err() is documented as allowing NULL for the format string but GCC isn't
...
happy about it any more so change the useage so buildworld works again.
2002-07-10 20:36:25 +00:00
Johan Karlsson
0f7109e8c2
Update usage for the addition of -n in rev 1.35 of mv.c.
...
Approved by: obrien, sheldonh (mentor).
2002-07-09 17:45:13 +00:00
Tim J. Robbins
ce80ed021f
Close file descriptors when [n]>&- and [n]<&- redirections are used.
...
This was broken by rev. 1.16.
PR: 40334
MFC after: 1 week
2002-07-09 08:55:46 +00:00
Tim J. Robbins
907354479f
Print out commands with NTOFD/NFROMFD redirections that close the
...
descriptors (">&-" or similar) correctly in the jobs(1) command.
2002-07-09 03:26:47 +00:00
Juli Mallett
7ed0457457
Bring back WFORMAT=0.
2002-07-08 15:48:39 +00:00
Robert Drehmel
a755f1c9d0
- Use (MAXLOGNAME - 1) where UT_NAMESIZE was used to be able to
...
(-)remove the inclusions of <utmp.h>.
2002-07-08 09:08:51 +00:00
Juli Mallett
ffe25988bd
Make printval() take a 'void *' thus negating any assumptions the compiler
...
may try to make about the alignment of the dereferenced datum.
2002-07-07 21:45:59 +00:00
Philippe Charnier
4690560d06
The .Nm utility
2002-07-06 19:13:21 +00:00
Mike Barcroft
0ad736e62b
Don't depend on pollution in <limits.h> for the definition of
...
<stdint.h> macros.
2002-07-05 15:58:27 +00:00
Maxim Konovalov
27f3fb1aad
Fix a memory leak.
...
PR: bin/40177
MFC after: 1 week
2002-07-05 10:27:34 +00:00
Ruslan Ermilov
73ca71fef9
mdoc(7) police: a bit of tidying.
2002-07-04 13:22:22 +00:00
Mark Murray
7ede89e44b
Fix some low-hanging lint-fruit: endianness and staticness warnings.
2002-07-03 16:35:20 +00:00
Matthew Dillon
2d41ef4b59
Fix type-o in last commit in preparation for MFC.
2002-07-02 19:06:33 +00:00
Ruslan Ermilov
8479adc1d3
Reimplemented bsd.nls.mk using bsd.files.mk and bsd.links.mk.
...
Provided the (previously missing) dependency on source files
for intermediate .msg files.
Provided the default for NLSSRCDIR (defaults to .CURDIR).
Slightly changed the API: NLS should now list plain locale
names, without the .msg suffix.
When included from bsd.prog.mk, NLSNAME defaults to PROG.
2002-07-02 12:37:09 +00:00
David Malone
0567678261
Remove double #include <sys/cdef.h> and __FBSDID.
...
PR: 40053
Submitted by: Dan Lukes <dan@obluda.cz>
2002-07-01 10:46:39 +00:00
Tim J. Robbins
90f72c844e
Put documentation of the -m option's argument in its list tag in the
...
Description section for consistency with other manpages.
2002-06-30 06:50:16 +00:00
David E. O'Brien
e026a48c34
Consistently use FBSDID
2002-06-30 05:25:07 +00:00
David E. O'Brien
2749b14129
Consistently use FBSDID
2002-06-30 05:15:05 +00:00
David E. O'Brien
5eb43ac2f7
Consistently use __FBSDID
2002-06-30 05:13:54 +00:00
Tim J. Robbins
88485b4a2f
Avoid truncating the pathname to UNIX Domain Sockets with snprintf(),
...
giving a more sensible warning when the (relatively meagre) sun_path
limit is exceeded.
2002-06-29 04:52:33 +00:00
Tim J. Robbins
a24ce1c859
Check that snprintf() does not truncate the destination pathname when
...
linking into a directory.
2002-06-29 04:10:40 +00:00
Sheldon Hearn
62df9b6286
Document addition of RLIMIT_VMEM support, added in rev 1.26 of miscbltin.c.
2002-06-27 16:56:45 +00:00
Matthew Dillon
085b9f3eb2
Add support for RLIMIT_VMEM. The #ifdef's were already there but getopt()
...
needed to be adjusted.
2002-06-26 00:29:53 +00:00
Tim J. Robbins
bdb9494ae8
ln(1)'s symbolic link handling conforms to IEEE Std. 1003.1-2001, note
...
this in the Standards section.
2002-06-25 10:02:12 +00:00
Tim J. Robbins
9c24ed854c
Correctly mark up the final command line arguments with the Ar macro for
...
the last two synopsis forms.
2002-06-25 09:58:29 +00:00
Giorgos Keramidas
09152a86ff
Add a description of the restrictions that red(1) imposes to users,
...
and a warning that this "restricted mode" can be bypassed easily by
using symlinks, so that users don't depend too much on it.
PR: docs/35940
Submitted by: Gary W. Swearingen <swear@blarg.net>
Reviewed by: jmallett
MFC after: 1 week
2002-06-24 22:06:47 +00:00
Maxim Sobolev
41623b2d75
Don't try to decode old-style options if the argv[1] begins with `-' and the
...
second character represents some option taking an argument. This fixes
problem when ps(1) is invoked for examply as follows:
$ ps -Ufoobar1234
the above example results in option string being interpreted as
-U foobarp1234 - note extra `p'.
Reported by: Vladimir Sotnikov <vovan@kyivstar.net>
MFC after: 2 weeks
2002-06-20 14:55:53 +00:00
Juli Mallett
49d54362f1
Bogusness may have happened using a variable assignment here before, but
...
proper parens mean that fd is always set by open(2) [in any part of C],
and so we can accurately check for it returning -1, without feeling like
we need to initialise fd to -1 in its declaration.
In other words, fix a stylistic/bogus nit.
2002-06-20 07:15:55 +00:00
Juli Mallett
6953dff37c
Use size_t consistently and complete some uncompleted code resulting in a
...
memory leak by assigning and freeing a variable appropriately as well as
keeping track of the amount of allocated ram properly.
MFC after: 1 month
2002-06-20 06:00:51 +00:00
Juli Mallett
0e6c085ae6
We have a place for extern declarations of global variables in ed.h, do not
...
use main() to do it locally.
2002-06-20 05:28:02 +00:00
Juli Mallett
4e17884ffe
Remove two unused variables.
2002-06-20 05:21:43 +00:00
Juli Mallett
8b7808bc49
Minor const cleanup.
...
Don't discard qualifiers we don't need to discard.
2002-06-20 05:20:50 +00:00
Tim J. Robbins
029c8ee4fa
Bring documentation on CDPATH and its effects on cd(1) back into sync with
...
reality (and POSIX): current directory isn't searched unless CDPATH has
a "." element or is unset.
PR: 38442
Submitted by: oleg dashevskii <be9@be9.ru>
MFC after: 1 week
2002-06-19 12:04:22 +00:00
Tim J. Robbins
9a81395d08
When trying to emulate a cross-device move operation with cp and rm, add
...
a "--" argument after the options so filenames with leading dashes are
handled correctly.
PR: 39318
Submitted by: Serge van den Boom <svdb@stack.nl>
MFC after: 1 week
2002-06-16 04:06:58 +00:00
Juli Mallett
ca2be2ff45
Use an usage() rather than doing the fprintf inside option parsing.
2002-06-14 09:54:48 +00:00
Tim J. Robbins
f9dc2a8b93
When -R is not specified, fail to copy the contents of dangling symlinks
...
instead of making a copy of the link itself (SUSv3)
Obtained from: NetBSD
2002-06-13 15:48:36 +00:00
Tim J. Robbins
bf5f0c446e
Print the "$" symbol on blank lines when the -s and -e options are used
...
together.
Obtained from: OpenBSD (millert, Denis Afonin)
2002-06-13 14:05:26 +00:00
Tim J. Robbins
99cc224074
Remove bogus "-" operand from usage message. There is no restriction on
...
where it may be placed, it is treated the same as the file arguments.
2002-06-13 13:45:14 +00:00
Tim J. Robbins
993895ac33
Markup nits: use the Ar macro when describing the -signal_name and
...
-signal_number options, and for referring to the "pid" argument.
2002-06-13 08:46:01 +00:00
Tim J. Robbins
16a6357c9b
Add examples and diagnostics sections
2002-06-13 08:40:01 +00:00
Tim J. Robbins
08de34ac01
Support the "--" end of options marker, useful to disambiguate between
...
signal numbers and process groups (negative pid arguments), and
required by SUSv3.
2002-06-13 08:07:20 +00:00
Tim J. Robbins
83952a118b
Don't list shell builtins when the hash command is used (SUSv3)
2002-06-13 07:50:50 +00:00
Juli Mallett
7140a0e9f1
ps(1) appeared in v4
...
Submitted by: grog
2002-06-10 22:48:51 +00:00
Tim J. Robbins
43d088bea2
Sort sections, use Ex macro in Diagnostics section, point out that the first
...
example only works with csh(1).
2002-06-10 09:33:15 +00:00
Tim J. Robbins
91c0081804
Add History section. sleep appeared in v4.
2002-06-10 09:07:22 +00:00
Juli Mallett
a13d4e42c2
Note early appearence of some commands. These actually appeared in PWB, but
...
it seems we don't have a macro for that yet, so list them in the first UNIX
release since then that we have a .At for: v7.
2002-06-10 05:03:20 +00:00
Giorgos Keramidas
e02ef09616
Use socklen_t for the length of a socket structure instead of `int'.
...
Reviewed by: mike
2002-06-09 04:18:45 +00:00
Giorgos Keramidas
a7c1ac2f62
Replace <strings.h> with <string.h>. No functions from the former are
...
used in this file, and strlen() needs to be prototyped by the latter,
for this to compile without warnings.
Reviewed by: mike
2002-06-09 04:15:40 +00:00
Mike Barcroft
f3a09c6c9b
Check the return value of getcwd() to avoid printf()ing a NULL. Mark
...
usage() as __dead2 to avoid a GCC warning.
Spotted by: keramida
2002-06-09 00:46:24 +00:00
Juli Mallett
2dda9fe910
Allow whitespace to act as a delimiter in the keywords list given to the -o,
...
again, but also allow it in the user-specified header, too. This is far more
backwards compatible and SUSv3-happy than allowing only comma to seperate the
keywords list.
Submitted by: tjr
2002-06-08 18:11:52 +00:00
Bruce Evans
b3a3c64940
Fixed unsorting.
2002-06-08 06:49:15 +00:00
Juli Mallett
50355bb408
Don't say that the list of formats can be space delimited, it no longer can be.
...
Mention that more than one -o will concatenate formats.
Submitted by: Jun Kuriyama <kuriyama@imgsrc.co.jp>
2002-06-08 05:47:46 +00:00
Juli Mallett
6bb72963c0
Back out previous back out of previously correct code.
...
Double-plus-pointy-hat to: jmallett
Submitted by: bde
2002-06-07 01:14:05 +00:00
Juli Mallett
eb7891df6c
Remove tunables to hide warnings that no longer exist.
2002-06-07 00:01:00 +00:00
Juli Mallett
c3f1b5a9db
Cast to long to match format. Hidden by revision 1.18 of Makefile.
2002-06-07 00:00:29 +00:00
Juli Mallett
ba2cd77062
Use a global `now' variable for the current time, and initialise it at
...
startup, right after calling setlocale(3).
2002-06-06 21:21:25 +00:00
Juli Mallett
76e1a9fe48
Implement a SUSv3-ignorant but "time"-similar format for "etime", elapsed
...
run time (NOT cpu time). cputime() and elapsed() both need to honour SUSv3
now.
2002-06-06 21:18:37 +00:00
Juli Mallett
4049699b95
sysctlbyname(3) returns -1 on failure, not any other value < 0.
2002-06-06 20:59:15 +00:00
Juli Mallett
e8eef4bb45
Support the SUSv3 `rgroup' format.
...
Clean up some local style bogons.
2002-06-06 20:42:16 +00:00
Juli Mallett
3d0d5dccc1
Cast arg_max to size_t when comparing it (times 4, plus 1) against SIZE_MAX. I
...
was worried about truncation of arg_max by this cast, but if it gets truncated,
we know it'll obviously be greater than SIZE_MAX anyway.
Big pointy hat to: jmallett
Submitted by: keramida
2002-06-06 20:29:39 +00:00
Juli Mallett
033340171a
SUSv3 conform on the "comm" and "args" formats, and make correct the "command"
...
format, since it's BSDlike, and "comm" is actually different.
2002-06-06 20:21:47 +00:00
Juli Mallett
badfdad910
Refer to the command format by its SUSv3 name (comm), and list command as an
...
alias.
2002-06-06 18:10:12 +00:00
Juli Mallett
40fea9c3a5
As per behaviour on SVR4 systems, to allow any desirable type of header in the
...
override, seperate by comma (',') only, rather than any type of whitespace
(the literal space character (' ') had already been removed from this list).
This allows things like:
miamivice# ps -opid='Process
> Identifier'
Process
Identifier
1350
1445
1450
To work.
2002-06-06 18:04:46 +00:00
Tim J. Robbins
8b34ad92a2
Document the -f and -v options of the unset builtin.
2002-06-06 04:12:50 +00:00
Tim J. Robbins
592588448e
Quote the output of the no-argument form of the `set' builtin for re-input
...
to the shell.
2002-06-06 04:02:50 +00:00
Tim J. Robbins
45086f8cf6
Add the SUSv3 -p ("portable") option to both the export and readonly
...
builtins. This makes export/readonly print lines in the form
"export name=value".
2002-06-06 03:57:22 +00:00
Tim J. Robbins
dee75cf75d
Don't modify output that is to be quoted if it contains no IFS characters
...
or shell metacharacters.
2002-06-06 03:29:23 +00:00
Juli Mallett
4fa7d7880d
Widen the scope of fmt.c::1.19 and consistently use errx(3) if malloc(3) [or
...
realloc(3)] happens to fail, everywhere in ps(1).
Discussed with: bde, charnier (a while ago)
fmt_argv() can no longer return NULL, so don't bother checking.
Submitted by: bde
2002-06-05 18:11:25 +00:00
Juli Mallett
c0716492d4
Comma seperate format lists, since space is no longer up to the task.
...
Poked by: David Wolfskill <david@catwhisker.org>
Pointy hat to: jmallett
2002-06-05 17:31:44 +00:00
Juli Mallett
d9cd71b6e1
Support the 'comm' keyword, which is equivalent to our 'command', but
...
specified by SUSv3.
2002-06-05 02:05:24 +00:00
Juli Mallett
cf77c2ce9c
A space cannot be a header string seperator it appears given the SUSv3
...
description of ps(1), which uses them. I question whether newline and tab
can be either, but I'm not touching them. Yet.
2002-06-05 02:01:46 +00:00
Juli Mallett
6d041cc856
To comply with SUSv3, duplicate the variable contents for each given format,
...
so that multiple -ovar=header lines do not overwrite eachother.
This means that ps -ouser=USERNAME -ouser=WHO would now possibly print:
USERNAME WHO
juli juli
Whereas before it would be:
WHO WHO
juli juli
2002-06-05 01:58:36 +00:00
Juli Mallett
05051e2898
Returning NULL here if malloc(3) fails is silly, at this point in the codepath
...
we have't malloc(3)'d nearly as much as we probably will, so errx(3) away,
instead of waiting for something to fail yet again later on.
2002-06-05 01:36:30 +00:00
Juli Mallett
86f54b9fb8
Remove an XXX comment that seems to be a tiny bit no longer pertinent. This
...
function seems to do the right thing, and is not a "stub", and whoever "marc"
is, he's had plenty of time to do "the real one", so don't wait around for
him any longer.
2002-06-05 01:33:54 +00:00
Juli Mallett
b69566d8e1
Use of zero here meant many things, NULL, '\0' (NUL), and 0. Sort it out.
2002-06-05 01:32:21 +00:00
Juli Mallett
fdbec39885
Use a const char * where it is meant to be used. There's no reason to try
...
to discard the const qualifier here.
2002-06-05 01:02:13 +00:00
Juli Mallett
a89d0c4dbc
Duplicate the pointer to the string containing the header so it does not get
...
frobbed when/if the pointer it is actually a part of gets freed.
2002-06-05 01:01:20 +00:00
Tim J. Robbins
5b96a60711
Display job status correctly when a pipeline is suspended.
2002-06-04 15:26:00 +00:00
Tim J. Robbins
5179c2f25f
Describe finished jobs as "Done", not "Exit" (SUSv3)
2002-06-04 14:40:33 +00:00
Tim J. Robbins
cb1a4fb419
Don't output state' and
current' fields for processes that aren't
...
leaders in -l option to jobs(1).
2002-06-04 14:37:13 +00:00
Tim J. Robbins
d982b3a5f6
Missing prototypes from previous commit.
2002-06-04 13:13:54 +00:00
Tim J. Robbins
41d09fe083
Correct minor spacing problem in output of jobs -l for pipelines.
2002-06-04 13:01:51 +00:00
Tim J. Robbins
e5341cbb17
Quote alias values in the output of the alias(1) builtin so they are
...
suitable for re-input to the shell (SUSv3)
2002-06-04 12:59:12 +00:00
Tim J. Robbins
4f18100d73
Respect setting of the COLUMNS environment variable (SUSv3)
2002-06-04 10:20:10 +00:00
Tim J. Robbins
a28edf9a4a
Ignore empty COLUMNS environment variable. COLUMNS should take precedence
...
over TTY width found via ioctl() (SUSv3)
2002-06-04 10:11:29 +00:00
Tim J. Robbins
1be157dc3d
Correct history (again): V3 had a kill command, only it was in section 8,
...
not 1.
2002-06-03 14:59:49 +00:00
Tim J. Robbins
1114f20173
Correct History: sync(8) appeared in V4.
2002-06-03 14:48:33 +00:00
Tim J. Robbins
e3623a80a4
Correct History section: kill(1) appeared in V4, not V6.
2002-06-03 14:45:20 +00:00
Tim J. Robbins
ee6712f2f9
Fix typo causing ``fc -e'' to not work correctly. getopt() sets optarg,
...
not shoptarg.
2002-06-02 08:34:09 +00:00
Tim J. Robbins
32c077867c
Adding an entry to the history with H_ENTER moves libedit's internal
...
history cursor. Reset the cursor after adding the entry to the history
when doing ``fc -s'' so the output is correct.
2002-06-02 08:27:04 +00:00
Tim J. Robbins
39dccc6f6d
Implement $PPID, the parent process ID of the shell.
2002-06-01 02:14:48 +00:00
Tim J. Robbins
f63d6dbfc9
Support the remaining job ID formats required by SUSv3:
...
%+ (current job, same as %%),
%- (previous job),
%?str (job with "str" in its command name).
2002-06-01 01:51:42 +00:00
Tim J. Robbins
ad8a075902
Add -s (output PID's only) and -l (show PID's) options to the jobs(1)
...
builtin. Modify the output format to match what SUSv3 requires.
2002-05-31 14:04:23 +00:00
Tim J. Robbins
bdfc15df5e
#if JOBS around a job control-related statement to allow compilation with
...
job control disabled.
2002-05-31 13:10:38 +00:00
Tim J. Robbins
e3f3094912
Break the code to display status info for one job out from showjobs() into
...
showjob(), use it inside dowait() to display status info for consistency,
and in a format closer to what the standard requires.
2002-05-31 13:07:05 +00:00
Tim J. Robbins
3771ef59ae
Move job to front of most recently used job list when bg'd or fg'd.
2002-05-31 12:35:34 +00:00
Tim J. Robbins
d86825beb8
Instead of keeping just the jobid of the most recently bg'd or fg'd job,
...
keep a linked list of the jobs, most recently used first. This is required
to support the idea of `previous job', and to allow the jobs fg and bg
default to be correct according to POSIX.
2002-05-31 12:31:23 +00:00
Ruslan Ermilov
36588206d0
mdoc(7) police: kill hard sentence breaks.
2002-05-30 14:10:44 +00:00
Tim J. Robbins
e9393a92a6
Reject options, handle "--" correctly in unlink(1).
2002-05-30 01:05:15 +00:00
Tim J. Robbins
dab94652b1
Reject options, handle "--" end-of-options marker in link(1).
2002-05-30 00:57:38 +00:00
Ruslan Ermilov
2d341e5cc3
mdoc(7) police: punctuation.
2002-05-29 18:52:02 +00:00
Ruslan Ermilov
81e9cda2c9
mdoc(7) police: tidy up the markup a bit.
2002-05-29 15:38:59 +00:00
Ruslan Ermilov
9dfcbc3b12
mdoc(7) police: markup nits.
2002-05-29 15:18:35 +00:00
Ruslan Ermilov
3f0e2b01ff
mdoc(7) police: markup nits.
2002-05-29 15:09:49 +00:00
Ruslan Ermilov
3ed30dee85
mdoc(7) police: punctuation.
2002-05-29 15:06:24 +00:00
Ruslan Ermilov
7b3e3e39c7
mdoc(7) police: replace the XXX with the correct width.
2002-05-29 14:01:27 +00:00
Marcel Moolenaar
52183d0145
Add uuidgen(2) and uuidgen(1).
...
The uuidgen command, by means of the uuidgen syscall, generates one
or more Universally Unique Identifiers compatible with OSF/DCE 1.1
version 1 UUIDs.
From the Perforce logs (change 11995):
Round of cleanups:
o Give uuidgen() the correct prototype in syscalls.master
o Define struct uuid according to DCE 1.1 in sys/uuid.h
o Use struct uuid instead of uuid_t. The latter is defined
in sys/uuid.h but should not be used in kernel land.
o Add snprintf_uuid(), printf_uuid() and sbuf_printf_uuid()
to kern_uuid.c for use in the kernel (currently geom_gpt.c).
o Rename the non-standard struct uuid in kern/kern_uuid.c
to struct uuid_private and give it a slightly better definition
for better byte-order handling. See below.
o In sys/gpt.h, fix the broken uuid definitions to match the now
compliant struct uuid definition. See below.
o In usr.bin/uuidgen/uuidgen.c catch up with struct uuid change.
A note about byte-order:
The standard failed to provide a non-conflicting and
unambiguous definition for the binary representation. My initial
implementation always wrote the timestamp as a 64-bit little-endian
(2s-complement) integral. The clock sequence was always written
as a 16-bit big-endian (2s-complement) integral. After a good
nights sleep and couple of Pan Galactic Gargle Blasters (not
necessarily in that order :-) I reread the spec and came to the
conclusion that the time fields are always written in the native
by order, provided the the low, mid and hi chopping still occurs.
The spec mentions that you "might need to swap bytes if you talk
to a machine that has a different byte-order". The clock sequence
is always written in big-endian order (as is the IEEE 802 address)
because its division is resulting in bytes, making the ordering
unambiguous.
2002-05-28 06:16:08 +00:00
Tim J. Robbins
45457c7dd2
Note that the lutimes(2) and lchflags(2) syscalls also do not follow symlinks.
...
Remove incorrect examples.
PR: 25016
Submitted by: Martin Kammerhofer, Joshua Goodall
2002-05-26 12:51:38 +00:00
Tim J. Robbins
f59d6e4762
Add lchmod(2) to the list of syscalls that do not follow symbolic links.
2002-05-26 12:12:36 +00:00
Tim J. Robbins
fc482908be
sh appeared in Version 1, not System V.1.
2002-05-25 12:18:27 +00:00
Tim J. Robbins
d513af6a66
Implement `set +o', which displays the currently set options in a format
...
suitable for re-input into the shell.
2002-05-25 12:11:58 +00:00
Tim J. Robbins
09086b0499
Bring back the cd -L and -P options from revision 1.24, but try harder not
...
to fail when the logical current directory no longer exists. Allow changes
to absolute paths when logical cwd is invalid, fall back to physical cd
if logical cd fails.
2002-05-22 05:15:53 +00:00
Tim J. Robbins
baf3e7c14b
Temporarily back out revision 1.24; it seems to handle the case where the
...
current directory no longer exists incorrectly and breaks `make cleandir'.
2002-05-22 03:29:20 +00:00
Tim J. Robbins
178897f127
Add the SUSv3 -L and -P options to the cd and pwd builtin utilities. `Logical'
...
handling of .. is now the default.
2002-05-20 07:54:39 +00:00
Juli Mallett
9e3bfadea8
Remove a small, annoying, nit I ran in to editing this file, a lone tab
...
on a line by itself.
2002-05-19 17:50:23 +00:00
Tim J. Robbins
1b5a48ff88
Implement the -u (-o nounset) option, which gives an error message if
...
an unset variable is expanded.
Obtained from: NetBSD (bjh21, christos)
2002-05-19 08:30:16 +00:00
Tim J. Robbins
addcdbb29f
Make the fg and bg commands give the output required by SUSv3.
...
fg outputs the name of the command, bg outputs the name of the command
and the job id.
2002-05-19 07:27:26 +00:00
Tim J. Robbins
1a958c6653
Implement the -C (-o noclobber) option, which prevents existing regular
...
files from being overwritten by shell redirection.
2002-05-19 06:03:05 +00:00
Tim J. Robbins
94274c73cb
Add missing options required by SUSv3:
...
-m List files across the page, separated by commas.
-p Print a slash after directory names
-x Same as -C but sort across the columns rather than down
Submitted by: Kyle Martin <mkm@ieee.org>
2002-05-19 02:51:36 +00:00
Ian Dowse
85ed93337f
Unconditionally update the maximum field width statistics when we
...
refetch the filesystem information in MNT_WAIT mode. This avoids
incorrect column alignment that sometimes occurs with NFS filesystems.
Submitted by: Ian <freebsd@damnhippie.dyndns.org>
2002-05-18 21:10:40 +00:00
Tim J. Robbins
1e7e78dca4
Back out part of previous commit: make -P the default again until I'm
...
convinced it's a good idea.
2002-05-18 13:52:07 +00:00
Tim J. Robbins
6873c4b7aa
Make -L the default, allow both -L and -P to be specified (last one used
...
matters), fall back to -P mode if we can't get the logical directory.
2002-05-18 02:47:25 +00:00
Andrey A. Chernov
486d038778
Optimize prev. commit code a bit
2002-05-17 12:24:19 +00:00
Andrey A. Chernov
27d3ae3587
Trailing slash fixes.
...
Fix the case:
cp file nonexistent/
which create nonextstent as file while trailing slash clearly indicates
that nonexistent must be a directory.
Also fix the case:
cp file1 file2/
which should produce error.
2002-05-17 11:52:48 +00:00
Juli Mallett
71e092d1bb
Remove local definition of _PATH_CP, and use <paths.h>, _PATH_CP is in the
...
CURRENT <paths.h>.
2002-05-17 11:38:48 +00:00
Josef Karthauser
d883e289b9
The sysctl has changed from 'kern.ps_showallprocs' to
...
'security.bsd.see_other_uids'.
2002-05-16 11:51:05 +00:00
Tom Rhodes
4481bee462
more file system > filesystem
2002-05-16 03:51:38 +00:00
Tom Rhodes
ebd4324457
Consistancy check s/file system/filesystem/
...
Reviewed by: brian
2002-05-16 01:57:20 +00:00
Bill Fumerola
568dcd5fca
restore missing default case removed in ls.c:r1.57
...
add break statements to default cases where missing.
Submitted by: bde
2002-05-15 18:53:56 +00:00
Juli Mallett
0928a7f16f
Make 'user' and 'group' const as to not discard the qualifier from the
...
functions we use to assign them. Doesn't seem to be anything else that
relies on these being non-const.
2002-05-15 09:49:59 +00:00
Juli Mallett
ff5e253326
Remove an empty default case to make this syntactically correct. Not there
...
is as good as blaknk.
2002-05-15 09:43:52 +00:00
Poul-Henning Kamp
532aff98f6
Remove the private code for reading UFS superblocks, this does not belong
...
in df(1) when we have multiple filesystem types, and the complications of
handling UFS2 pushes this over the edge.
Use the .../mount/extern.h to get prototypes of the functions we
borrow from there. Constify things to match. (why aren't these
functions in a lib anyway ?)
Make everything static and set WARNS?=5.
The way the "df diskdevice" thing works for unmounted diskdevices
is not very general.
Sponsored by: DARPA & NAI Labs.
2002-05-12 19:24:09 +00:00
Chris D. Faulhaber
c01df1d365
Add semicolon to empty default case to silence warning.
2002-05-11 03:12:02 +00:00
Garrett Wollman
94a48596a3
EXPR_COMPAT should imply -e, since there is no way to specify it otherwise,
...
and -e reflects the historic behavior of FreeBSD's expr.
2002-05-11 03:08:12 +00:00
Alfred Perlstein
033be9ae81
while i'm breaking stuff, use __dead2 instead of GCC specific __attribute__.
2002-05-11 01:25:54 +00:00
Alfred Perlstein
46d560550a
backout additional include of cdefs.h, it's not helping any.
2002-05-11 01:24:39 +00:00
Alfred Perlstein
dfe7e2f8ff
include cdefs.h for __printf0like to silence warning.
2002-05-11 00:54:33 +00:00
Chris D. Faulhaber
75a011263c
Add semicolon to empty default case to silence warning.
2002-05-11 00:45:01 +00:00
Alfred Perlstein
64baebf95b
Add semicolon to empty default case to silence warning.
2002-05-11 00:21:00 +00:00
Garrett Wollman
1393277e29
The response to my POSIX interpretation request says that `expr'
...
is required to be oblivious to overflow and to use the data type `long'.
(Division by zero is undefined in ISO C so it's still OK to check for it
here.) Add a new `-e' flag to get the old, more useful behavior.
2002-05-10 22:59:29 +00:00
David E. O'Brien
189d266f08
Remove gCC'isms.
2002-05-10 01:48:15 +00:00
Josef Karthauser
1063e12617
Replace /kernel with /boot/kernel/kernel.
...
PR: docs/37757
Submitted by: Hiten Pandya <hiten@uk.FreeBSD.org>
2002-05-09 11:47:42 +00:00
Dag-Erling Smørgrav
99b82bb76a
Use <paths.h> rather than "pathnames.h", and fix a couple of whitespace nits.
...
Sponsored by: DARPA, NAI Labs
2002-05-08 00:47:01 +00:00
Juli Mallett
634d96e194
Check for possible overflow from sysconf _SC_ARG_MAX and error out in a
...
correct manner. Revert my incorrect change to use err(3) for malloc(3)
failing. Use a size_t variable to store the size of the argument buffer
we allocate, and remove silly casts as the result of having this around.
Modify the math in some of the paranoid checks for buffer overflow to
account for the fact we now are dealing with the actual size of the
buffer. Remove the static qualifier for arg_max, and the bogus setting
of it to -1.
Include <limits.h> for the definitions we use to check for possible
overflows.
Submitted by: bde
2002-05-05 04:42:50 +00:00
Juli Mallett
3d674c947c
Don't cast incorrectly to malloc(3), and don't use errx(3) if malloc(3)
...
returns NULL, as malloc(3) sets errno. Use err(3).
2002-05-02 05:46:37 +00:00
Mark Murray
4b1b25d919
Reorder for style.
2002-04-28 13:54:45 +00:00
Garrett Wollman
96ab7da385
Provide an environment variabloe, EXPR_COMPAT, which disables option
...
parsing for compatibility with old implementations.
2002-04-22 21:23:09 +00:00
Dag-Erling Smørgrav
d397408818
Usage style sweep: spell "usage" with a small 'u'.
...
Also change one case of blatant __progname abuse (several more remain)
This commit does not touch anything in src/{contrib,crypto,gnu}/.
2002-04-22 13:44:47 +00:00
Philippe Charnier
f4e4fcd30d
Use `The .Nm utility'
2002-04-21 12:53:08 +00:00
Philippe Charnier
874506698f
Use `The .Nm utility'
2002-04-20 11:58:12 +00:00
Maxime Henrion
7eab3d347b
Add a reference to the kenv(2) manpage.
2002-04-18 18:49:41 +00:00
Ruslan Ermilov
71b3ac84e1
Replaced exists() tests with two equivalent defined().
...
LIBDIR is defined in bsd.own.mk but sys.mk no longer
includes bsd.own.mk as of revision 1.60.
2002-04-18 07:01:35 +00:00
Maxime Henrion
41196280ac
Use the new functionalities provided by the kenv(2) syscall.
...
Reviewed by: peter
2002-04-17 13:08:14 +00:00
Philippe Charnier
e004acc891
Use `The .Nm utility'
2002-04-16 20:08:06 +00:00
Philippe Charnier
093e3ce74f
ls(1) is utility not function
2002-04-16 20:03:54 +00:00
Tom Rhodes
63b3046fd5
s/CMOS/hardware as talked about on cvs-committers.
...
Suggested by: sheldonh
Approved by: bde
MFC after: 1 day
2002-04-16 14:28:47 +00:00
Tom Rhodes
dfbea8a5ee
Little nit pick in date(1) manual page, tell users which clock date(1)
...
sets
PR: 35606
2002-04-15 18:05:14 +00:00
George C A Reid
4c7e4a544a
Stop a null pointer dereference in the builtin hash function.
...
PR: 36141
Approved by: cracauer
MFC after: 1 week
2002-04-15 15:49:30 +00:00
John W. De Boskey
b744b6caf9
Document option to option dependancy. Fix typo.
...
MFC after: 1 week
2002-04-15 02:21:12 +00:00
Philippe Charnier
c113db6945
Do not return(f_returning_void());. Spell FALLTHROUGH to make it lint()able.
2002-04-12 20:23:51 +00:00
Bosko Milekic
e5f7f97622
Introduce NO_RCMNDS flag so as to not compile rsh, rlogin, and rcp on will,
...
and document in share/examples/etc/make.conf
Submitted by: Aleksandar Simic <asimic@dsl.pipex.com>
MFC after: 1 week
2002-04-09 18:25:44 +00:00
Chris D. Faulhaber
a5b0f3020c
errx()/strerror() -> err()
2002-04-07 04:59:13 +00:00
Giorgos Keramidas
80c7362ce3
Various mdoc fixes, including a change that corrects spacing as
...
described in PR docs/36461.
PR: docs/36461
Noticed by: Gary W. Swearingen <swear@blarg.net>
Submitted by: ru
2002-03-31 20:49:37 +00:00