diff options
author | Bob Moore <robert.moore@intel.com> | 2020-03-27 15:21:09 -0700 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2020-03-30 14:52:33 +0200 |
commit | 9a1ae80412dcaa67a29eecf19de44f32b5f1c357 (patch) | |
tree | 21512bf1f54d248eb29d5aa41e34122ca64d598b /drivers/acpi/acpica/dbinput.c | |
parent | 88055d8f4a715d52b9b981f717e9e51cf4668d5d (diff) | |
download | lwn-9a1ae80412dcaa67a29eecf19de44f32b5f1c357.tar.gz lwn-9a1ae80412dcaa67a29eecf19de44f32b5f1c357.zip |
ACPICA: Fixes for acpiExec namespace init file
This is the result of squashing the following ACPICA commit ID's:
6803997e5b4f3635cea6610b51ff69e29d251de3
f31cdf8bfda22fe265c1a176d0e33d311c82a7f7
This change fixes several problems with the support for the
acpi_exec namespace init file (-fi option). Specifically, it
fixes AE_ALREADY_EXISTS errors, as well as various seg faults.
Link: https://github.com/acpica/acpica/commit/f31cdf8b
Link: https://github.com/acpica/acpica/commit/6803997e
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Erik Kaneda <erik.kaneda@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/dbinput.c')
-rw-r--r-- | drivers/acpi/acpica/dbinput.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/acpi/acpica/dbinput.c b/drivers/acpi/acpica/dbinput.c index aa71f65395d2..ee6a1b77af3f 100644 --- a/drivers/acpi/acpica/dbinput.c +++ b/drivers/acpi/acpica/dbinput.c @@ -468,16 +468,14 @@ char *acpi_db_get_next_token(char *string, return (NULL); } - /* Remove any spaces at the beginning */ + /* Remove any spaces at the beginning, ignore blank lines */ - if (*string == ' ') { - while (*string && (*string == ' ')) { - string++; - } + while (*string && isspace(*string)) { + string++; + } - if (!(*string)) { - return (NULL); - } + if (!(*string)) { + return (NULL); } switch (*string) { @@ -570,7 +568,7 @@ char *acpi_db_get_next_token(char *string, /* Find end of token */ - while (*string && (*string != ' ')) { + while (*string && !isspace(*string)) { string++; } break; |