Commit cef9aaa7 authored by Lv Zheng's avatar Lv Zheng Committed by Rafael J. Wysocki

ACPICA: Fix a couple issues with the local printf module.

ACPICA commit 6853da4c0a99b49d62d6c58d22956cd6ff5759a9

The following commit has fixed local printf issue in width.prec:

  Commit: 3589b8b8
  Subject: ACPICA: Utilities: Fix local printf issue.

But this commit only resets width/precision/quialifier to fix the reported
issue and doesn't fix other states issues. So now we still can see breakage
in format types and integer bases.

This patch resets format type/base states for local printf to fix this
issue. Lv Zheng.

Linux kernel is not affected by this patch as acpi_ut_vsnprintf() hasn't
been enabled in the kernel.

Link: https://github.com/acpica/acpica/commit/6853da4cSigned-off-by: default avatarLv Zheng <lv.zheng@intel.com>
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent a50edd4b
...@@ -357,11 +357,11 @@ int ...@@ -357,11 +357,11 @@ int
acpi_ut_vsnprintf(char *string, acpi_ut_vsnprintf(char *string,
acpi_size size, const char *format, va_list args) acpi_size size, const char *format, va_list args)
{ {
u8 base = 10; u8 base;
u8 type = 0; u8 type;
s32 width = -1; s32 width;
s32 precision = -1; s32 precision;
char qualifier = 0; char qualifier;
u64 number; u64 number;
char *pos; char *pos;
char *end; char *end;
...@@ -380,6 +380,9 @@ acpi_ut_vsnprintf(char *string, ...@@ -380,6 +380,9 @@ acpi_ut_vsnprintf(char *string,
continue; continue;
} }
type = 0;
base = 10;
/* Process sign */ /* Process sign */
do { do {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment