Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Bob Moore and committed by
Rafael J. Wysocki
63c9043b f2d348fa

+8
+8
tools/power/acpi/os_specific/service_layers/osunixxf.c
··· 122 122 { 123 123 struct termios local_term_attributes; 124 124 125 + term_attributes_were_set = 0; 126 + 127 + /* STDIN must be a terminal */ 128 + 129 + if (!isatty(STDIN_FILENO)) { 130 + return; 131 + } 132 + 125 133 /* Get and keep the original attributes */ 126 134 127 135 if (tcgetattr(STDIN_FILENO, &original_term_attributes)) {