diff options
Diffstat (limited to 'sys/contrib/dev/acpica/compiler/asloperands.c')
-rw-r--r-- | sys/contrib/dev/acpica/compiler/asloperands.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/contrib/dev/acpica/compiler/asloperands.c b/sys/contrib/dev/acpica/compiler/asloperands.c index 7567eb7..07bf88f 100644 --- a/sys/contrib/dev/acpica/compiler/asloperands.c +++ b/sys/contrib/dev/acpica/compiler/asloperands.c @@ -971,12 +971,15 @@ OpnDoDefinitionBlock ( Gbl_TableId = AcpiOsAllocate (Length + 1); ACPI_STRCPY (Gbl_TableId, Child->Asl.Value.String); + /* + * Convert anything non-alphanumeric to an underscore. This + * allows us to use the TableID to generate unique C symbols. + */ for (i = 0; i < Length; i++) { - if (Gbl_TableId[i] == ' ') + if (!isalnum ((int) Gbl_TableId[i])) { - Gbl_TableId[i] = 0; - break; + Gbl_TableId[i] = '_'; } } } |