summaryrefslogtreecommitdiff
path: root/usr.sbin/apmd
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2010-03-30 17:42:06 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2010-03-30 17:42:06 +0000
commit37bd90a8ebd670235ac9dad69532d88d2fea13a9 (patch)
tree22259c602d17dd480f2cd76089074605a764b3be /usr.sbin/apmd
parent17f79ce6ab989e13c40b1b05780f81a5d5f2fe05 (diff)
revert revision 1.53.
Now the kernel does a proper vt switch for us this hack is no longer needed. ok miod@
Diffstat (limited to 'usr.sbin/apmd')
-rw-r--r--usr.sbin/apmd/apmd.c28
1 files changed, 3 insertions, 25 deletions
diff --git a/usr.sbin/apmd/apmd.c b/usr.sbin/apmd/apmd.c
index c2e2741838d..918d6974fed 100644
--- a/usr.sbin/apmd/apmd.c
+++ b/usr.sbin/apmd/apmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apmd.c,v 1.54 2009/08/04 18:26:48 jmc Exp $ */
+/* $OpenBSD: apmd.c,v 1.55 2010/03/30 17:42:05 oga Exp $ */
/*
* Copyright (c) 1995, 1996 John T. Kohl
@@ -79,8 +79,6 @@ int get_avg_idle_up(void);
void perf_status(struct apm_power_info *pinfo, int ncpu);
void suspend(int ctl_fd);
void stand_by(int ctl_fd);
-void suspend_req(int ctl_fd);
-void stand_by_req(int ctl_fd);
void setperf(int new_perf);
void sigexit(int signo);
void do_etc_file(const char *file);
@@ -487,26 +485,6 @@ stand_by(int ctl_fd)
ioctl(ctl_fd, APM_IOC_STANDBY, 0);
}
-void
-suspend_req(int ctl_fd)
-{
- /* let the user get their finger off the enter key before we suspend */
- sleep(1);
- ioctl(ctl_fd, APM_IOC_SUSPEND_REQ, 0);
- /* give X a chance to do things */
- sleep(2);
-}
-
-void
-stand_by_req(int ctl_fd)
-{
- /* let the user get their finger off the enter key before we suspend */
- sleep(1);
- ioctl(ctl_fd, APM_IOC_STANDBY_REQ, 0);
- /* give X a chance to do things */
- sleep(2);
-}
-
#define TIMO (10*60) /* 10 minutes */
int
@@ -735,10 +713,10 @@ main(int argc, char *argv[])
case NORMAL:
break;
case SUSPENDING:
- suspend_req(ctl_fd);
+ suspend(ctl_fd);
break;
case STANDING_BY:
- stand_by_req(ctl_fd);
+ stand_by(ctl_fd);
break;
}
}