summaryrefslogtreecommitdiff
path: root/ArmPkg
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2013-01-25 11:49:08 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2013-01-25 11:49:08 +0000
commit1ea3171660e62b5c5b18cae2c1a8a44d71f47b0b (patch)
tree2f37a319376539f2a9002fc133878b1b6e9225dc /ArmPkg
parent1e57a46299244793beb27e74be171d1540606999 (diff)
downloadedk2-1ea3171660e62b5c5b18cae2c1a8a44d71f47b0b.zip
edk2-1ea3171660e62b5c5b18cae2c1a8a44d71f47b0b.tar.gz
edk2-1ea3171660e62b5c5b18cae2c1a8a44d71f47b0b.tar.bz2
ArmPkg/SemiHosting: Recognise '.' directory as the root directory.
Add '.' to the list of directories recognised as the root directory of semi-hosting. This is important for EdkShell because listing files in the root directory of semi-hosting (e.g. ls fsnt0:) is tranformed in a way that uses '.' Without this patch this results in EdkShell hanging and returning an "Out of resources" error in the end. With this patch the command is immediately recognised as unsupported. Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14089 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg')
-rw-r--r--ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.c b/ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.c
index e6604ba..5c70e51 100644
--- a/ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.c
+++ b/ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.c
@@ -177,8 +177,11 @@ FileOpen (
*AsciiPtr++ = *FileName++ & 0xFF;
}
- if ((AsciiStrCmp (AsciiFileName, "\\") == 0) || (AsciiStrCmp (AsciiFileName, "/") == 0) || (AsciiStrCmp (AsciiFileName, "") == 0)) {
- // Opening '/', '\', or the NULL pathname is trying to open the root directory
+ if ((AsciiStrCmp (AsciiFileName, "\\") == 0) ||
+ (AsciiStrCmp (AsciiFileName, "/") == 0) ||
+ (AsciiStrCmp (AsciiFileName, "") == 0) ||
+ (AsciiStrCmp (AsciiFileName, ".") == 0)) {
+ // Opening '/', '\', '.', or the NULL pathname is trying to open the root directory
IsRoot = TRUE;
// Root directory node doesn't have a name.