summaryrefslogtreecommitdiff
path: root/ArmPkg/Include
diff options
context:
space:
mode:
authorRonald Cron <ronald.cron@arm.com>2014-10-27 10:38:18 +0000
committeroliviermartin <oliviermartin@Edk2>2014-10-27 10:38:18 +0000
commit5521b5cc73e21957023b634cb7f75e415bba0225 (patch)
treeaf76c114b00289672a156402ce120ed89a4b2feb /ArmPkg/Include
parentc20f8ec6619d6bd6717364e12211f03f5f499676 (diff)
downloadedk2-platforms-5521b5cc73e21957023b634cb7f75e415bba0225.tar.xz
ArmPkg/SemihostLib: Add library functions
Add library functions to rename a file and get a temporary name for a file through the semi-hosting interface. 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@16238 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg/Include')
-rw-r--r--ArmPkg/Include/Library/SemihostLib.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/ArmPkg/Include/Library/SemihostLib.h b/ArmPkg/Include/Library/SemihostLib.h
index 4e4f43d8bd..4a91593e31 100644
--- a/ArmPkg/Include/Library/SemihostLib.h
+++ b/ArmPkg/Include/Library/SemihostLib.h
@@ -73,11 +73,48 @@ SemihostFileLength (
OUT UINTN *Length
);
+/**
+ Get a temporary name for a file from the host running the debug agent.
+
+ @param[out] Buffer Pointer to the buffer where the temporary name has to
+ be stored
+ @param[in] Identifier File name identifier (integer in the range 0 to 255)
+ @param[in] Length Length of the buffer to store the temporary name
+
+ @retval RETURN_SUCCESS Temporary name returned
+ @retval RETURN_INVALID_PARAMETER Invalid buffer address
+ @retval RETURN_ABORTED Temporary name not returned
+
+**/
+RETURN_STATUS
+SemihostFileTmpName(
+ OUT VOID *Buffer,
+ IN UINT8 Identifier,
+ IN UINTN Length
+ );
+
RETURN_STATUS
SemihostFileRemove (
IN CHAR8 *FileName
);
+/**
+ Rename a specified file.
+
+ @param[in] FileName Name of the file to rename.
+ @param[in] NewFileName The new name of the file.
+
+ @retval RETURN_SUCCESS File Renamed
+ @retval RETURN_INVALID_PARAMETER Either the current or the new name is not specified
+ @retval RETURN_ABORTED Rename failed
+
+**/
+RETURN_STATUS
+SemihostFileRename(
+ IN CHAR8 *FileName,
+ IN CHAR8 *NewFileName
+ );
+
CHAR8
SemihostReadCharacter (
VOID