diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2017-08-31 17:21:06 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2017-08-31 17:21:06 +0000 |
commit | 0810e26699e1b40b9384eca2137be6155de0a5ba (patch) | |
tree | 2f9f57dbc41ae321c10f66c7d7985e328edbdec8 /source/compiler/dtutils.c | |
parent | 834d4c5613e9c57c0b9fba46fa717fd7fb9d5891 (diff) |
Notes
Diffstat (limited to 'source/compiler/dtutils.c')
-rw-r--r-- | source/compiler/dtutils.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/source/compiler/dtutils.c b/source/compiler/dtutils.c index 6edcf637c3fd..c6c89eaa7d20 100644 --- a/source/compiler/dtutils.c +++ b/source/compiler/dtutils.c @@ -303,6 +303,38 @@ DtFatal ( } +/******************************************************************************* + * + * FUNCTION: DtDoConstant + * + * PARAMETERS: String - Only hex constants are supported, + * regardless of whether the 0x prefix + * is used + * + * RETURN: Converted Integer + * + * DESCRIPTION: Convert a string to an integer, with overflow/error checking. + * + ******************************************************************************/ + +UINT64 +DtDoConstant ( + char *String) +{ + UINT64 ConvertedInteger; + + + /* + * TBD: The ImplicitStrtoul64 function does not report overflow + * conditions. The input string is simply truncated. If it is + * desired to report overflow to the table compiler, this should + * somehow be added here. Note: integers that are prefixed with 0x + * or not are both hex integers. + */ + ConvertedInteger = AcpiUtImplicitStrtoul64 (String); + return (ConvertedInteger); +} + /****************************************************************************** * * FUNCTION: DtGetFieldValue |