Skip to content

Commit

Permalink
ACPICA: acpiexec: Do not put STDIN into raw mode unless it is a termi…
Browse files Browse the repository at this point in the history
…nal.

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>
  • Loading branch information
Bob Moore authored and Rafael J. Wysocki committed Oct 20, 2014
1 parent f2d348f commit 63c9043
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tools/power/acpi/os_specific/service_layers/osunixxf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 63c9043

Please sign in to comment.