summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authornjl <njl@FreeBSD.org>2004-08-18 05:48:24 +0000
committernjl <njl@FreeBSD.org>2004-08-18 05:48:24 +0000
commit0e6427381e008c3a084230747d2861111279c8fd (patch)
tree25a0ad7d53db15af2d1c684fdfde9aa8ed92b1fc /usr.sbin
parent32184298650decaeb04049e9140a43cbe6fe89d4 (diff)
downloadFreeBSD-src-0e6427381e008c3a084230747d2861111279c8fd.zip
FreeBSD-src-0e6427381e008c3a084230747d2861111279c8fd.tar.gz
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
Diffstat (limited to 'usr.sbin')
-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 1de3c7d..b665daf 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 d9e67e4..4500cbe 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';
OpenPOWER on IntegriCloud