summaryrefslogtreecommitdiff
path: root/ArmPkg
diff options
context:
space:
mode:
authorRonald Cron <ronald.cron@arm.com>2014-10-27 10:37:20 +0000
committeroliviermartin <oliviermartin@Edk2>2014-10-27 10:37:20 +0000
commitc20f8ec6619d6bd6717364e12211f03f5f499676 (patch)
tree54eebf7183b081021c2e2009982f679f9c7710ab /ArmPkg
parenta537c71726627da40d786b1644d68cc7c3654d31 (diff)
downloadedk2-platforms-c20f8ec6619d6bd6717364e12211f03f5f499676.tar.xz
ArmPkg/Semihostlib: Rename semi-hosting open option
Change mnemonic SEMIHOST_FILE_MODE_CREATE with mnemonic SEMIHOST_FILE_MODE_UPDATE. The bit referred to by this mnemonic is for the semi-hosting open mode code the equivalent of the + in the ISO C fopen mode terminology. This allows to select the so called update mode for which both read and write are allowed on the open file. The mnemonic SEMIHOST_FILE_MODE_UPDATE is more in line with the ISO C fopen mode terminology. A description of the ISO C fopen modes can be found here : http://pubs.opengroup.org/onlinepubs/009695399/functions/fopen.html. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ronald Cron <ronald.cron@arm.com> Reviewed-By: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16237 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg')
-rw-r--r--ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.c2
-rw-r--r--ArmPkg/Include/Library/SemihostLib.h2
-rw-r--r--ArmPkg/Library/RvdPeCoffExtraActionLib/RvdPeCoffExtraActionLib.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.c b/ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.c
index 3d6e72aa5a..b865143c74 100644
--- a/ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.c
+++ b/ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.c
@@ -204,7 +204,7 @@ FileOpen (
// Add the creation flag if necessary
if (OpenMode & EFI_FILE_MODE_CREATE) {
- SemihostMode |= SEMIHOST_FILE_MODE_CREATE;
+ SemihostMode |= SEMIHOST_FILE_MODE_UPDATE;
}
// Call the semihosting interface to open the file.
diff --git a/ArmPkg/Include/Library/SemihostLib.h b/ArmPkg/Include/Library/SemihostLib.h
index 4026f51736..4e4f43d8bd 100644
--- a/ArmPkg/Include/Library/SemihostLib.h
+++ b/ArmPkg/Include/Library/SemihostLib.h
@@ -26,7 +26,7 @@
#define SEMIHOST_FILE_MODE_READ (0 << 2)
#define SEMIHOST_FILE_MODE_WRITE (1 << 2)
#define SEMIHOST_FILE_MODE_APPEND (2 << 2)
-#define SEMIHOST_FILE_MODE_CREATE (1 << 1)
+#define SEMIHOST_FILE_MODE_UPDATE (1 << 1)
#define SEMIHOST_FILE_MODE_BINARY (1 << 0)
#define SEMIHOST_FILE_MODE_ASCII (0 << 0)
diff --git a/ArmPkg/Library/RvdPeCoffExtraActionLib/RvdPeCoffExtraActionLib.c b/ArmPkg/Library/RvdPeCoffExtraActionLib/RvdPeCoffExtraActionLib.c
index dc66abd513..abe3c378d7 100644
--- a/ArmPkg/Library/RvdPeCoffExtraActionLib/RvdPeCoffExtraActionLib.c
+++ b/ArmPkg/Library/RvdPeCoffExtraActionLib/RvdPeCoffExtraActionLib.c
@@ -49,7 +49,7 @@ WriteStringToFile (
I'm currently having issues with this code crashing the debugger. Seems like it should work.
UINT32 SemihostHandle;
- UINT32 SemihostMode = SEMIHOST_FILE_MODE_WRITE | SEMIHOST_FILE_MODE_BINARY | SEMIHOST_FILE_MODE_CREATE;
+ UINT32 SemihostMode = SEMIHOST_FILE_MODE_WRITE | SEMIHOST_FILE_MODE_BINARY | SEMIHOST_FILE_MODE_UPDATE;
SemihostFileOpen ("c:\rvi_symbols.inc", SemihostMode, &SemihostHandle);
SemihostFileWrite (SemihostHandle, &Length, Buffer);