aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/acpi
diff options
context:
space:
mode:
authorNate Lawson <njl@FreeBSD.org>2004-08-18 05:48:24 +0000
committerNate Lawson <njl@FreeBSD.org>2004-08-18 05:48:24 +0000
commite079f9491a79f2693df34e265f287ef229cfdf57 (patch)
tree25a0ad7d53db15af2d1c684fdfde9aa8ed92b1fc /usr.sbin/acpi
parentca36a5dc0d582483c4561057bc2f02c4874da331 (diff)
downloadsrc-e079f9491a79f2693df34e265f287ef229cfdf57.tar.gz
src-e079f9491a79f2693df34e265f287ef229cfdf57.zip
Remove the ACPIIO_ENABLE and ACPIIO_DISABLE ioctls as well as all
callers. These ioctls attempted to enable and disable the ACPI interpreter at runtime. In practice, it is not possible to boot with ACPI and then disable it on many systems and trying to do so can cause crashes, interrupt storms, etc. Binary compatibility with userland is retained. MFC after: 2 days
Notes
Notes: svn path=/head/; revision=133933
Diffstat (limited to 'usr.sbin/acpi')
-rw-r--r--usr.sbin/acpi/acpiconf/acpiconf.88
-rw-r--r--usr.sbin/acpi/acpiconf/acpiconf.c27
2 files changed, 4 insertions, 31 deletions
diff --git a/usr.sbin/acpi/acpiconf/acpiconf.8 b/usr.sbin/acpi/acpiconf/acpiconf.8
index 1de3c7ddf338..b665daf3669f 100644
--- a/usr.sbin/acpi/acpiconf/acpiconf.8
+++ b/usr.sbin/acpi/acpiconf/acpiconf.8
@@ -27,7 +27,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd January 12, 2001
+.Dd August 16, 2004
.Dt ACPICONF 8
.Os
.Sh NAME
@@ -35,7 +35,7 @@
.Nd control ACPI power management
.Sh SYNOPSIS
.Nm
-.Op Fl deh
+.Op Fl h
.Op Fl i Ar batt
.Op Fl s Ar type
.Sh DESCRIPTION
@@ -45,10 +45,6 @@ utility allows the user control of the ACPI power management
functions.
The following command-line options are recognized:
.Bl -tag -width ".Fl s Ar type"
-.It Fl d
-Disables ACPI power management.
-.It Fl e
-Enables ACPI power management.
.It Fl h
Displays a summary of available options.
.It Fl i Ar batt
diff --git a/usr.sbin/acpi/acpiconf/acpiconf.c b/usr.sbin/acpi/acpiconf/acpiconf.c
index d9e67e407cc9..4500cbefd5b0 100644
--- a/usr.sbin/acpi/acpiconf/acpiconf.c
+++ b/usr.sbin/acpi/acpiconf/acpiconf.c
@@ -57,21 +57,6 @@ acpi_init()
}
}
-#if 0
-static int
-acpi_enable_disable(int enable)
-{
- if (ioctl(acpifd, enable, NULL) == -1) {
- if (enable == ACPIIO_ENABLE)
- err(EX_IOERR, "enable failed");
- else
- err(EX_IOERR, "disable failed");
- }
-
- return (0);
-}
-#endif
-
static int
acpi_sleep(int sleep_type)
{
@@ -138,7 +123,7 @@ acpi_battinfo(int num)
static void
usage(const char* prog)
{
- printf("usage: %s [-deh] [-i batt] [-s 1-5]\n", prog);
+ printf("usage: %s [-h] [-i batt] [-s 1-5]\n", prog);
exit(0);
}
@@ -155,19 +140,11 @@ main(int argc, char *argv[])
sleep_type = -1;
acpi_init();
- while ((c = getopt(argc, argv, "dehi:s:")) != -1) {
+ while ((c = getopt(argc, argv, "hi:s:")) != -1) {
switch (c) {
case 'i':
acpi_battinfo(atoi(optarg));
break;
-#if 0
- case 'd':
- acpi_enable_disable(ACPIIO_DISABLE);
- break;
- case 'e':
- acpi_enable_disable(ACPIIO_ENABLE);
- break;
-#endif
case 's':
if (optarg[0] == 'S')
sleep_type = optarg[1] - '0';