From: Len Brown <len.brown@intel.com>
To: Pavel Machek <pavel@suse.cz>
Cc: trenn@suse.de, seife@suse.de,
Kernel Mailing List <linux-kernel@vger.kernel.org>,
ACPI Developers <acpi-devel@lists.sourceforge.net>
Subject: Re: Allow userspace do something special on overtemp
Date: 12 Aug 2004 11:19:05 -0400 [thread overview]
Message-ID: <1092323945.5028.177.camel@dhcppc4> (raw)
In-Reply-To: <20040811085326.GA11765@elf.ucw.cz>
Simpler to delete the usermode call and rely on the (flexible)
acpid event, yes?
thermal.c | 29 +----------------------------
1 files changed, 1 insertion(+), 28 deletions(-)
cheers,
-Len
===== drivers/acpi/thermal.c 1.34 vs edited =====
--- 1.34/drivers/acpi/thermal.c Thu Jul 8 01:56:01 2004
+++ edited/drivers/acpi/thermal.c Thu Aug 12 11:13:59 2004
@@ -61,7 +61,6 @@
#define ACPI_THERMAL_MODE_ACTIVE 0x00
#define ACPI_THERMAL_MODE_PASSIVE 0x01
#define ACPI_THERMAL_MODE_CRT 0xff
-#define ACPI_THERMAL_PATH_POWEROFF "/sbin/poweroff"
#define ACPI_THERMAL_MAX_ACTIVE 10
@@ -422,30 +421,6 @@
static int
-acpi_thermal_call_usermode (
- char *path)
-{
- char *argv[2] = {NULL, NULL};
- char *envp[3] = {NULL, NULL, NULL};
-
- ACPI_FUNCTION_TRACE("acpi_thermal_call_usermode");
-
- if (!path)
- return_VALUE(-EINVAL);
-
- argv[0] = path;
-
- /* minimal command environment */
- envp[0] = "HOME=/";
- envp[1] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin";
-
- call_usermodehelper(argv[0], argv, envp, 0);
-
- return_VALUE(0);
-}
-
-
-static int
acpi_thermal_critical (
struct acpi_thermal *tz)
{
@@ -468,10 +443,8 @@
if (result)
return_VALUE(result);
- printk(KERN_EMERG "Critical temperature reached (%ld C), shutting
down.\n", KELVIN_TO_CELSIUS(tz->temperature));
+ printk(KERN_EMERG "Critical temperature reached (%ld C).\n",
KELVIN_TO_CELSIUS(tz->temperature));
acpi_bus_generate_event(device, ACPI_THERMAL_NOTIFY_CRITICAL,
tz->trips.critical.flags.enabled);
-
- acpi_thermal_call_usermode(ACPI_THERMAL_PATH_POWEROFF);
return_VALUE(0);
}
next prev parent reply other threads:[~2004-08-12 15:19 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-11 8:53 Allow userspace do something special on overtemp Pavel Machek
2004-08-11 9:03 ` Arjan van de Ven
2004-08-11 9:06 ` Pavel Machek
2004-08-11 14:49 ` Len Brown
2004-08-11 14:52 ` Wichert Akkerman
2004-08-11 15:28 ` Thomas Renninger
2004-08-11 21:08 ` Kronos
2004-08-11 20:26 ` Pavel Machek
2004-08-11 9:18 ` Måns Rullgård
2004-08-11 18:22 ` Olaf Hering
[not found] ` <411A239C.8060606@blue-labs.org>
2004-08-11 20:22 ` Pavel Machek
2004-08-12 0:08 ` Dax Kelson
2004-08-12 3:29 ` Len Brown
2004-08-12 7:40 ` Pavel Machek
2004-08-12 14:28 ` Len Brown
2004-08-12 20:24 ` Pavel Machek
2004-08-12 22:51 ` Len Brown
2004-08-12 23:21 ` Pavel Machek
2004-08-12 7:35 ` Pavel Machek
2004-08-12 15:19 ` Len Brown [this message]
2004-08-12 15:16 ` Randy.Dunlap
2004-08-12 15:50 ` Stefan Seyfried
2004-08-12 17:27 ` [ACPI] " Stefan Dösinger
[not found] ` <200408121927.11277.stefandoesinger-RbZlAiThDcE@public.gmane.org>
2004-08-12 22:53 ` Len Brown
2004-08-12 22:53 ` [ACPI] " Len Brown
[not found] <fa.fd8nc62.oig6ao@ifi.uio.no>
[not found] ` <fa.g1p407b.1c569pj@ifi.uio.no>
2004-08-13 4:22 ` Robert Hancock
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1092323945.5028.177.camel@dhcppc4 \
--to=len.brown@intel.com \
--cc=acpi-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@suse.cz \
--cc=seife@suse.de \
--cc=trenn@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.