summaryrefslogtreecommitdiff
path: root/usr.sbin/apmd/apmd.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-03-22 06:06:28 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-03-22 06:06:28 +0000
commit580e437a6e8367d1046a6069f912dffed03e8dda (patch)
treedb4b6a8560d74226836e6b63836e7e68de6ca465 /usr.sbin/apmd/apmd.c
parentf5fc3ce8b195f8959f6d308d752f1a98d5963440 (diff)
backing out undiscussed changes outside your area
Diffstat (limited to 'usr.sbin/apmd/apmd.c')
-rw-r--r--usr.sbin/apmd/apmd.c38
1 files changed, 2 insertions, 36 deletions
diff --git a/usr.sbin/apmd/apmd.c b/usr.sbin/apmd/apmd.c
index ab38ebe7e62..55aa461ba02 100644
--- a/usr.sbin/apmd/apmd.c
+++ b/usr.sbin/apmd/apmd.c
@@ -70,8 +70,6 @@ enum apm_state handle_client(int sock_fd, int ctl_fd);
void suspend(int ctl_fd);
void stand_by(int ctl_fd);
void resume(int ctl_fd);
-void powerup(int ctl_fd);
-void powerdown(int ctl_fd);
void sigexit(int signo);
void make_noise(int howmany);
void do_etc_file(const char *file);
@@ -266,17 +264,6 @@ int howmany;
return;
}
-void
-powerup(int ctl_fd)
-{
- do_etc_file(_PATH_APM_ETC_POWERUP);
-}
-
-void
-powerdown(int ctl_fd)
-{
- do_etc_file(_PATH_APM_ETC_POWERDOWN);
-}
void
suspend(int ctl_fd)
@@ -318,7 +305,6 @@ main(int argc, char *argv[])
int statonly = 0;
int enableonly = 0;
int pctonly = 0;
- int powerstatus = 0, powerbak = 0, powerchange = 0;
int messages = 0;
fd_set *devfdsp, *selfdsp;
struct apm_event_info apmevent;
@@ -418,11 +404,7 @@ main(int argc, char *argv[])
if (ready == 0) {
/* wakeup for timeout: take status */
- powerbak = power_status(ctl_fd, 0, 0);
- if (powerstatus != powerbak) {
- powerstatus = powerbak;
- powerchange = 1;
- }
+ power_status(ctl_fd, 0, 0);
}
if (FD_ISSET(ctl_fd, selfdsp)) {
suspends = standbys = resumes = 0;
@@ -448,19 +430,10 @@ main(int argc, char *argv[])
case APM_NORMAL_RESUME:
case APM_CRIT_RESUME:
case APM_SYS_STANDBY_RESUME:
- powerbak = power_status(ctl_fd, 0, 0);
- if (powerstatus != powerbak) {
- powerstatus = powerbak;
- powerchange = 1;
- }
resumes++;
break;
case APM_POWER_CHANGE:
- powerbak = power_status(ctl_fd, 0, 0);
- if (powerstatus != powerbak) {
- powerstatus = powerbak;
- powerchange = 1;
- }
+ power_status(ctl_fd, 0, 0);
break;
default:
break;
@@ -477,13 +450,6 @@ main(int argc, char *argv[])
resume(ctl_fd);
syslog(LOG_NOTICE, "system resumed from APM sleep");
}
- if (powerchange) {
- if (powerstatus)
- powerup(ctl_fd);
- else
- powerdown(ctl_fd);
- powerchange = 0;
- }
ready--;
}
if (ready == 0)