From patchwork Wed Jul 25 03:41:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Len Brown X-Patchwork-Id: 1235241 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 75F70DFFC1 for ; Wed, 25 Jul 2012 03:54:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932773Ab2GYDmS (ORCPT ); Tue, 24 Jul 2012 23:42:18 -0400 Received: from mail-qa0-f53.google.com ([209.85.216.53]:52413 "EHLO mail-qa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932754Ab2GYDmQ (ORCPT ); Tue, 24 Jul 2012 23:42:16 -0400 Received: by mail-qa0-f53.google.com with SMTP id s11so247432qaa.19 for ; Tue, 24 Jul 2012 20:42:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:in-reply-to:references:reply-to:organization; bh=PHH4x4XIYfEE3xmYE35MLGw73mZc0mm0RSFl+n8FYOo=; b=QLZl/VddaaSzFhpxdMBgVbTtQ0d67F2lxkrJQbfwkqqyBBZWqDeM7ecwg6tWaX7yO8 pvJLnb3fB0kwOeOxAGw3tvvOnK4Rn8s6hh3xaV4eTvusIuzbfSZBlstJGZxlKrQzqwJQ AGpMItNjUcGX0AA7bRCGJyoQ/VcJHdB+1918uOygka0cM/sx3ujPgCxM4tpjwxqwHxOi SsuhQ8qGNSQpUlsvLP4vMG3n2CDj7daWZKV14PGZjhm78ofZseok1QaULLMJLgYd3R3R oPddcehkkzkDguSuFIHT8PtqJfDcvNaEMPJo2Iw90GXQaVoOFYlG2UbRxp5WjxEfDyWn UymA== Received: by 10.229.136.83 with SMTP id q19mr10456788qct.47.1343187735555; Tue, 24 Jul 2012 20:42:15 -0700 (PDT) Received: from x980.localdomain6 (h184-61-125-197.altnnh.dsl.dynamic.tds.net. [184.61.125.197]) by mx.google.com with ESMTPS id et6sm15489186qab.8.2012.07.24.20.42.13 (version=SSLv3 cipher=OTHER); Tue, 24 Jul 2012 20:42:14 -0700 (PDT) From: Len Brown To: linux-acpi@vger.kernel.org, linux-pm@lists.linux-foundation.org Cc: linux-kernel@vger.kernel.org, Bob Moore , Lin Ming , Len Brown Subject: [PATCH 08/52] ACPICA: iASL: Improved pathname support Date: Tue, 24 Jul 2012 23:41:04 -0400 Message-Id: X-Mailer: git-send-email 1.7.12.rc0 In-Reply-To: <1343187708-19532-1-git-send-email-lenb@kernel.org> References: <1343187708-19532-1-git-send-email-lenb@kernel.org> In-Reply-To: <6af1c4fc5227af65092ebc848989693562bfa3e8.1343187617.git.len.brown@intel.com> References: <6af1c4fc5227af65092ebc848989693562bfa3e8.1343187617.git.len.brown@intel.com> Reply-To: Len Brown Organization: Intel Open Source Technology Center Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org From: Bob Moore For include files, merge the prefix pathname with the file pathname. Convert backslashes in all pathnames to forward slashes, for readability. Include file pathname changes affect both #include and Include() type operators. Signed-off-by: Bob Moore Signed-off-by: Lin Ming Signed-off-by: Len Brown --- drivers/acpi/acpica/acutils.h | 2 ++ drivers/acpi/acpica/utmisc.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h index 925ccf2..5035327 100644 --- a/drivers/acpi/acpica/acutils.h +++ b/drivers/acpi/acpica/acutils.h @@ -460,6 +460,8 @@ acpi_ut_short_divide(u64 in_dividend, /* * utmisc */ +void ut_convert_backslashes(char *pathname); + const char *acpi_ut_validate_exception(acpi_status status); u8 acpi_ut_is_pci_root_bridge(char *id); diff --git a/drivers/acpi/acpica/utmisc.c b/drivers/acpi/acpica/utmisc.c index 86f19db..e86f897 100644 --- a/drivers/acpi/acpica/utmisc.c +++ b/drivers/acpi/acpica/utmisc.c @@ -52,6 +52,34 @@ ACPI_MODULE_NAME("utmisc") /******************************************************************************* * + * FUNCTION: ut_convert_backslashes + * + * PARAMETERS: Pathname - File pathname string to be converted + * + * RETURN: Modifies the input Pathname + * + * DESCRIPTION: Convert all backslashes (0x5C) to forward slashes (0x2F) within + * the entire input file pathname string. + * + ******************************************************************************/ +void ut_convert_backslashes(char *pathname) +{ + + if (!pathname) { + return; + } + + while (*pathname) { + if (*pathname == '\\') { + *pathname = '/'; + } + + pathname++; + } +} + +/******************************************************************************* + * * FUNCTION: acpi_ut_validate_exception * * PARAMETERS: Status - The acpi_status code to be formatted @@ -63,6 +91,7 @@ ACPI_MODULE_NAME("utmisc") * an ASCII string. * ******************************************************************************/ + const char *acpi_ut_validate_exception(acpi_status status) { u32 sub_status;