aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi/acpixf.h
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2014-07-07 22:07:06 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-07-08 08:22:26 -0400
commit2e70da4c51eb18a4d229aa48763c15f5dbc5b43d (patch)
tree27bbb3864f794852a673f016f4e5be60720f331e /include/acpi/acpixf.h
parent80a648c12e4bda45c4f1bb93d83184fb3010ac12 (diff)
ACPICA: Utilities: Introduce acpi_log_error() to improve portability
Invocations like fprintf(stderr) and perror() are not portable, this patch introduces acpi_log_error() as a replacement, it is implemented using new portable API - acpi_ut_file_vprintf(). Note that though acpi_os_initialize() need to be invoked prior than using this new API, since no users are introduced in this patch, such invocations are not added for applications that link utprint.c in this patch. Futher patches that introduce users of acpi_log_error() should take care of this. This patch is only useful for ACPICA applications, most of which are not shipped in the Linux kernel. Note that follow-up commits will update acpidump to use this new API to improve portability. 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 'include/acpi/acpixf.h')
-rw-r--r--include/acpi/acpixf.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h
index 35b525c19711..9858551fc84a 100644
--- a/include/acpi/acpixf.h
+++ b/include/acpi/acpixf.h
@@ -335,6 +335,23 @@ ACPI_GLOBAL(u8, acpi_gbl_system_awake_and_running);
335 335
336#endif /* ACPI_DEBUG_OUTPUT */ 336#endif /* ACPI_DEBUG_OUTPUT */
337 337
338/*
339 * Application prototypes
340 *
341 * All interfaces used by application will be configured
342 * out of the ACPICA build unless the ACPI_APPLICATION
343 * flag is defined.
344 */
345#ifdef ACPI_APPLICATION
346#define ACPI_APP_DEPENDENT_RETURN_VOID(prototype) \
347 prototype;
348
349#else
350#define ACPI_APP_DEPENDENT_RETURN_VOID(prototype) \
351 static ACPI_INLINE prototype {return;}
352
353#endif /* ACPI_APPLICATION */
354
338/***************************************************************************** 355/*****************************************************************************
339 * 356 *
340 * ACPICA public interface prototypes 357 * ACPICA public interface prototypes
@@ -861,6 +878,9 @@ ACPI_DBG_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(6)
861 const char *module_name, 878 const char *module_name,
862 u32 component_id, 879 u32 component_id,
863 const char *format, ...)) 880 const char *format, ...))
881ACPI_APP_DEPENDENT_RETURN_VOID(ACPI_PRINTF_LIKE(1)
882 void ACPI_INTERNAL_VAR_XFACE
883 acpi_log_error(const char *format, ...))
864 884
865/* 885/*
866 * Divergences 886 * Divergences