aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/acutils.h
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2014-07-07 22:07:00 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-07-08 08:22:25 -0400
commit80a648c12e4bda45c4f1bb93d83184fb3010ac12 (patch)
tree8ecf2e0765862b97b6b9c8666aa11869e7ad4c5a /drivers/acpi/acpica/acutils.h
parent7824f44ecfef4f05caaa8f9536c523b8d645f102 (diff)
ACPICA: Utilities: Add formatted printing APIs
This patch introduces formatted printing APIs to handle ACPICA specific formatted print requirements. Currently only specific OSPMs will use this customized printing support, Linux kernel doesn't use these APIs at this time. It will be enabled for Linux kernel resident ACPICA after being well tested. So currently this patch is a no-op. The specific formatted printing APIs are useful to ACPICA as: 1. Some portable applications do not link standard C library, so they cannot use standard formatted print APIs directly. 2. Platform specific printing format may differ and thus not portable, for example, u64 is %ull for Linux kernel and is %uI64 for some MSVC versions. 3. Platform specific printing format may conflict with ACPICA's usages while it is not possible for ACPICA developers to test their code for all platforms. For example, developers may generate %pRxxx while Linux kernel treats %pR as structured resource printing and decodes variable argument as a "struct resource" pointer. This patch solves above issues by introducing the new APIs. Note that users of such APIs are not introduced in this patch. Users of acpi_os_file_vprintf()/acpi_ut_file_printf() need to invoke acpi_os_initialize(), this should be taken care by the further patches where such users are introduced. 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 'drivers/acpi/acpica/acutils.h')
-rw-r--r--drivers/acpi/acpica/acutils.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h
index e0adbc1f52ed..85871c639cc2 100644
--- a/drivers/acpi/acpica/acutils.h
+++ b/drivers/acpi/acpica/acutils.h
@@ -750,4 +750,23 @@ const struct ah_predefined_name *acpi_ah_match_predefined_name(char *nameseg);
750 750
751const struct ah_device_id *acpi_ah_match_hardware_id(char *hid); 751const struct ah_device_id *acpi_ah_match_hardware_id(char *hid);
752 752
753/*
754 * utprint - printf/vprintf output functions
755 */
756const char *acpi_ut_scan_number(const char *string, u64 *number_ptr);
757
758const char *acpi_ut_print_number(char *string, u64 number);
759
760int
761acpi_ut_vsnprintf(char *string,
762 acpi_size size, const char *format, va_list args);
763
764int acpi_ut_snprintf(char *string, acpi_size size, const char *format, ...);
765
766#ifdef ACPI_APPLICATION
767int acpi_ut_file_vprintf(ACPI_FILE file, const char *format, va_list args);
768
769int acpi_ut_file_printf(ACPI_FILE file, const char *format, ...);
770#endif
771
753#endif /* _ACUTILS_H */ 772#endif /* _ACUTILS_H */