summaryrefslogtreecommitdiff
path: root/source/compiler/aslutils.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2017-08-31 17:21:06 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2017-08-31 17:21:06 +0000
commit0810e26699e1b40b9384eca2137be6155de0a5ba (patch)
tree2f9f57dbc41ae321c10f66c7d7985e328edbdec8 /source/compiler/aslutils.c
parent834d4c5613e9c57c0b9fba46fa717fd7fb9d5891 (diff)
Notes
Diffstat (limited to 'source/compiler/aslutils.c')
-rw-r--r--source/compiler/aslutils.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/source/compiler/aslutils.c b/source/compiler/aslutils.c
index c5ff42c0156c..8b46d38bb532 100644
--- a/source/compiler/aslutils.c
+++ b/source/compiler/aslutils.c
@@ -1004,11 +1004,11 @@ UtAttachNamepathToOwner (
*
* FUNCTION: UtDoConstant
*
- * PARAMETERS: String - Hexadecimal or decimal string
+ * PARAMETERS: String - Hex/Decimal/Octal
*
* RETURN: Converted Integer
*
- * DESCRIPTION: Convert a string to an integer, with error checking.
+ * DESCRIPTION: Convert a string to an integer, with overflow/error checking.
*
******************************************************************************/
@@ -1017,17 +1017,20 @@ UtDoConstant (
char *String)
{
ACPI_STATUS Status;
- UINT64 Converted;
+ UINT64 ConvertedInteger;
char ErrBuf[64];
- Status = AcpiUtStrtoul64 (String, ACPI_STRTOUL_64BIT, &Converted);
+ Status = AcpiUtStrtoul64 (String, &ConvertedInteger);
if (ACPI_FAILURE (Status))
{
- sprintf (ErrBuf, "%s %s\n", "Conversion error:",
+ sprintf (ErrBuf, "While creating 64-bit constant: %s\n",
AcpiFormatException (Status));
- AslCompilererror (ErrBuf);
+
+ AslCommonError (ASL_ERROR, ASL_MSG_SYNTAX, Gbl_CurrentLineNumber,
+ Gbl_LogicalLineNumber, Gbl_CurrentLineOffset,
+ Gbl_CurrentColumn, Gbl_Files[ASL_FILE_INPUT].Filename, ErrBuf);
}
- return (Converted);
+ return (ConvertedInteger);
}