TianoCore EDK2 master
Loading...
Searching...
No Matches
EdbSupportFile.c File Reference
#include "Edb.h"

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI ReadFileFromVol (IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *Vol, IN CHAR16 *FileName, OUT UINTN *BufferSize, OUT VOID **Buffer)
 
EFI_STATUS EFIAPI ReadFileToBuffer (IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate, IN CHAR16 *FileName, OUT UINTN *BufferSize, OUT VOID **Buffer, IN BOOLEAN ScanFs)
 
CHAR16 *EFIAPI GetFileNameUnderDir (IN EFI_DEBUGGER_PRIVATE_DATA *DebuggerPrivate, IN CHAR16 *DirName, IN CHAR16 *FileName, IN OUT UINTN *Index)
 

Detailed Description

Copyright (c) 2007, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file EdbSupportFile.c.

Function Documentation

◆ GetFileNameUnderDir()

CHAR16 *EFIAPI GetFileNameUnderDir ( IN EFI_DEBUGGER_PRIVATE_DATA DebuggerPrivate,
IN CHAR16 *  DirName,
IN CHAR16 *  FileName,
IN OUT UINTN Index 
)

Get file name under this dir with index

Parameters
DebuggerPrivate- EBC Debugger private data structure
DirName- The dir to be read.
FileName- The file name pattern under this dir
Index- The file index under this dir
Returns
File Name which match the pattern and index.

Definition at line 265 of file EdbSupportFile.c.

◆ ReadFileFromVol()

EFI_STATUS EFIAPI ReadFileFromVol ( IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL Vol,
IN CHAR16 *  FileName,
OUT UINTN BufferSize,
OUT VOID **  Buffer 
)

Read a file.

Parameters
Vol- File System Volume
FileName- The file to be read.
BufferSize- The file buffer size
Buffer- The file buffer
Return values
EFI_SUCCESS- read file successfully
EFI_NOT_FOUND- file not found

Definition at line 25 of file EdbSupportFile.c.

◆ ReadFileToBuffer()

EFI_STATUS EFIAPI ReadFileToBuffer ( IN EFI_DEBUGGER_PRIVATE_DATA DebuggerPrivate,
IN CHAR16 *  FileName,
OUT UINTN BufferSize,
OUT VOID **  Buffer,
IN BOOLEAN  ScanFs 
)

Read a file. If ScanFs is FLASE, it will use DebuggerPrivate->Vol as default Fs. If ScanFs is TRUE, it will scan all FS and check the file. If there is only one file match the name, it will be read. If there is more than one file match the name, it will return Error.

Parameters
DebuggerPrivate- EBC Debugger private data structure
FileName- The file to be read.
BufferSize- The file buffer size
Buffer- The file buffer
ScanFs- Need Scan all FS
Return values
EFI_SUCCESS- read file successfully
EFI_NOT_FOUND- file not found
EFI_NO_MAPPING- there is duplicated files found

Definition at line 143 of file EdbSupportFile.c.