diff options
Diffstat (limited to 'source/components/executer')
| -rw-r--r-- | source/components/executer/exconcat.c | 2 | ||||
| -rw-r--r-- | source/components/executer/exconvrt.c | 26 | ||||
| -rw-r--r-- | source/components/executer/exmisc.c | 2 | ||||
| -rw-r--r-- | source/components/executer/exresop.c | 2 |
4 files changed, 18 insertions, 14 deletions
diff --git a/source/components/executer/exconcat.c b/source/components/executer/exconcat.c index e5f077dbd989..67d592cd5495 100644 --- a/source/components/executer/exconcat.c +++ b/source/components/executer/exconcat.c @@ -274,7 +274,7 @@ AcpiExDoConcatenate ( case ACPI_TYPE_INTEGER: Status = AcpiExConvertToInteger (LocalOperand1, &TempOperand1, - ACPI_STRTOUL_BASE16); + ACPI_IMPLICIT_CONVERSION); break; case ACPI_TYPE_BUFFER: diff --git a/source/components/executer/exconvrt.c b/source/components/executer/exconvrt.c index 8c0ae75c2a6d..8577a45e14ee 100644 --- a/source/components/executer/exconvrt.c +++ b/source/components/executer/exconvrt.c @@ -172,10 +172,10 @@ AcpiExConvertToAscii ( * * FUNCTION: AcpiExConvertToInteger * - * PARAMETERS: ObjDesc - Object to be converted. Must be an - * Integer, Buffer, or String - * ResultDesc - Where the new Integer object is returned - * Flags - Used for string conversion + * PARAMETERS: ObjDesc - Object to be converted. Must be an + * Integer, Buffer, or String + * ResultDesc - Where the new Integer object is returned + * ImplicitConversion - Used for string conversion * * RETURN: Status * @@ -187,14 +187,13 @@ ACPI_STATUS AcpiExConvertToInteger ( ACPI_OPERAND_OBJECT *ObjDesc, ACPI_OPERAND_OBJECT **ResultDesc, - UINT32 Flags) + UINT32 ImplicitConversion) { ACPI_OPERAND_OBJECT *ReturnDesc; UINT8 *Pointer; UINT64 Result; UINT32 i; UINT32 Count; - ACPI_STATUS Status; ACPI_FUNCTION_TRACE_PTR (ExConvertToInteger, ObjDesc); @@ -244,12 +243,17 @@ AcpiExConvertToInteger ( * hexadecimal as per the ACPI specification. The only exception (as * of ACPI 3.0) is that the ToInteger() operator allows both decimal * and hexadecimal strings (hex prefixed with "0x"). + * + * Explicit conversion is used only by ToInteger. + * All other string-to-integer conversions are implicit conversions. */ - Status = AcpiUtStrtoul64 (ACPI_CAST_PTR (char, Pointer), - (AcpiGbl_IntegerByteWidth | Flags), &Result); - if (ACPI_FAILURE (Status)) + if (ImplicitConversion) + { + Result = AcpiUtImplicitStrtoul64 (ACPI_CAST_PTR (char, Pointer)); + } + else { - return_ACPI_STATUS (Status); + Result = AcpiUtExplicitStrtoul64 (ACPI_CAST_PTR (char, Pointer)); } break; @@ -792,7 +796,7 @@ AcpiExConvertToTargetType ( * a Buffer or a String to an Integer if necessary. */ Status = AcpiExConvertToInteger (SourceDesc, ResultDesc, - ACPI_STRTOUL_BASE16); + ACPI_IMPLICIT_CONVERSION); break; case ACPI_TYPE_STRING: diff --git a/source/components/executer/exmisc.c b/source/components/executer/exmisc.c index dfa4421ac773..8e92f7a04f0f 100644 --- a/source/components/executer/exmisc.c +++ b/source/components/executer/exmisc.c @@ -472,7 +472,7 @@ AcpiExDoLogicalOp ( case ACPI_TYPE_INTEGER: Status = AcpiExConvertToInteger (Operand1, &LocalOperand1, - ACPI_STRTOUL_BASE16); + ACPI_IMPLICIT_CONVERSION); break; case ACPI_TYPE_STRING: diff --git a/source/components/executer/exresop.c b/source/components/executer/exresop.c index 0cd216ceb255..e33608c2f712 100644 --- a/source/components/executer/exresop.c +++ b/source/components/executer/exresop.c @@ -541,7 +541,7 @@ AcpiExResolveOperands ( * Known as "Implicit Source Operand Conversion" */ Status = AcpiExConvertToInteger (ObjDesc, StackPtr, - ACPI_STRTOUL_BASE16); + ACPI_IMPLICIT_CONVERSION); if (ACPI_FAILURE (Status)) { if (Status == AE_TYPE) |
