-/*++\r
+/** @file\r
+ Routines dealing with file open.\r
\r
Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials are licensed and made available\r
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
\r
+**/\r
\r
-Module Name:\r
-\r
- open.c\r
+#include "Fat.h"\r
\r
-Abstract:\r
+/**\r
\r
- Routines dealing with file open\r
+ Create an Open instance for the existing OFile.\r
+ The IFile of the newly opened file is passed out.\r
\r
-Revision History\r
+ @param OFile - The file that serves as a starting reference point.\r
+ @param PtrIFile - The newly generated IFile instance.\r
\r
---*/\r
-\r
-#include "Fat.h"\r
+ @retval EFI_OUT_OF_RESOURCES - Can not allocate the memory for the IFile\r
+ @retval EFI_SUCCESS - Create the new IFile for the OFile successfully\r
\r
+**/\r
EFI_STATUS\r
FatAllocateIFile (\r
IN FAT_OFILE *OFile,\r
OUT FAT_IFILE **PtrIFile\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
- Create an Open instance for the existing OFile.\r
- The IFile of the newly opened file is passed out.\r
-\r
-Arguments:\r
-\r
- OFile - The file that serves as a starting reference point.\r
- PtrIFile - The newly generated IFile instance.\r
-\r
-Returns:\r
-\r
- EFI_OUT_OF_RESOURCES - Can not allocate the memory for the IFile\r
- EFI_SUCCESS - Create the new IFile for the OFile successfully\r
-\r
---*/\r
{\r
FAT_IFILE *IFile;\r
\r
return EFI_SUCCESS;\r
}\r
\r
-EFI_STATUS\r
-FatOFileOpen (\r
- IN FAT_OFILE *OFile,\r
- OUT FAT_IFILE **NewIFile,\r
- IN CHAR16 *FileName,\r
- IN UINT64 OpenMode,\r
- IN UINT8 Attributes\r
- )\r
-/*++\r
-\r
-Routine Description:\r
+/**\r
\r
Open a file for a file name relative to an existing OFile.\r
The IFile of the newly opened file is passed out.\r
\r
-Arguments:\r
-\r
- OFile - The file that serves as a starting reference point.\r
- NewIFile - The newly generated IFile instance.\r
- FileName - The file name relative to the OFile.\r
- OpenMode - Open mode.\r
- Attributes - Attributes to set if the file is created.\r
+ @param OFile - The file that serves as a starting reference point.\r
+ @param NewIFile - The newly generated IFile instance.\r
+ @param FileName - The file name relative to the OFile.\r
+ @param OpenMode - Open mode.\r
+ @param Attributes - Attributes to set if the file is created.\r
\r
-Returns:\r
\r
- EFI_SUCCESS - Open the file successfully.\r
- EFI_INVALID_PARAMETER - The open mode is conflict with the attributes\r
+ @retval EFI_SUCCESS - Open the file successfully.\r
+ @retval EFI_INVALID_PARAMETER - The open mode is conflict with the attributes\r
or the file name is not valid.\r
- EFI_NOT_FOUND - Conficts between dir intention and attribute.\r
- EFI_WRITE_PROTECTED - Can't open for write if the volume is read only.\r
- EFI_ACCESS_DENIED - If the file's attribute is read only, and the\r
+ @retval EFI_NOT_FOUND - Conficts between dir intention and attribute.\r
+ @retval EFI_WRITE_PROTECTED - Can't open for write if the volume is read only.\r
+ @retval EFI_ACCESS_DENIED - If the file's attribute is read only, and the\r
open is for read-write fail it.\r
- EFI_OUT_OF_RESOURCES - Can not allocate the memory.\r
+ @retval EFI_OUT_OF_RESOURCES - Can not allocate the memory.\r
\r
---*/\r
+**/\r
+EFI_STATUS\r
+FatOFileOpen (\r
+ IN FAT_OFILE *OFile,\r
+ OUT FAT_IFILE **NewIFile,\r
+ IN CHAR16 *FileName,\r
+ IN UINT64 OpenMode,\r
+ IN UINT8 Attributes\r
+ )\r
{\r
FAT_VOLUME *Volume;\r
EFI_STATUS Status;\r
return FatOFileFlush (OFile);\r
}\r
\r
+/**\r
+\r
+ Implements OpenEx() of Simple File System Protocol.\r
+\r
+ @param FHand - File handle of the file serves as a starting reference point.\r
+ @param NewHandle - Handle of the file that is newly opened.\r
+ @param FileName - File name relative to FHand.\r
+ @param OpenMode - Open mode.\r
+ @param Attributes - Attributes to set if the file is created.\r
+ @param Token - A pointer to the token associated with the transaction.:\r
+\r
+ @retval EFI_INVALID_PARAMETER - The FileName is NULL or the file string is empty.\r
+ The OpenMode is not supported.\r
+ The Attributes is not the valid attributes.\r
+ @retval EFI_OUT_OF_RESOURCES - Can not allocate the memory for file string.\r
+ @retval EFI_SUCCESS - Open the file successfully.\r
+ @return Others - The status of open file.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
FatOpenEx (\r
IN UINT64 Attributes,\r
IN OUT EFI_FILE_IO_TOKEN *Token\r
)\r
-/*++\r
-Routine Description:\r
-\r
- Implements OpenEx() of Simple File System Protocol.\r
-\r
-Arguments:\r
-\r
- FHand - File handle of the file serves as a starting reference point.\r
- NewHandle - Handle of the file that is newly opened.\r
- FileName - File name relative to FHand.\r
- OpenMode - Open mode.\r
- Attributes - Attributes to set if the file is created.\r
- Token - A pointer to the token associated with the transaction.\r
-\r
-Returns:\r
-\r
- EFI_INVALID_PARAMETER - The FileName is NULL or the file string is empty.\r
- The OpenMode is not supported.\r
- The Attributes is not the valid attributes.\r
- EFI_OUT_OF_RESOURCES - Can not allocate the memory for file string.\r
- EFI_SUCCESS - Open the file successfully.\r
- Others - The status of open file.\r
-\r
---*/\r
{\r
FAT_IFILE *IFile;\r
FAT_IFILE *NewIFile;\r
return Status;\r
}\r
\r
+/**\r
+\r
+ Implements Open() of Simple File System Protocol.\r
+\r
+\r
+ @param FHand - File handle of the file serves as a starting reference point.\r
+ @param NewHandle - Handle of the file that is newly opened.\r
+ @param FileName - File name relative to FHand.\r
+ @param OpenMode - Open mode.\r
+ @param Attributes - Attributes to set if the file is created.\r
+\r
+ @retval EFI_INVALID_PARAMETER - The FileName is NULL or the file string is empty.\r
+ The OpenMode is not supported.\r
+ The Attributes is not the valid attributes.\r
+ @retval EFI_OUT_OF_RESOURCES - Can not allocate the memory for file string.\r
+ @retval EFI_SUCCESS - Open the file successfully.\r
+ @return Others - The status of open file.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
FatOpen (\r
IN UINT64 OpenMode,\r
IN UINT64 Attributes\r
)\r
-/*++\r
-Routine Description:\r
-\r
- Implements Open() of Simple File System Protocol.\r
-\r
-Arguments:\r
-\r
- FHand - File handle of the file serves as a starting reference point.\r
- NewHandle - Handle of the file that is newly opened.\r
- FileName - File name relative to FHand.\r
- OpenMode - Open mode.\r
- Attributes - Attributes to set if the file is created.\r
-\r
-Returns:\r
-\r
- EFI_INVALID_PARAMETER - The FileName is NULL or the file string is empty.\r
- The OpenMode is not supported.\r
- The Attributes is not the valid attributes.\r
- EFI_OUT_OF_RESOURCES - Can not allocate the memory for file string.\r
- EFI_SUCCESS - Open the file successfully.\r
- Others - The status of open file.\r
-\r
---*/\r
{\r
return FatOpenEx (FHand, NewHandle, FileName, OpenMode, Attributes, NULL);\r
}\r