X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=EmbeddedPkg%2FInclude%2FLibrary%2FEfiFileLib.h;h=033375cea04011bc85e1a4edc1c768e0321eeaa3;hp=992d326997648929fcedad6a2f51ec550bae9b3c;hb=7ca9e5a4010b0e16231173dfc1918685ffc3a1dd;hpb=2ef2b01e07c02db339f34004445734a2dbdd80e1 diff --git a/EmbeddedPkg/Include/Library/EfiFileLib.h b/EmbeddedPkg/Include/Library/EfiFileLib.h index 992d326997..033375cea0 100644 --- a/EmbeddedPkg/Include/Library/EfiFileLib.h +++ b/EmbeddedPkg/Include/Library/EfiFileLib.h @@ -2,10 +2,10 @@ Library functions that perform file IO. Memory buffer, file system, and fimrware volume operations are supproted. - Copyright (c) 2007, Intel Corporation
- Portions copyright (c) 2008-2009 Apple Inc. All rights reserved.
+ Copyright (c) 2007, Intel Corporation. All rights reserved.
+ Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
- All rights reserved. This program and the accompanying materials + This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -87,12 +87,14 @@ typedef struct { EFI_FV_FILE_ATTRIBUTES FvAttributes; EFI_PHYSICAL_ADDRESS FvStart; - UINTN FvSize; + UINTN FvSize; + UINTN FvHeaderSize; EFI_FILE *FsFileHandle; // Information valid for Fs#: EFI_FILE_SYSTEM_INFO *FsInfo; EFI_FILE_INFO *FsFileInfo; - EFI_BLOCK_IO_MEDIA FsBlockIoMedia; // Information valid for Fs#: or B#: + EFI_BLOCK_IO_MEDIA *FsBlockIoMedia; // Information valid for Fs#: or B#: + EFI_BLOCK_IO_PROTOCOL *FsBlockIo; // Information valid for Fs#: or B#: UINTN DiskOffset; // Information valid for B#: @@ -116,12 +118,12 @@ typedef enum { /** Open a device named by PathName. The PathName includes a device name and - path seperated by a :. See file header for more details on the PathName + path separated by a :. See file header for more details on the PathName syntax. There is no checking to prevent a file from being opened more than one type. SectionType is only used to open an FV. Each file in an FV contains multiple - secitons and only the SectionType section is opened. + sections and only the SectionType section is opened. For any file that is opened with EfiOpen() must be closed with EfiClose(). @@ -197,7 +199,7 @@ EfiTell ( /** - Seek to the Offset locaiton in the file. LoadFile and FV device types do + Seek to the Offset location in the file. LoadFile and FV device types do not support EfiSeek(). It is not possible to grow the file size using EfiSeek(). @@ -212,7 +214,7 @@ EfiTell ( @return EFI_INVALID_PARAMETER Stream is not an Open File - @return EFI_UNSUPPORTED LoadFile and FV doe not support Seek + @return EFI_UNSUPPORTED LoadFile and FV does not support Seek @return EFI_NOT_FOUND Seek past the end of the file. @return EFI_SUCCESS Steam closed @@ -226,7 +228,7 @@ EfiSeek ( /** - Read BufferSize bytes from the current locaiton in the file. For load file + Read BufferSize bytes from the current location in the file. For load file and FV case you must read the entire file. @param Stream Open File Handle @@ -253,7 +255,7 @@ EfiRead ( Read the entire file into a buffer. This routine allocates the buffer and returns it to the user full of the read data. - This is very useful for load flie where it's hard to know how big the buffer + This is very useful for load file where it's hard to know how big the buffer must be. @param Stream Open File Handle @@ -311,5 +313,38 @@ UINTN EfiGetDeviceCounts ( IN EFI_OPEN_FILE_TYPE Type ); + + +/** + Set the Current Working Directory (CWD). If a call is made to EfiOpen () and + the path does not contain a device name, The CWD is prepended to the path. + + @param Cwd Current Working Directory to set + + + @return EFI_SUCCESS CWD is set + @return EFI_INVALID_PARAMETER Cwd is not a valid device:path + +**/ +EFI_STATUS +EfiSetCwd ( + IN CHAR8 *Cwd + ); + +/** + Set the Current Working Directory (CWD). If a call is made to EfiOpen () and + the path does not contain a device name, The CWD is prepended to the path. + + @param Cwd Current Working Directory + + + @return NULL No CWD set + @return 'other' malloc'ed buffer contains CWD. + +**/ +CHAR8 * +EfiGetCwd ( + VOID + ); #endif