History log of /freebsd-11.0-release/usr.sbin/apmd/apmd.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 303975 11-Aug-2016 gjb

Copy stable/11@r303970 to releng/11.0 as part of the 11.0-RELEASE
cycle.

Prune svn:mergeinfo from the new branch, and rename it to RC1.

Update __FreeBSD_version.

Use the quarterly branch for the default FreeBSD.conf pkg(8) repo and
the dvd1.iso packages population.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 302408 08-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 300557 24-May-2016 peter

It seems <sys/types.h> is a new prerequisite for <bitstring.h> after
r300539. Attempt to fix the build for i386.


# 212048 31-Aug-2010 kevlo

For consistency, cast result of getpid() to long


# 208289 19-May-2010 uqs

- 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


# 208075 14-May-2010 uqs

Sync apmd(8) with DragonflyBSD, bringing WARNS to 3

Reviewed by: ed (partial, long time ago)


# 166509 05-Feb-2007 kevlo

getopt(3) returns -1, not EOF when out of args.


# 144043 24-Mar-2005 mdodd

POWERSTATECHANGE was misspelled.


# 116668 22-Jun-2003 mdodd

- 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>


# 116666 22-Jun-2003 mdodd

- 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>


# 76611 15-May-2001 nsayer

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.


# 71277 20-Jan-2001 jedgar

Check strdup() return values

Reviewed by: kris


# 51287 15-Sep-1999 peter

Fix warning: return type of `main' is not `int'


# 50479 28-Aug-1999 peter

$Id$ -> $FreeBSD$


# 48731 10-Jul-1999 iwasaki

This commit was generated by cvs2svn to compensate for changes in r48730,
which included commits to RCS files with non-trunk default branches.


# 48730 10-Jul-1999 iwasaki

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>.