From patchwork Wed Apr 18 11:41:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 153481 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 76D1FB6FBB for ; Wed, 18 Apr 2012 21:41:26 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SKTGH-0000Yz-6P for incoming@patchwork.ozlabs.org; Wed, 18 Apr 2012 11:41:25 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1SKTG3-0000YQ-ER for fwts-devel@lists.ubuntu.com; Wed, 18 Apr 2012 11:41:11 +0000 Received: from cpc19-craw6-2-0-cust5.croy.cable.virginmedia.com ([77.102.228.6] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1SKTG3-0000AJ-Ar for fwts-devel@lists.ubuntu.com; Wed, 18 Apr 2012 11:41:11 +0000 From: Colin King To: fwts-devel@lists.ubuntu.com Subject: [PATCH 1/2] lib: fwts_acpi_method: gather all object names rather than just method names Date: Wed, 18 Apr 2012 12:41:08 +0100 Message-Id: <1334749269-31162-2-git-send-email-colin.king@canonical.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1334749269-31162-1-git-send-email-colin.king@canonical.com> References: <1334749269-31162-1-git-send-email-colin.king@canonical.com> X-BeenThere: fwts-devel@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Firmware Test Suite Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: fwts-devel-bounces@lists.ubuntu.com Errors-To: fwts-devel-bounces@lists.ubuntu.com From: Colin Ian King Signed-off-by: Colin Ian King Acked-by: Alex Hung --- src/lib/src/fwts_acpi_method.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/lib/src/fwts_acpi_method.c b/src/lib/src/fwts_acpi_method.c index 885c8c8..7a55ccd 100644 --- a/src/lib/src/fwts_acpi_method.c +++ b/src/lib/src/fwts_acpi_method.c @@ -110,7 +110,7 @@ static acpi_eval_error errors[] = { }; -static fwts_list *fwts_method_names; +static fwts_list *fwts_object_names; static bool fwts_method_initialized = false; @@ -123,7 +123,8 @@ int fwts_method_init(fwts_framework *fw) if (fwts_acpica_init(fw) != FWTS_OK) return FWTS_ERROR; - fwts_method_names = fwts_acpica_get_object_names(8); + /* Gather all object names */ + fwts_object_names = fwts_acpica_get_object_names(0); fwts_method_initialized = true; return FWTS_OK; @@ -138,8 +139,8 @@ int fwts_method_deinit(fwts_framework *fw) int ret = FWTS_ERROR; if (fwts_method_initialized) { - fwts_list_free(fwts_method_names, free); - fwts_method_names = NULL; + fwts_list_free(fwts_object_names, free); + fwts_object_names = NULL; ret = fwts_acpica_deinit(); fwts_method_initialized = false; @@ -155,7 +156,7 @@ int fwts_method_deinit(fwts_framework *fw) */ fwts_list *fwts_method_get_names(void) { - return fwts_method_names; + return fwts_object_names; } /* @@ -167,7 +168,7 @@ char *fwts_method_exists(char *name) size_t name_len = strlen(name); fwts_list_link *item; - fwts_list_foreach(item, fwts_method_names) { + fwts_list_foreach(item, fwts_object_names) { char *method_name = fwts_list_data(char*, item); size_t len = strlen(method_name);