Commit Graph

46 Commits

Author SHA1 Message Date
Rebecca Cran
e267ef95d5 Don't generate input() since it's not used. 2010-11-22 14:16:22 +00:00
Joel Dahl
3645b45f41 Remove extraneous Aq. 2010-11-07 07:16:35 +00:00
Ulrich Spörlein
7cc1fde083 mdoc: drop even more redundant .Pp calls
No change in rendered output, less mandoc lint warnings.

Tool provided by:	Nobuyuki Koganemaru n-kogane at syd.odn.ne.jp
2010-10-19 12:35:40 +00:00
Kevin Lo
34759932a8 For consistency, cast result of getpid() to long 2010-08-31 07:19:10 +00:00
Ulrich Spörlein
cd0788e137 - Fix terminating argument to execl(3), sizeof(NULL) != sizeof(char *)
might be true on some systems [1]
- Rewrite gotos to use return directly
- Some spelling fixes
- Reduce unneeded/non-standard Makefile settings

Requested by:			bde, imp [1]
Explanation provided by:	bde [1]
Reviewed by:			imp
2010-05-19 08:52:51 +00:00
Ulrich Spörlein
103e4932ee Sync apmd(8) with DragonflyBSD, bringing WARNS to 3
Reviewed by:	ed (partial, long time ago)
2010-05-14 14:26:56 +00:00
Ed Schouten
71ccf09269 The last big commit: let usr.sbin/ use WARNS=6 by default. 2010-01-02 11:07:44 +00:00
Kevin Lo
1c6adfcfdf getopt(3) returns -1, not EOF when out of args. 2007-02-05 07:35:23 +00:00
Matthew N. Dodd
75b36243d1 POWERSTATECHANGE was misspelled. 2005-03-24 01:26:40 +00:00
Ruslan Ermilov
0227791b40 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
Ruslan Ermilov
6b7349ee43 Fixed formatting in the AUTHORS section. 2005-01-18 20:04:14 +00:00
Ruslan Ermilov
59a3c79da6 Sort sections. 2005-01-18 20:02:45 +00:00
Ruslan Ermilov
455fb174df Eliminated double whitespace. 2004-07-03 18:35:53 +00:00
Ruslan Ermilov
07bfccd71e Mechanically kill hard sentence breaks. 2004-07-02 23:13:00 +00:00
Ruslan Ermilov
1fdc189947 Mark APM manpages as i386-only. 2004-01-21 13:38:17 +00:00
Nate Lawson
a6991e097f Use separate events for resume from standby and suspend in the apm(4)
case so that if devices need different initialization, we can key off
this in the rc scripts (currently unused).  Also update the man page
which is a 100% duplicate of the rc scripts.
2003-12-30 17:40:28 +00:00
Matthew N. Dodd
9ad4f2d067 - Set close on exec flag for device file descriptors.
- Reset signal handlers in event_cmd_exec_act().

PR:		 i386/35182
Submitted by:	 Daniel O'Connor <darius@dons.net.au>
2003-06-22 05:57:34 +00:00
Matthew N. Dodd
f90445cf1f - Don't ignore SIGTERM.
- Add a command line switch to trigger POWERSTATECHANGE actions on
  un-reported power state changes.

PR:		 i386/32251
Submitted by:	 Walter C. Pelissero <walter@pelissero.org>
2003-06-22 05:34:45 +00:00
Maxim Konovalov
c7012f4a11 o BATTTIME and BATTPERCENT are 'int' not 'str'.
PR:		bin/48793
Submitted by:	Stefan Farfeleder <stefan@fafoe.dyndns.org>
MFC after:	2 week
2003-06-16 14:57:07 +00:00
Warner Losh
f4fe0dcb87 include string.h for memcmp declearation 2003-06-09 06:19:15 +00:00
Jens Schweikhardt
57bd0fc6e8 english(4) police. 2002-12-27 12:15:40 +00:00
Philippe Charnier
490d5836b5 The .Nm utility 2002-07-14 14:47:15 +00:00
Alfred Perlstein
d89167b4ea de-__P() 2002-07-11 18:31:16 +00:00
Brian Somers
2313781df2 Handle snprintf() returning < 0 (not just -1)
MFC after:	2 weeks
2001-08-20 15:09:34 +00:00
Brian Somers
36c1612b5e Handle snprintf() returning -1.
MFC after:	2 weeks
2001-08-20 13:24:39 +00:00
Ruslan Ermilov
c4d9468ea0 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
David E. O'Brien
90e655ea4e Perform a major cleanup of the usr.sbin Makefiles.
These are not perfectly in agreement with each other style-wise, but they
are orders of orders of magnitude more consistent style-wise than before.
2001-07-20 06:20:32 +00:00
David E. O'Brien
ac24b049cc Remove GCC'isms in CFLAGS. 2001-07-20 04:23:13 +00:00
Dima Dorfman
f247324df7 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
Nick Sayer
719b9dc1af Add battery state monitoring to apmd.
The new syntax available in the config file is:

