summaryrefslogtreecommitdiff
path: root/ArmPkg
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2013-03-12 00:58:37 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2013-03-12 00:58:37 +0000
commit8fa3caf2bc544591e8e1eae984dad24872a45efe (patch)
tree11dc0b45f7418a811a5f36d13325bcad68757cc5 /ArmPkg
parentb1cab81feccfa52d76dc1f191cd329755f2a644a (diff)
downloadedk2-platforms-8fa3caf2bc544591e8e1eae984dad24872a45efe.tar.xz
ArmPkg/SemihostLib: Removed leading separator in FileName in SemihostFileOpen()
EFI Shell adds '\\' in front of the filename. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14188 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg')
-rw-r--r--ArmPkg/Library/SemihostLib/SemihostLib.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ArmPkg/Library/SemihostLib/SemihostLib.c b/ArmPkg/Library/SemihostLib/SemihostLib.c
index 5a36515b77..87c0379d6b 100644
--- a/ArmPkg/Library/SemihostLib/SemihostLib.c
+++ b/ArmPkg/Library/SemihostLib/SemihostLib.c
@@ -40,6 +40,11 @@ SemihostFileOpen (
return RETURN_INVALID_PARAMETER;
}
+ // Remove any leading separator (e.g.: '\'). EFI Shell adds one.
+ if (*FileName == '\\') {
+ FileName++;
+ }
+
OpenBlock.FileName = FileName;
OpenBlock.Mode = Mode;
OpenBlock.NameLength = AsciiStrLen(FileName);