History log of /freebsd-10.0-release/usr.sbin/apm/apm.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

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

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

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


# 227249 06-Nov-2011 ed

Mark global functions and/or variables in apm(8) static where possible.

This allows compilers and static analyzers to do more thorough analysis.


# 208290 19-May-2010 uqs

Garbage collect unused variable, missed in r200840

Found by: clang static analyzer


# 200840 22-Dec-2009 ru

apm(8) is no longer linked to zzz(8), catch up.
(Fixes "zzz" clash in the whatis(1) database.)


# 146812 30-May-2005 will

Make apm(8) understand AC Line state 2 as "backup power".

Submitted by: liamfoy@sepulcrum.org


# 139552 01-Jan-2005 maxim

o Remove duplicate includes.

PR: bin/75712
Submitted by: brueffer
Obtained from: Dragonfly BSD


# 131368 30-Jun-2004 imp

Fix to not use 255, but instead use APM_UNKNOWN.
Compare things correctly against -1 or 0
Don't print any capabilities if unknown is returned from the kernel.

Reviewed/Submitted by: njl, Liam Foy


# 131364 30-Jun-2004 mux

Remove a duplicated printf().

Submitted by: Niki Denev <nike_d@cytexbg.com>


# 130604 16-Jun-2004 mux

Tabs were accidentally lost in the last commit.

Submitted by: Liam J. Foy <liamfoy@sepulcrum.org>


# 130476 14-Jun-2004 mux

Factor out some duplicated code and fix some style(9) issues.

Submitted by: Liam J. Foy <liamfoy@sepulcrum.org>


# 129784 27-May-2004 njl

Check for >= 255 since sign extension from byte to u_int sometimes makes
the value for "unknown" 0xffffffff. The underlying kernel drivers should
be updated to only return 255 but the ABI is used by too many userland
utilities.

Also, make this WARNS 6 compatible.


# 117517 13-Jul-2003 rwatson

If mktime() or timegm() return -1, print out the resume timer value as
"unknown", rather than a conversion of -1 to a date/timestamp.


# 113961 24-Apr-2003 maxim

Fix a typo: "Managment" -> "Management".

PR: bin/47343
Submitted by: Jeremy C. Reed <reed@reedmedia.net>
MFC after: 4 days


# 105157 15-Oct-2002 charnier

Add missing .Nm. Add FBSDID. fprintf -> warnx. Lowercase first letter inside
err().


# 102403 25-Aug-2002 imp

Remove extra args to printf
use Capabilities rather than Capacities.

Submitted by: kkenn


# 100714 26-Jul-2002 sobomax

Don't dump all information about apm when only asked to enable/disable apm
functions (-e and -h switches). This should make apm(8) self-consistent, as
for example -d enable|disable doesn't dump such info.

MFC after: 5 days


# 64615 13-Aug-2000 ume

Add output of per battery information to apm(1).
New ioctl APMIO_GETPWSTATUS is introduced.

Reviewed by: -mobile and -current folks (no objection)


# 64252 04-Aug-2000 ume

If caller have privilege to r/w access to /dev/apm, show the
info about resume timer and resume on ring indicator, again.

Reviewed by: imp


# 63766 23-Jul-2000 nsayer

apm -d also needs a writable file descriptor.


# 63495 19-Jul-2000 imp

When we're just reading info from the driver, attempt to open the apm
device read only so we can suppot a readonly apm device.


# 56399 22-Jan-2000 green

Cleanups, new options, and syntax changes w.r.t. the -e fiag I had just
added. This completes the addition of apmconf(8) features into apm(8),
and will be followed shortly by asmodai with a manpage commit.


# 56123 16-Jan-2000 green

Add the apm -e argument, which will toggle the "enabled" status of APM.


# 50479 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 49790 14-Aug-1999 iwasaki

Change to continue process after calling `Get Resume TImer' APM
BIOS function (supported in v1.2) on older BIOS version (v1.1 or 1.0).

Reviewed by: -mobile ML folks.


# 49293 30-Jul-1999 msmith

Reenable use of the APMIO_BIOS ioctl for now.


# 49286 30-Jul-1999 msmith

Erk, more APMIO_BIOS stuff I missed. Temporarily disable the resume timer
support until I can implement it as an ioctl proper.

Submitted by: N.Dudorov <nnd@mail.nsk.ru>


# 48939 20-Jul-1999 green

Make bcd2int work (resume time reporting now works.)

PR: 12613
Submitted by: Michael Constant <mconst@not.there.com>


# 48938 20-Jul-1999 green

Make wall_cmos do something.

PR: 12614


# 38809 04-Sep-1998 imp

o Enable standby mode in apm utility. You need a newer kernel for this
functionality to work (however, the kernel changes were committed
to current at 1998/07/05 23:29:11 PDT).
o Enable setting of a timer for later wakeup. Note, not all APM
BIOSes support this for all modes (mine doesn't support waking up on
a timer from standby mode).
o Print out the APM capabilities, as reported by the BIOS.
o Report wake on ring indication. No way to enable/disable this, but
it is reported.
o update man page with above
o The output of this command has changed, so if you have a script that
parses its output, then you may need to rewrite it slightly.
o The code attempts to deal with older kernels than July 5, 1998, but
that part of the code isn't well tested.


# 33657 20-Feb-1998 hosokawa

Updated my e-mail addresses.


# 31127 12-Nov-1997 jdp

Output the estimated battery lifetime as "hh:mm:ss" along with
everything else. Add a "-t" option for outputting it in raw form.
Define and document the order in which raw values are printed when
more than one is requested on the command line.


# 30996 06-Nov-1997 imp

Use warn rather than warnx to report errors opening the APM device.
Nit formatting fix


# 29030 02-Sep-1997 charnier

Use err(3). Typo in man page.


# 24428 31-Mar-1997 imp

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


# 21364 06-Jan-1997 nate

Remove an un-needed static declaration.


# 21363 06-Jan-1997 nate

Re-write the driver to use getopt(), add the new display suspend
function of the kernel, and other assorted misc. cleanups.

Submitted by: nate & HOSOKAWA, Tatsumi <hosokawa@jp.FreeBSD.org>


# 14674 18-Mar-1996 nate

Open up /dev/apm instead of /dev/apm0.


# 14609 12-Mar-1996 nate

Add the '-s' flag to apm which returns the status of the APM support
(enable/disabled) now that the APM_GETINFO ioctl returns the necessary
information. Also, print out the status along with the other
information as the default behavior.


# 8857 30-May-1995 rgrimes

Remove trailing whitespace.


# 4075 02-Nov-1994 phk

Fixed a #include to point to machine/apm_bios.h


# 4062 01-Nov-1994 phk

The latest user-land changes from the author. I added a big warning to the
apm.4 man-page. I also hope the Makefiles make sense now.

Submitted by: HOSOKAWA Tatsumi


# 3259 01-Oct-1994 dg

Laptop Advanced Power Management support (userland end) by HOSOKAWA Tatsumi.

Submitted by: HOSOKAWA Tatsumi