aboutsummaryrefslogtreecommitdiffstats
path: root/tools/power/acpi/tools/acpidump/apmain.c
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2014-07-08 10:07:52 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-07-08 14:22:27 +0200
commit846d6ef4d7f0fed114aa1284a245bb1aa96417df (patch)
tree887b128a2d222846a20416c0f94d7bc136536f02 /tools/power/acpi/tools/acpidump/apmain.c
parentACPICA: acpidump: Replace file IOs with new APIs to improve portability (diff)
downloadlinux-dev-846d6ef4d7f0fed114aa1284a245bb1aa96417df.tar.xz
linux-dev-846d6ef4d7f0fed114aa1284a245bb1aa96417df.zip
ACPICA: acpidump: Reduce freopen() invocations to improve portability
This patch reduces the requirement of invoking freopen() in acpidump in order to reduce the porting effort of acpidump. This patch achieves this by turning all acpi_os_printf(stdout) into acpi_ut_file_printf(gbl_output_file). Lv Zheng. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to '')
-rw-r--r--tools/power/acpi/tools/acpidump/apmain.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/power/acpi/tools/acpidump/apmain.c b/tools/power/acpi/tools/acpidump/apmain.c
index 63f7bc9fdf29..35bd6740306e 100644
--- a/tools/power/acpi/tools/acpidump/apmain.c
+++ b/tools/power/acpi/tools/acpidump/apmain.c
@@ -300,6 +300,7 @@ int ACPI_SYSTEM_XFACE main(int argc, char *argv[])
ACPI_DEBUG_INITIALIZE(); /* For debug version only */
acpi_os_initialize();
+ gbl_output_file = ACPI_FILE_OUT;
/* Process command line options */
@@ -348,7 +349,7 @@ int ACPI_SYSTEM_XFACE main(int argc, char *argv[])
}
}
- if (gbl_output_file) {
+ if (gbl_output_filename) {
if (gbl_verbose_mode) {
/* Summary for the output file */