OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
ext4read.c File Reference
#include <Ext4Dxe.h>
#include <string.h>
#include <UserFile.h>
#include <UserGlobalVar.h>
#include <UserMemory.h>
#include <UserUnicodeCollation.h>

Go to the source code of this file.

Functions

void PrintHex (const void *data, size_t size)
 
EFI_STATUS Ext4InitialiseUnicodeCollation (EFI_HANDLE DriverHandle)
 
INTN Ext4StrCmpInsensitive (IN CHAR16 *Str1, IN CHAR16 *Str2)
 
EFI_STATUS EFIAPI WrapInstallMultipleProtocolInterfaces (IN OUT EFI_HANDLE *Handle,...)
 
VOID FreeAll (IN CHAR16 *FileName, IN EXT4_PARTITION *Part)
 
EFI_STATUS EFIAPI UserReadDisk (IN EFI_DISK_IO_PROTOCOL *This, IN UINT32 MediaId, IN UINT64 Offset, IN UINTN BufferSize, OUT VOID *Buffer)
 
int ENTRY_POINT (int argc, char **argv)
 

Variables

STATIC FILE * mImageFp
 
STATIC UINT64 mImageSize
 
STATIC EFI_SIMPLE_FILE_SYSTEM_PROTOCOL * mEfiSfsInterface
 

Detailed Description

Copyright (c) 2023, Savva Mitrofanov. All rights reserved. SPDX-License-Identifier: BSD-3-Clause

Definition in file ext4read.c.

Function Documentation

◆ ENTRY_POINT()

int ENTRY_POINT ( int argc,
char ** argv )

Definition at line 198 of file ext4read.c.

◆ Ext4InitialiseUnicodeCollation()

EFI_STATUS Ext4InitialiseUnicodeCollation ( EFI_HANDLE DriverHandle)

Initialises Unicode collation, which is needed for case-insensitive string comparisons within the driver (a good example of an application of this is filename comparison).

Parameters
[in]DriverHandleHandle to the driver image.
Return values
EFI_SUCCESSUnicode collation was successfully initialised.
!EFI_SUCCESSFailure.

Definition at line 66 of file ext4read.c.

◆ Ext4StrCmpInsensitive()

INTN Ext4StrCmpInsensitive ( IN CHAR16 * Str1,
IN CHAR16 * Str2 )

Does a case-insensitive string comparison. Refer to EFI_UNICODE_COLLATION_PROTOCOL's StriColl for more details.

Parameters
[in]Str1Pointer to a null terminated string.
[in]Str2Pointer to a null terminated string.
Return values
0Str1 is equivalent to Str2.
>0Str1 is lexically greater than Str2.
<0Str1 is lexically less than Str2.

Definition at line 86 of file ext4read.c.

◆ FreeAll()

VOID FreeAll ( IN CHAR16 * FileName,
IN EXT4_PARTITION * Part )

Definition at line 136 of file ext4read.c.

◆ PrintHex()

void PrintHex ( const void * data,
size_t size )

Definition at line 19 of file ext4read.c.

◆ UserReadDisk()

EFI_STATUS EFIAPI UserReadDisk ( IN EFI_DISK_IO_PROTOCOL * This,
IN UINT32 MediaId,
IN UINT64 Offset,
IN UINTN BufferSize,
OUT VOID * Buffer )

Definition at line 166 of file ext4read.c.

◆ WrapInstallMultipleProtocolInterfaces()

EFI_STATUS EFIAPI WrapInstallMultipleProtocolInterfaces ( IN OUT EFI_HANDLE * Handle,
... )

Definition at line 96 of file ext4read.c.

Variable Documentation

◆ mEfiSfsInterface

STATIC EFI_SIMPLE_FILE_SYSTEM_PROTOCOL* mEfiSfsInterface

Definition at line 16 of file ext4read.c.

◆ mImageFp

STATIC FILE* mImageFp

Definition at line 14 of file ext4read.c.

◆ mImageSize

STATIC UINT64 mImageSize

Definition at line 15 of file ext4read.c.