mirror of
https://github.com/acpica/acpica/
synced 2024-12-29 05:39:57 +03:00
Debugger: Automatically pad input names with '_'
For the Find command, automatically pad names that are shorter than 4 characters with underscores, as they are within the namespace.
This commit is contained in:
parent
21361ed95b
commit
177325af3c
@ -1394,6 +1394,9 @@ ACPI_STATUS
|
||||
AcpiDbFindNameInNamespace (
|
||||
char *NameArg)
|
||||
{
|
||||
char AcpiName[5] = "____";
|
||||
char *AcpiNamePtr = AcpiName;
|
||||
|
||||
|
||||
if (ACPI_STRLEN (NameArg) > 4)
|
||||
{
|
||||
@ -1401,11 +1404,20 @@ AcpiDbFindNameInNamespace (
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
/* Walk the namespace from the root */
|
||||
/* Pad out name with underscores as necessary to create a 4-char name */
|
||||
|
||||
AcpiUtStrupr (NameArg);
|
||||
while (*NameArg)
|
||||
{
|
||||
*AcpiNamePtr = *NameArg;
|
||||
AcpiNamePtr++;
|
||||
NameArg++;
|
||||
}
|
||||
|
||||
/* Walk the namespace from the root */
|
||||
|
||||
(void) AcpiWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT, ACPI_UINT32_MAX,
|
||||
AcpiDbWalkAndMatchName, NameArg, NULL);
|
||||
AcpiDbWalkAndMatchName, AcpiName, NULL);
|
||||
|
||||
AcpiDbSetOutputDestination (ACPI_DB_CONSOLE_OUTPUT);
|
||||
return (AE_OK);
|
||||
|
Loading…
Reference in New Issue
Block a user