ed
13541c14c5
Mark global functions and/or variables in apm(8) static where possible.
...
This allows compilers and static analyzers to do more thorough analysis.
2011-11-06 19:01:30 +00:00
uqs
05d1c2e881
Garbage collect unused variable, missed in r200840
...
Found by: clang static analyzer
2010-05-19 08:52:59 +00:00
ru
2c27b3cca9
apm(8) is no longer linked to zzz(8), catch up.
...
(Fixes "zzz" clash in the whatis(1) database.)
2009-12-22 14:21:08 +00:00
will
a3d36123eb
Make apm(8) understand AC Line state 2 as "backup power".
...
Submitted by: liamfoy@sepulcrum.org
2005-05-30 18:44:43 +00:00
maxim
33e59b46a0
o Remove duplicate includes.
...
PR: bin/75712
Submitted by: brueffer
Obtained from: Dragonfly BSD
2005-01-01 22:07:06 +00:00
imp
a8d39b6fa7
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
2004-06-30 21:00:07 +00:00
mux
bc73e6133f
Remove a duplicated printf().
...
Submitted by: Niki Denev <nike_d@cytexbg.com>
2004-06-30 19:56:23 +00:00
mux
0fb9c0032d
Tabs were accidentally lost in the last commit.
...
Submitted by: Liam J. Foy <liamfoy@sepulcrum.org>
2004-06-16 19:14:21 +00:00
mux
2bf674c590
Factor out some duplicated code and fix some style(9) issues.
...
Submitted by: Liam J. Foy <liamfoy@sepulcrum.org>
2004-06-14 16:53:20 +00:00
njl
543df2d4d6
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.
2004-05-27 19:23:27 +00:00
rwatson
06d9cc33dc
If mktime() or timegm() return -1, print out the resume timer value as
...
"unknown", rather than a conversion of -1 to a date/timestamp.
2003-07-13 20:06:41 +00:00
maxim
0a8982360c
Fix a typo: "Managment" -> "Management".
...
PR: bin/47343
Submitted by: Jeremy C. Reed <reed@reedmedia.net>
MFC after: 4 days
2003-04-24 09:16:01 +00:00
charnier
183ae684c4
Add missing .Nm. Add FBSDID. fprintf -> warnx. Lowercase first letter inside
...
err().
2002-10-15 16:28:21 +00:00
imp
08dc290bd9
Remove extra args to printf
...
use Capabilities rather than Capacities.
Submitted by: kkenn
2002-08-25 06:15:50 +00:00
sobomax
c259f4f6b1
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
2002-07-26 13:43:47 +00:00
ume
d3b79934ef
Add output of per battery information to apm(1).
...
New ioctl APMIO_GETPWSTATUS is introduced.
Reviewed by: -mobile and -current folks (no objection)
2000-08-13 17:05:27 +00:00
ume
5b330edf89
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
2000-08-04 20:57:31 +00:00
nsayer
90b09c328d
apm -d also needs a writable file descriptor.
2000-07-23 04:49:43 +00:00
imp
eda0d0cadc
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.
2000-07-19 06:34:02 +00:00
green
4180290782
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.
2000-01-22 18:11:58 +00:00
green
db0585c614
Add the apm -e argument, which will toggle the "enabled" status of APM.
2000-01-16 20:25:57 +00:00
peter
efabb9ccb1
$Id$ -> $FreeBSD$
1999-08-28 01:35:59 +00:00
iwasaki
424fc6d366
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.
1999-08-14 18:45:19 +00:00
msmith
06014f564c
Reenable use of the APMIO_BIOS ioctl for now.
1999-07-30 19:35:21 +00:00
msmith
0425b8852b
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>
1999-07-30 16:15:11 +00:00
green
2450f86bb1
Make bcd2int work (resume time reporting now works.)
...
PR: 12613
Submitted by: Michael Constant <mconst@not.there.com>
1999-07-20 15:37:28 +00:00
green
291fbe9036
Make wall_cmos do something.
...
PR: 12614
1999-07-20 15:31:23 +00:00
imp
099f92f50d
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.
1998-09-04 16:08:54 +00:00
hosokawa
3ac086b2ac
Updated my e-mail addresses.
1998-02-20 07:17:48 +00:00
jdp
dd8043bfaa
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.
1997-11-12 04:16:23 +00:00
imp
e963b91fae
Use warn rather than warnx to report errors opening the APM device.
...
Nit formatting fix
1997-11-06 23:55:38 +00:00
charnier
e155880d06
Use err(3). Typo in man page.
1997-09-02 06:36:39 +00:00
imp
691010efad
compare return value from getopt against -1 rather than EOF, per the final
...
posix standard on the topic.
1997-03-31 05:11:47 +00:00
nate
ff784c16c3
Remove an un-needed static declaration.
1997-01-06 06:09:13 +00:00
nate
11d26897a2
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>
1997-01-06 06:04:42 +00:00
nate
38ef8cf799
Open up /dev/apm instead of /dev/apm0.
1996-03-18 20:34:29 +00:00
nate
2be838b1dc
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.
1996-03-13 00:48:06 +00:00
rgrimes
4f960dd75f
Remove trailing whitespace.
1995-05-30 03:57:47 +00:00
phk
76d6e07a93
Fixed a #include to point to machine/apm_bios.h
1994-11-02 04:54:30 +00:00
phk
7874667561
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
1994-11-01 22:46:40 +00:00
dg
76254fd53b
Laptop Advanced Power Management support (userland end) by HOSOKAWA Tatsumi.
...
Submitted by: HOSOKAWA Tatsumi
1994-10-01 03:23:33 +00:00