diff mbox

acpi: dbg2: won't find obj when the namespace device path (lp: #1486893)

Message ID 1440060213-27890-1-git-send-email-ivan.hu@canonical.com
State Rejected
Headers show

Commit Message

Ivan Hu Aug. 20, 2015, 8:43 a.m. UTC
The spec. tells that for NamespaceString, if no namespace device exists,
NamespaceString[] must contain a period “.”, serching obj with a period will
get the false alarm below:
 dbg2: DBG2 Device '_____.____' not found in ACPI object name space.

Skip finding object with dbg2_obj_find function, if no namespace device path
exists.

Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
---
 src/acpi/dbg2/dbg2.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Ivan Hu Aug. 20, 2015, 8:54 a.m. UTC | #1
typo of the title, will fix that and send again

On 2015年08月20日 16:43, Ivan Hu wrote:
> The spec. tells that for NamespaceString, if no namespace device exists,
> NamespaceString[] must contain a period “.”, serching obj with a period will
> get the false alarm below:
>   dbg2: DBG2 Device '_____.____' not found in ACPI object name space.
>
> Skip finding object with dbg2_obj_find function, if no namespace device path
> exists.
>
> Signed-off-by: Ivan Hu <ivan.hu@canonical.com>
> ---
>   src/acpi/dbg2/dbg2.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/acpi/dbg2/dbg2.c b/src/acpi/dbg2/dbg2.c
> index f5b28c1..2a43ba3 100644
> --- a/src/acpi/dbg2/dbg2.c
> +++ b/src/acpi/dbg2/dbg2.c
> @@ -320,7 +320,8 @@ static int dbg2_test1(fwts_framework *fw)
>   			char *str = (char *)table->data + offset + info->namespace_offset;
>   			dbg2_check_namespace_string(fw, str, info->namespace_length, &passed);
>   			fwts_log_info_verbatum(fw, "  Namespace String:         '%s'", str);
> -			dbg2_obj_find(fw, str, &ok);
> +			if (strcmp(str, "."))
> +				dbg2_obj_find(fw, str, &ok);
>   		}
>   		passed &= ok;
>   
> @@ -356,6 +357,7 @@ static int dbg2_test1(fwts_framework *fw)
>   				fwts_log_info_verbatum(fw, "    Address                 0x%16.16" PRIx64, gas->address);
>   				fwts_log_nl(fw);
>   
> +
>   				if (*addrsize != sizeof(fwts_acpi_gas)) {
>   					passed = false;
>   					fwts_failed(fw, LOG_LEVEL_HIGH,
diff mbox

Patch

diff --git a/src/acpi/dbg2/dbg2.c b/src/acpi/dbg2/dbg2.c
index f5b28c1..2a43ba3 100644
--- a/src/acpi/dbg2/dbg2.c
+++ b/src/acpi/dbg2/dbg2.c
@@ -320,7 +320,8 @@  static int dbg2_test1(fwts_framework *fw)
 			char *str = (char *)table->data + offset + info->namespace_offset;
 			dbg2_check_namespace_string(fw, str, info->namespace_length, &passed);
 			fwts_log_info_verbatum(fw, "  Namespace String:         '%s'", str);
-			dbg2_obj_find(fw, str, &ok);
+			if (strcmp(str, "."))
+				dbg2_obj_find(fw, str, &ok);
 		}
 		passed &= ok;
 
@@ -356,6 +357,7 @@  static int dbg2_test1(fwts_framework *fw)
 				fwts_log_info_verbatum(fw, "    Address                 0x%16.16" PRIx64, gas->address);
 				fwts_log_nl(fw);
 
+
 				if (*addrsize != sizeof(fwts_acpi_gas)) {
 					passed = false;
 					fwts_failed(fw, LOG_LEVEL_HIGH,