apm_battery [0-9]+(%|[Mm) (dis|)charging { ... }

The stuff in the braces is the same as the existing case. nn% checks for
a certain percentage of life remaining and nnM checks for a cerain
number of minutes remaining. Specifying "discharge" means that you're
interested in knowing when the battery reaches a certain level while AC
power is off, "charging" the opposite.

The man page needs to be updated.

The code can be fooled. If you SIGHUP the daemon and the battery level
matches a rule it will be performed once per SIGHUP. If the battery
level matches a rule and you repeatedly apply and take away AC power,
the rule will be run once per occurance. This, however, is a feature.
:-) The code also only runs when select() times out, so getting APM
events more often than the timeout interval will result in the rules not
being run. These are things that remain to be overcome.
2001-05-15 05:13:45 +00:00
Ruslan Ermilov
345e52e742 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:42:20 +00:00
Ruslan Ermilov
c73e22c3d4 Set the default manual section for usr.sbin/ to 8. 2001-03-20 18:17:26 +00:00
Chris D. Faulhaber
aecdf0ebbf Check strdup() return values
Reviewed by:	kris
2001-01-20 01:22:31 +00:00
Ruslan Ermilov
404d68d48f mdoc(7) police: add missing .Ed call. 2001-01-18 17:23:15 +00:00
Ruslan Ermilov
8b5c4af3ff Prepare for mdoc(7)NG. 2000-12-27 15:30:30 +00:00
Ruslan Ermilov
e97407b4f2 mdoc(7) police: use the new features of the Nm macro. 2000-11-20 20:10:44 +00:00
Bruce Evans
adc42254a7 Don't forget to clean y.output. Most files generated by yacc are cleaned
automatically, but not this one.

Fixed some style bugs.
2000-05-15 14:45:28 +00:00
Jeroen Ruigrok van der Werven
04fb537dc8 Remove Xr to apmconf(8) since it got replaced in total by apm(8). 2000-01-23 13:30:44 +00:00
Mike Pritchard
c66c86f451 Spelling fix.
Also fix a minor mdoc style problem that I noticed.

PR:		bin/14589
Submitted by:hristian Weisgerber <naddy@mips.rhein-neckar.de>
1999-10-30 19:42:31 +00:00
Peter Wemm
e46b89dc93 Fix warning: return type of main' is not int' 1999-09-15 01:58:44 +00:00
Mitsuru IWASAKI
58173bf747 Fix debut version to 3.3, not 4.0. 1999-09-11 19:32:30 +00:00
Mitsuru IWASAKI
38d336b5b8 Handle CAPABILITIESCHANGE event.
Document USERSTANDBYREQ and CAPABILITIESCHANGE events to apmd manpage.
1999-09-11 16:00:28 +00:00
Peter Wemm
a1a4f1a0d8 $Header$ -> $FreeBSD$ 1999-08-28 05:11:36 +00:00
Peter Wemm
97d92980a9 $Id$ -> $FreeBSD$ 1999-08-28 01:35:59 +00:00
Mitsuru IWASAKI
a080a18c87 Fix typo ($Id: ... % --> $Id: ... $). 1999-07-10 18:28:26 +00:00
Mitsuru IWASAKI
d50a71bdd8 The apmd package provides a means of handling various APM events from
userland code.  Using apmd.conf, the apmd(8) configuration file, you
can select the APM events to be handled from userland and specify the
commands for a given event, allowing APM behaviour to be configured
flexibly.

Have Fun!

Submitted by:	iwasaki, KOIE Hidetaka <hide@koie.org>
Reviewed by:	-hackers, -mobile and bsd-nomads ML folks.
Contributed by:	Warner Losh <imp@FreeBSD.org>,
	Hiroshi Yamashita <bluemoon@msj.biglobe.ne.jp>,
	Yoshihiko SARUMARU <mistral@imasy.or.jp>,
	Norihiro Kumagai <kuma@nk.rim.or.jp>,
	NAKAGAWA Yoshihisa <nakagawa@jp.FreeBSD.org>, and
	Nick Hilliard <nick@foobar.org>.
1999-07-10 17:39:36 +00:00