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 parent reply other threads:[~2004-08-12 15:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20040811085326.GA11765@elf.ucw.cz>
2004-08-12 15:19 ` Len Brown [this message]
2004-08-12 15:16 ` Allow userspace do something special on overtemp 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
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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox