]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ArmPkg/Semihostlib: Rename semi-hosting open option
authorRonald Cron <ronald.cron@arm.com>
Mon, 27 Oct 2014 10:37:20 +0000 (10:37 +0000)
committeroliviermartin <oliviermartin@Edk2>
Mon, 27 Oct 2014 10:37:20 +0000 (10:37 +0000)
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

ArmPkg/Filesystem/SemihostFs/Arm/SemihostFs.c
ArmPkg/Include/Library/SemihostLib.h
ArmPkg/Library/RvdPeCoffExtraActionLib/RvdPeCoffExtraActionLib.c

index 3d6e72aa5a7ff5a3b7304d6ac99e0b30ef5308f4..b865143c74be6294d4af57263d4f8adca6a12565 100644 (file)
@@ -204,7 +204,7 @@ FileOpen (
 \r
     // Add the creation flag if necessary\r
     if (OpenMode & EFI_FILE_MODE_CREATE) {\r
-      SemihostMode |= SEMIHOST_FILE_MODE_CREATE;\r
+      SemihostMode |= SEMIHOST_FILE_MODE_UPDATE;\r
     }\r
 \r
     // Call the semihosting interface to open the file.\r
index 4026f5173687e6a722450b758f73337939ca9a77..4e4f43d8bd8814a69ce1bba119cb75fa183eb1fd 100644 (file)
@@ -26,7 +26,7 @@
 #define SEMIHOST_FILE_MODE_READ     (0 << 2)\r
 #define SEMIHOST_FILE_MODE_WRITE    (1 << 2)\r
 #define SEMIHOST_FILE_MODE_APPEND   (2 << 2)\r
-#define SEMIHOST_FILE_MODE_CREATE   (1 << 1)\r
+#define SEMIHOST_FILE_MODE_UPDATE   (1 << 1)\r
 #define SEMIHOST_FILE_MODE_BINARY   (1 << 0)\r
 #define SEMIHOST_FILE_MODE_ASCII    (0 << 0)\r
 \r
index dc66abd513e40289873141e133c72832511d2a75..abe3c378d78935e2f1bc34204f36f90629dced49 100644 (file)
@@ -49,7 +49,7 @@ WriteStringToFile (
   I'm currently having issues with this code crashing the debugger. Seems like it should work.\r
 \r
   UINT32        SemihostHandle;\r
-  UINT32        SemihostMode = SEMIHOST_FILE_MODE_WRITE | SEMIHOST_FILE_MODE_BINARY | SEMIHOST_FILE_MODE_CREATE;\r
+  UINT32        SemihostMode = SEMIHOST_FILE_MODE_WRITE | SEMIHOST_FILE_MODE_BINARY | SEMIHOST_FILE_MODE_UPDATE;\r
 \r
   SemihostFileOpen ("c:\rvi_symbols.inc", SemihostMode, &SemihostHandle);\r
   SemihostFileWrite (SemihostHandle, &Length, Buffer);\r