summaryrefslogtreecommitdiff
path: root/tools/power/acpi
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2014-10-10 10:40:19 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-10-21 00:39:40 +0200
commit63c9043b905d04edebfe37b59d5415a46e5008bb (patch)
treee187f1c30ce3c67dd5a5472bd0042919ca4fe79a /tools/power/acpi
parentf2d348fac77f6cf8eb5d0eb37e16b13d8b796bda (diff)
ACPICA: acpiexec: Do not put STDIN into raw mode unless it is a terminal.
Eliminate an error message for batch-mode processing on unix systems. ACPICA BZ 1114. This patch is mainly for fixing the issues of acpiexec which is not in the Linux upstream. Link: https://bugs.acpica.org/show_bug.cgi?id=1114 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools/power/acpi')
-rw-r--r--tools/power/acpi/os_specific/service_layers/osunixxf.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/power/acpi/os_specific/service_layers/osunixxf.c b/tools/power/acpi/os_specific/service_layers/osunixxf.c
index 60b58cd18410..7ccb073f8316 100644
--- a/tools/power/acpi/os_specific/service_layers/osunixxf.c
+++ b/tools/power/acpi/os_specific/service_layers/osunixxf.c
@@ -122,6 +122,14 @@ static void os_enter_line_edit_mode(void)
{
struct termios local_term_attributes;
+ term_attributes_were_set = 0;
+
+ /* STDIN must be a terminal */
+
+ if (!isatty(STDIN_FILENO)) {
+ return;
+ }
+
/* Get and keep the original attributes */
if (tcgetattr(STDIN_FILENO, &original_term_attributes)) {