summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/compiler/aslfiles.c
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2009-06-02 18:53:21 +0000
committerjkim <jkim@FreeBSD.org>2009-06-02 18:53:21 +0000
commit73af4710a0808de20bb2b092c916497d666c7c30 (patch)
treed651e323e75f9dcbfdcc972e9cb96f08c49ff0da /sys/contrib/dev/acpica/compiler/aslfiles.c
parentfea04a3fd158d65e9ffd20e50e38364d82b85c44 (diff)
parent02935ea0ac5fb3dfc5e452b2a18288d7e523dc1b (diff)
downloadFreeBSD-src-73af4710a0808de20bb2b092c916497d666c7c30.zip
FreeBSD-src-73af4710a0808de20bb2b092c916497d666c7c30.tar.gz
MFV: ACPICA 20090521
Diffstat (limited to 'sys/contrib/dev/acpica/compiler/aslfiles.c')
-rw-r--r--sys/contrib/dev/acpica/compiler/aslfiles.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/sys/contrib/dev/acpica/compiler/aslfiles.c b/sys/contrib/dev/acpica/compiler/aslfiles.c
index 9eace43..cb38e900 100644
--- a/sys/contrib/dev/acpica/compiler/aslfiles.c
+++ b/sys/contrib/dev/acpica/compiler/aslfiles.c
@@ -2,7 +2,6 @@
/******************************************************************************
*
* Module Name: aslfiles - file I/O suppoert
- * $Revision: 1.54 $
*
*****************************************************************************/
@@ -10,7 +9,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2007, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2009, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -115,8 +114,8 @@
*
*****************************************************************************/
-#include <contrib/dev/acpica/compiler/aslcompiler.h>
-#include <contrib/dev/acpica/acapps.h>
+#include "aslcompiler.h"
+#include "acapps.h"
#define _COMPONENT ACPI_COMPILER
ACPI_MODULE_NAME ("aslfiles")
@@ -191,7 +190,18 @@ FlOpenLocalFile (
char *Mode)
{
- strcpy (StringBuffer, Gbl_DirectoryPath);
+ StringBuffer[0] = 0;
+
+ /* Check for an absolute pathname */
+
+ if ((LocalName[0] != '/') && /* Forward slash */
+ (LocalName[0] != '\\') && /* backslash (Win) */
+ (LocalName[1] != ':')) /* Device name (Win) */
+ {
+ /* The include file path is relative, prepend the directory path */
+
+ strcat (StringBuffer, Gbl_DirectoryPath);
+ }
strcat (StringBuffer, LocalName);
DbgPrint (ASL_PARSE_OUTPUT, "FlOpenLocalFile: %s\n", StringBuffer);
@@ -369,6 +379,8 @@ FlPrintFile (
va_start (Args, Format);
Actual = vfprintf (Gbl_Files[FileId].Handle, Format, Args);
+ va_end (Args);
+
if (Actual == -1)
{
FlFileError (FileId, ASL_MSG_WRITE);
OpenPOWER on IntegriCloud