]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/FileSystem/BootMonFs/BootMonFsApi.h
ArmPlatformPkg/BootMonFs: Fix error codes returned by Open() and Read()
[mirror_edk2.git] / ArmPlatformPkg / FileSystem / BootMonFs / BootMonFsApi.h
index 9c1daa523bd3c64aed214330c89d0ba1ef8ecece..affc510931f464603dde0a2bc775568e8215c9d9 100644 (file)
@@ -91,6 +91,28 @@ BootMonFsCloseFile (
   IN EFI_FILE_PROTOCOL  *This\r
   );\r
 \r
+/**\r
+  Open a file on the boot monitor file system.\r
+\r
+  @param[in]   This        The EFI_FILE_PROTOCOL parent handle.\r
+  @param[out]  NewHandle   A pointer to the location to return the opened\r
+                           handle for the new file.\r
+  @param[in]   FileName    The Null-terminated string of the name of the file\r
+                           to be opened.\r
+  @param[in]   OpenMode    The mode to open the file : Read or Read/Write or\r
+                           Read/Write/Create\r
+  @param[in]   Attributes  Attributes of the file in case of a file creation\r
+\r
+  @retval  EFI_SUCCESS            The file was open.\r
+  @retval  EFI_NOT_FOUND          The specified file could not be found or the specified\r
+                                  directory in which to create a file could not be found.\r
+  @retval  EFI_DEVICE_ERROR       The device reported an error.\r
+  @retval  EFI_WRITE_PROTECTED    Attempt to create a directory. This is not possible\r
+                                  with the BootMon file system.\r
+  @retval  EFI_OUT_OF_RESOURCES   Not enough resources were available to open the file.\r
+  @retval  EFI_INVALID_PARAMETER  At least one of the parameters is invalid.\r
+\r
+**/\r
 EFIAPI\r
 EFI_STATUS\r
 BootMonFsOpenFile (\r
@@ -101,7 +123,23 @@ BootMonFsOpenFile (
   IN UINT64             Attributes\r
   );\r
 \r
+/**\r
+  Read data from an open file.\r
 \r
+  @param[in]      This        A pointer to the EFI_FILE_PROTOCOL instance that\r
+                              is the file handle to read data from.\r
+  @param[in out]  BufferSize  On input, the size of the Buffer. On output, the\r
+                              amount of data returned in Buffer. In both cases,\r
+                              the size is measured in bytes.\r
+  @param[out]     Buffer      The buffer into which the data is read.\r
+\r
+  @retval  EFI_SUCCESS            The data was read.\r
+  @retval  EFI_DEVICE_ERROR       On entry, the current file position is\r
+                                  beyond the end of the file, or the device\r
+                                  reported an error while performing the read\r
+                                  operation.\r
+  @retval  EFI_INVALID_PARAMETER  At least one of the parameters is invalid.\r
+**/\r
 EFIAPI\r
 EFI_STATUS\r
 BootMonFsReadFile (\r