ed
e7e5b53bf1
Replace index() and rindex() calls with strchr() and strrchr().
...
The index() and rindex() functions were marked LEGACY in the 2001
revision of POSIX and were subsequently removed from the 2008 revision.
The strchr() and strrchr() functions are part of the C standard.
This makes the source code a lot more consistent, as most of these C
files also call into other str*() routines. In fact, about a dozen
already perform strchr() calls.
2012-01-03 18:51:58 +00:00
ed
5b02333e84
Add missing static keywords for global variables to tools in sbin/.
...
These tools declare global variables without using the static keyword,
even though their use is limited to a single C-file, or without placing
an extern declaration of them in the proper header file.
2011-11-04 13:36:02 +00:00
gjb
0540cab05e
Remove trailing whitespace in the shutdown(8) manual.
...
MFC after: 1 week
2011-07-14 03:08:10 +00:00
gjb
15b823db84
Improvements to the shutdown(8) manual.
...
PR: 158807
Submitted by: arundel
MFC after: 1 week
2011-07-14 02:41:45 +00:00
pjd
7a575413cd
For compatibility with Linux and Solaris add poweroff(8).
...
It is implemented as a hard link to shutdown(8) and it is equivalent of:
# shutdown -p now
While I'm here put one line of usage into one line of C code so it is easier to
grep(1) and separate unrelated code with empty line.
MFC after: 2 weeks
2010-12-30 18:06:31 +00:00
ed
1e717c9d32
Add missing `void' for functions without arguments.
...
While there, rename die_you_gravy_sucking_pig_dog() to something that's
less moronic.
2009-12-29 08:49:43 +00:00
ru
763b9ae1f8
Switch the default WARNS level for sbin/ to 6.
...
Submitted by: Ulrich Spörlein
2009-10-19 16:00:24 +00:00
delphij
e9b1045580
Static'ify internal methods and use prototype.
2009-09-28 07:42:52 +00:00
trhodes
e79f1ce743
Note that when shutdown is run without options, it will place
...
the system into single user mode at the time specified.
PR: 129765
2008-12-23 15:00:03 +00:00
delphij
136497ca84
Use new style declarations instead of K&R ones.
2005-01-25 08:40:51 +00:00
delphij
3f5fb9f7fc
Use modern style defination for main() and move a extern
...
declaration to global section.
Bump WARNS?= to 6
2005-01-25 08:37:04 +00:00
ru
459d10d297
Use the standard section name.
2005-01-18 20:36:37 +00:00
ru
46fddaa54b
Mechanically kill hard sentence breaks.
2004-07-02 21:45:06 +00:00
markm
90f91e7879
Remove advertising clause from University of California Regent's license,
...
per letter dated July 22, 1999.
Approved by: core, imp
2004-04-09 19:58:40 +00:00
obrien
df429f4699
Centralize _PATH_* definitions.
...
Submitted by: Tim Kientzle <kientzle@acm.org> (embellished by me)
2003-05-05 22:49:23 +00:00
obrien
19105c8312
Use __FBSDID() to quiet GCC 3.3 warnings.
2003-05-03 18:41:59 +00:00
ru
301b96498b
Fixed the abuses of .Ql visible on stderr in troff mode.
...
PR: docs/37176
2002-12-23 16:04:51 +00:00
trhodes
136be46680
s/filesystem/file system/g as discussed on -developers
2002-08-21 18:11:48 +00:00
charnier
a82970a04e
The .Nm utility.
2002-07-06 19:35:14 +00:00
jmallett
f01e902944
Move _PATH_WALL from dump and shutdown's local pathnames.h to paths.h.
2002-05-17 11:47:12 +00:00
trhodes
896f3841bf
more file system > filesystem
2002-05-16 04:10:46 +00:00
imp
ec2a00af74
o remove __P
...
o remove main prototype
2002-03-21 13:20:49 +00:00
obrien
9baf2f1b03
Default to WARNS=2.
...
Binary builds that cannot handle this must explicitly set WARNS=0.
Reviewed by: mike
2001-12-04 02:19:58 +00:00
ru
bc205d4152
Set BINOWN=root explicitly for setuid root binaries.
...
This is not "useless", as one may have non-default
setting for BINOWN in make.conf, and we still want
these to be installed setuid root in this case.
2001-09-13 06:48:18 +00:00
dd
339ce28dbd
Document how to cancel a scheduled shutdown.
...
Obtained from: OpenBSD
2001-08-09 06:27:32 +00:00
ru
4345758876
mdoc(7) police:
...
Avoid using parenthesis enclosure macros (.Pq and .Po/.Pc) with plain text.
Not only this slows down the mdoc(7) processing significantly, but it also
has an undesired (in this case) effect of disabling hyphenation within the
entire enclosed block.
2001-08-07 15:48:51 +00:00
dd
36c6165c43
Constify, de-register-ify, __unused-ify, and set WARNS=2.
...
Submitted by: Mike Barcroft <mike@q9media.com>
2001-07-15 05:46:07 +00:00
ru
7cef49ff86
mdoc(7) police: removed HISTORY info from the .Os call.
2001-07-10 11:04:34 +00:00
ru
86642a4ab4
- Backout botched attempt to introduce MANSECT feature.
...
- MAN[1-9] -> MAN.
2001-03-26 14:33:27 +00:00
ru
56b5d7535b
Set the default manual section for sbin/ to 8.
2001-03-20 18:13:31 +00:00
ru
bb320bb874
mdoc(7) police: use canonical form of .Dd macro.
2000-12-11 15:20:31 +00:00
ru
ea31070695
mdoc(7) police: use the new features of the Nm macro.
2000-11-20 16:52:27 +00:00
peter
76f0c923fe
$Id$ -> $FreeBSD$
1999-08-28 00:22:10 +00:00
billf
16090fda0f
Avoid ambigious if/else
1999-07-21 02:49:42 +00:00
ru
eba023799a
Signal init(8) instead of executing halt(8) or reboot(8)
...
when halting or rebooting the system. It benefits from
running /etc/rc.shutdown by init(8).
``-o'' flag is provided for backward compatibility.
PR: 5451
Discussed with: des
1999-06-21 16:06:21 +00:00
jkoshy
f4b6c01b89
Minor cleanups to shutdown(8):
...
- Make the -k "don't actually halt" flag incompatible with
the halt/reboot options -h, -p, and -r.
- The -n "don't sync" option is ignored if -k is specified.
Issue a warning message.
- Compute the actual shutdown time written to /var/run/nologin
correctly in the case of "now" being specified.
1999-06-21 06:21:05 +00:00
ru
97705ed6e4
Fix a coredump with negative (due to overflow) offset values.
1999-06-18 14:26:07 +00:00
asami
bde447d289
Move nologin from /etc to /var/run. This means one less file that has
...
to be written to /etc.
The only essential change is in paths.h, so any third-party software
written correctly will pick it up in the next rebuild.
Reviewed by: the committers list (actually an old version)
1999-01-11 09:07:42 +00:00
bde
518ccde50a
Merged from Lite2 (one bcopy -> memmove, one significant change:
...
don't unlink _PATH_NOLOGIN for the -k case even if shutdown terminates
abnormally. NetBSD already has this change).
1998-12-11 11:21:47 +00:00
bde
1d4f8cd23a
Fixed missing 'p' and `-' flags and other defects in the usage message.
...
Fixed some style bugs.
1998-12-11 11:04:19 +00:00
bde
0fd6c24a07
Merged from Lite2 (just an English fix or pun removal).
...
Updated date. I think dates in man pages should be changed at least
when a new feature is described.
1998-12-11 10:35:38 +00:00
bde
2b205463cc
Fixed disordered options in synopsis.
1998-12-11 10:25:55 +00:00
bde
b3cf10b03b
Fixed missing `p' flag in synopsis.
...
Broken in: previous commit
1998-12-11 10:20:54 +00:00
msmith
005aaf0be2
Add a '-p' flag to shutdown which corresponds to the '-p' flag to halt,
...
requesting a system power-off after shutdown.
1998-12-10 23:54:02 +00:00
obrien
18dba2fe21
Remove useless `BINOWN=root' now that it is the default.
1998-09-19 22:42:06 +00:00
charnier
0432758e6b
Correct use of .Nm. Add rcsid. Do not dot terminate err(3) strings. Spelling.
1998-08-03 06:22:43 +00:00
alex
3b5bff74db
Pass an actual empty environment to execle() as per POSIX rather than
...
rely on undocumented behavior.
The following fixes were obtained from OpenBSD:
o -Wall fixes to tlist array initialization and assignment used
as truth value.
o Use a restricted environment.
o Improved error message when shutdown fails to exec reboot or halt.
1998-01-10 20:11:06 +00:00
alex
7ebcb78d09
Added environment parameter to execle calls.
...
Obtained from: NetBSD PR2737 (augustss@cs.chalmers.se ) via OpenBSD
1998-01-08 20:05:45 +00:00
alex
4ff390e719
Correct a comment from my last commit.
1998-01-08 02:23:59 +00:00
alex
52c4bf5ce3
Allow 'shutdown datespec' to work into the next century. Handle dates
...
in the 22nd century and beyond even though it's irrelevant with a 32-bit
time_t which expires in the year 2038.
1998-01-08 02:21:30 +00:00