(based on FatPkg commit
9f5ac6912eb71e9037fe05b8bd6bf02b5cee5ac6)
[jordan.l.justen@intel.com: Use script to relicense to 2-clause BSD]
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Mark Doran <mark.doran@intel.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
-Copyright (c) 2005, Intel Corporation\r
+Copyright (c) 2005 - 2009, Intel Corporation\r
All rights reserved. This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
distribution. The full text of the license may be found at\r
All rights reserved. This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
distribution. The full text of the license may be found at\r
//\r
// Filesystem interface functions\r
//\r
//\r
// Filesystem interface functions\r
//\r
-EFI_FILE FatFileInterface = {\r
+EFI_FILE_PROTOCOL FatFileInterface = {\r
EFI_FILE_PROTOCOL_REVISION,\r
FatOpen,\r
FatClose,\r
EFI_FILE_PROTOCOL_REVISION,\r
FatOpen,\r
FatClose,\r
-Copyright (c) 2005, Intel Corporation\r
+Copyright (c) 2005 - 2009, Intel Corporation\r
All rights reserved. This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
distribution. The full text of the license may be found at\r
All rights reserved. This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
distribution. The full text of the license may be found at\r
EFI_STATUS\r
EFIAPI\r
FatDelete (\r
EFI_STATUS\r
EFIAPI\r
FatDelete (\r
+ IN EFI_FILE_PROTOCOL *FHand\r
-Copyright (c) 2005 - 2007, Intel Corporation\r
+Copyright (c) 2005 - 2009, Intel Corporation\r
All rights reserved. This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
distribution. The full text of the license may be found at\r
All rights reserved. This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
distribution. The full text of the license may be found at\r
\r
typedef struct {\r
UINTN Signature;\r
\r
typedef struct {\r
UINTN Signature;\r
+ EFI_FILE_PROTOCOL Handle;\r
UINT64 Position;\r
BOOLEAN ReadOnly;\r
struct _FAT_OFILE *OFile;\r
UINT64 Position;\r
BOOLEAN ReadOnly;\r
struct _FAT_OFILE *OFile;\r
EFI_STATUS\r
EFIAPI\r
FatOpen (\r
EFI_STATUS\r
EFIAPI\r
FatOpen (\r
- IN EFI_FILE *FHand,\r
- OUT EFI_FILE **NewHandle,\r
+ IN EFI_FILE_PROTOCOL *FHand,\r
+ OUT EFI_FILE_PROTOCOL **NewHandle,\r
IN CHAR16 *FileName,\r
IN UINT64 OpenMode,\r
IN UINT64 Attributes\r
IN CHAR16 *FileName,\r
IN UINT64 OpenMode,\r
IN UINT64 Attributes\r
EFI_STATUS\r
EFIAPI\r
FatGetPosition (\r
EFI_STATUS\r
EFIAPI\r
FatGetPosition (\r
+ IN EFI_FILE_PROTOCOL *FHand,\r
OUT UINT64 *Position\r
)\r
/*++\r
OUT UINT64 *Position\r
)\r
/*++\r
EFI_STATUS\r
EFIAPI\r
FatGetInfo (\r
EFI_STATUS\r
EFIAPI\r
FatGetInfo (\r
- IN EFI_FILE *FHand,\r
- IN EFI_GUID *Type,\r
- IN OUT UINTN *BufferSize,\r
- OUT VOID *Buffer\r
+ IN EFI_FILE_PROTOCOL *FHand,\r
+ IN EFI_GUID *Type,\r
+ IN OUT UINTN *BufferSize,\r
+ OUT VOID *Buffer\r
EFI_STATUS\r
EFIAPI\r
FatSetInfo (\r
EFI_STATUS\r
EFIAPI\r
FatSetInfo (\r
+ IN EFI_FILE_PROTOCOL *FHand,\r
IN EFI_GUID *Type,\r
IN UINTN BufferSize,\r
IN VOID *Buffer\r
IN EFI_GUID *Type,\r
IN UINTN BufferSize,\r
IN VOID *Buffer\r
EFI_STATUS\r
EFIAPI\r
FatFlush (\r
EFI_STATUS\r
EFIAPI\r
FatFlush (\r
+ IN EFI_FILE_PROTOCOL *FHand\r
EFI_STATUS\r
EFIAPI\r
FatClose (\r
EFI_STATUS\r
EFIAPI\r
FatClose (\r
+ IN EFI_FILE_PROTOCOL *FHand\r
EFI_STATUS\r
EFIAPI\r
FatDelete (\r
EFI_STATUS\r
EFIAPI\r
FatDelete (\r
+ IN EFI_FILE_PROTOCOL *FHand\r
EFI_STATUS\r
EFIAPI\r
FatSetPosition (\r
EFI_STATUS\r
EFIAPI\r
FatSetPosition (\r
+ IN EFI_FILE_PROTOCOL *FHand,\r
IN UINT64 Position\r
)\r
/*++\r
IN UINT64 Position\r
)\r
/*++\r
EFI_STATUS\r
EFIAPI\r
FatRead (\r
EFI_STATUS\r
EFIAPI\r
FatRead (\r
- IN EFI_FILE *FHand,\r
- IN OUT UINTN *BufferSize,\r
- OUT VOID *Buffer\r
+ IN EFI_FILE_PROTOCOL *FHand,\r
+ IN OUT UINTN *BufferSize,\r
+ OUT VOID *Buffer\r
EFI_STATUS\r
EFIAPI\r
FatWrite (\r
EFI_STATUS\r
EFIAPI\r
FatWrite (\r
- IN EFI_FILE *FHand,\r
- IN OUT UINTN *BufferSize,\r
- IN VOID *Buffer\r
+ IN EFI_FILE_PROTOCOL *FHand,\r
+ IN OUT UINTN *BufferSize,\r
+ IN VOID *Buffer\r
EFIAPI\r
FatOpenVolume (\r
IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *This,\r
EFIAPI\r
FatOpenVolume (\r
IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *This,\r
+ OUT EFI_FILE_PROTOCOL **File\r
extern EFI_COMPONENT_NAME_PROTOCOL gFatComponentName;\r
extern EFI_COMPONENT_NAME2_PROTOCOL gFatComponentName2;\r
extern EFI_LOCK FatFsLock;\r
extern EFI_COMPONENT_NAME_PROTOCOL gFatComponentName;\r
extern EFI_COMPONENT_NAME2_PROTOCOL gFatComponentName2;\r
extern EFI_LOCK FatFsLock;\r
-extern EFI_FILE FatFileInterface;\r
+extern EFI_FILE_PROTOCOL FatFileInterface;\r
-Copyright (c) 2005 - 2007, Intel Corporation\r
+Copyright (c) 2005 - 2009, Intel Corporation\r
All rights reserved. This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
distribution. The full text of the license may be found at\r
All rights reserved. This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
distribution. The full text of the license may be found at\r
EFI_STATUS\r
EFIAPI\r
FatFlush (\r
EFI_STATUS\r
EFIAPI\r
FatFlush (\r
+ IN EFI_FILE_PROTOCOL *FHand\r
EFI_STATUS\r
EFIAPI\r
FatClose (\r
EFI_STATUS\r
EFIAPI\r
FatClose (\r
+ IN EFI_FILE_PROTOCOL *FHand\r
-Copyright (c) 2005 - 2007, Intel Corporation\r
+Copyright (c) 2005 - 2009, Intel Corporation\r
All rights reserved. This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
distribution. The full text of the license may be found at\r
All rights reserved. This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
distribution. The full text of the license may be found at\r
\r
EFI_STATUS\r
FatSetOrGetInfo (\r
\r
EFI_STATUS\r
FatSetOrGetInfo (\r
- IN BOOLEAN IsSet,\r
- IN EFI_FILE *FHand,\r
- IN EFI_GUID *Type,\r
- IN OUT UINTN *BufferSize,\r
- IN OUT VOID *Buffer\r
+ IN BOOLEAN IsSet,\r
+ IN EFI_FILE_PROTOCOL *FHand,\r
+ IN EFI_GUID *Type,\r
+ IN OUT UINTN *BufferSize,\r
+ IN OUT VOID *Buffer\r
\r
EFI_STATUS\r
FatSetOrGetInfo (\r
\r
EFI_STATUS\r
FatSetOrGetInfo (\r
- IN BOOLEAN IsSet,\r
- IN EFI_FILE *FHand,\r
- IN EFI_GUID *Type,\r
- IN OUT UINTN *BufferSize,\r
- IN OUT VOID *Buffer\r
+ IN BOOLEAN IsSet,\r
+ IN EFI_FILE_PROTOCOL *FHand,\r
+ IN EFI_GUID *Type,\r
+ IN OUT UINTN *BufferSize,\r
+ IN OUT VOID *Buffer\r
EFI_STATUS\r
EFIAPI\r
FatGetInfo (\r
EFI_STATUS\r
EFIAPI\r
FatGetInfo (\r
- IN EFI_FILE *FHand,\r
- IN EFI_GUID *Type,\r
- IN OUT UINTN *BufferSize,\r
- OUT VOID *Buffer\r
+ IN EFI_FILE_PROTOCOL *FHand,\r
+ IN EFI_GUID *Type,\r
+ IN OUT UINTN *BufferSize,\r
+ OUT VOID *Buffer\r
EFI_STATUS\r
EFIAPI\r
FatSetInfo (\r
EFI_STATUS\r
EFIAPI\r
FatSetInfo (\r
- IN EFI_FILE *FHand,\r
- IN EFI_GUID *Type,\r
- IN UINTN BufferSize,\r
- IN VOID *Buffer\r
+ IN EFI_FILE_PROTOCOL *FHand,\r
+ IN EFI_GUID *Type,\r
+ IN UINTN BufferSize,\r
+ IN VOID *Buffer\r
-Copyright (c) 2005 - 2007, Intel Corporation\r
+Copyright (c) 2005 - 2009, Intel Corporation\r
All rights reserved. This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
distribution. The full text of the license may be found at\r
All rights reserved. This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
distribution. The full text of the license may be found at\r
\r
IFile->Signature = FAT_IFILE_SIGNATURE;\r
\r
\r
IFile->Signature = FAT_IFILE_SIGNATURE;\r
\r
- CopyMem (&(IFile->Handle), &FatFileInterface, sizeof (EFI_FILE));\r
+ CopyMem (&(IFile->Handle), &FatFileInterface, sizeof (EFI_FILE_PROTOCOL));\r
\r
IFile->OFile = OFile;\r
InsertTailList (&OFile->Opens, &IFile->Link);\r
\r
IFile->OFile = OFile;\r
InsertTailList (&OFile->Opens, &IFile->Link);\r
EFI_STATUS\r
EFIAPI\r
FatOpen (\r
EFI_STATUS\r
EFIAPI\r
FatOpen (\r
- IN EFI_FILE *FHand,\r
- OUT EFI_FILE **NewHandle,\r
- IN CHAR16 *FileName,\r
- IN UINT64 OpenMode,\r
- IN UINT64 Attributes\r
+ IN EFI_FILE_PROTOCOL *FHand,\r
+ OUT EFI_FILE_PROTOCOL **NewHandle,\r
+ IN CHAR16 *FileName,\r
+ IN UINT64 OpenMode,\r
+ IN UINT64 Attributes\r
)\r
/*++\r
Routine Description:\r
)\r
/*++\r
Routine Description:\r
-Copyright (c) 2005, Intel Corporation\r
+Copyright (c) 2005 - 2009, Intel Corporation\r
All rights reserved. This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
distribution. The full text of the license may be found at\r
All rights reserved. This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
distribution. The full text of the license may be found at\r
EFIAPI\r
FatOpenVolume (\r
IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *This,\r
EFIAPI\r
FatOpenVolume (\r
IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *This,\r
+ OUT EFI_FILE_PROTOCOL **File\r
-Copyright (c) 2005, Intel Corporation\r
+Copyright (c) 2005 - 2009, Intel Corporation\r
All rights reserved. This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
distribution. The full text of the license may be found at\r
All rights reserved. This program and the accompanying materials are licensed and made available\r
under the terms and conditions of the BSD License which accompanies this\r
distribution. The full text of the license may be found at\r
EFI_STATUS\r
EFIAPI\r
FatGetPosition (\r
EFI_STATUS\r
EFIAPI\r
FatGetPosition (\r
+ IN EFI_FILE_PROTOCOL *FHand,\r
OUT UINT64 *Position\r
)\r
/*++\r
OUT UINT64 *Position\r
)\r
/*++\r
EFI_STATUS\r
EFIAPI\r
FatSetPosition (\r
EFI_STATUS\r
EFIAPI\r
FatSetPosition (\r
- IN EFI_FILE *FHand,\r
- IN UINT64 Position\r
+ IN EFI_FILE_PROTOCOL *FHand,\r
+ IN UINT64 Position\r
\r
EFI_STATUS\r
FatIFileAccess (\r
\r
EFI_STATUS\r
FatIFileAccess (\r
+ IN EFI_FILE_PROTOCOL *FHand,\r
IN IO_MODE IoMode,\r
IN OUT UINTN *BufferSize,\r
IN OUT VOID *Buffer\r
IN IO_MODE IoMode,\r
IN OUT UINTN *BufferSize,\r
IN OUT VOID *Buffer\r
EFI_STATUS\r
EFIAPI\r
FatRead (\r
EFI_STATUS\r
EFIAPI\r
FatRead (\r
- IN EFI_FILE *FHand,\r
- IN OUT UINTN *BufferSize,\r
- OUT VOID *Buffer\r
+ IN EFI_FILE_PROTOCOL *FHand,\r
+ IN OUT UINTN *BufferSize,\r
+ OUT VOID *Buffer\r
EFI_STATUS\r
EFIAPI\r
FatWrite (\r
EFI_STATUS\r
EFIAPI\r
FatWrite (\r
- IN EFI_FILE *FHand,\r
- IN OUT UINTN *BufferSize,\r
- IN VOID *Buffer\r
+ IN EFI_FILE_PROTOCOL *FHand,\r
+ IN OUT UINTN *BufferSize,\r
+ IN VOID *Buffer\r