aboutsummaryrefslogtreecommitdiff
path: root/compiler/asltree.c
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/asltree.c')
-rw-r--r--compiler/asltree.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/compiler/asltree.c b/compiler/asltree.c
index 3874ff6e23e4..80f26be2bed2 100644
--- a/compiler/asltree.c
+++ b/compiler/asltree.c
@@ -45,6 +45,7 @@
#include "aslcompiler.h"
#include "aslcompiler.y.h"
+#include "acapps.h"
#include <time.h>
#define _COMPONENT ACPI_COMPILER
@@ -425,6 +426,8 @@ TrCreateConstantLeafNode (
time_t CurrentTime;
char *StaticTimeString;
char *TimeString;
+ char *Path;
+ char *Filename;
switch (ParseOpcode)
@@ -434,7 +437,7 @@ TrCreateConstantLeafNode (
Op->Asl.Value.Integer = Op->Asl.LineNumber;
break;
- case PARSEOP___FILE__:
+ case PARSEOP___PATH__:
Op = TrAllocateNode (PARSEOP_STRING_LITERAL);
/* Op.Asl.Filename contains the full pathname to the file */
@@ -442,7 +445,17 @@ TrCreateConstantLeafNode (
Op->Asl.Value.String = Op->Asl.Filename;
break;
- case PARSEOP___DATE__:
+ case PARSEOP___FILE__:
+ Op = TrAllocateNode (PARSEOP_STRING_LITERAL);
+
+ /* Get the simple filename from the full path */
+
+ FlSplitInputPathname (Op->Asl.Filename, &Path, &Filename);
+ ACPI_FREE (Path);
+ Op->Asl.Value.String = Filename;
+ break;
+
+ case PARSEOP___DATE__:
Op = TrAllocateNode (PARSEOP_STRING_LITERAL);
/* Get a copy of the current time */