OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
VirtualVolume.c File Reference
#include <Uefi.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/BaseOverflowLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/OcVirtualFsLib.h>
#include <Guid/FileInfo.h>
#include "VirtualFsInternal.h"

Go to the source code of this file.

Functions

STATIC EFI_STATUS EFIAPI VirtualFsOpenVolume (IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *This, OUT EFI_FILE_PROTOCOL **Root)
 
EFI_STATUS CreateVirtualFs (IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *OriginalFileSystem, IN EFI_FILE_OPEN OpenCallback, OUT EFI_SIMPLE_FILE_SYSTEM_PROTOCOL **NewFileSystem)
 

Variables

STATIC VIRTUAL_FILESYSTEM_DATA ** mVirtualFileSystems
 
STATIC UINTN mVirtualFileSystemsUsed
 
STATIC UINTN mVirtualFileSystemsAllocated
 
STATIC CONST EFI_SIMPLE_FILE_SYSTEM_PROTOCOL mVirtualFileSystemProtocolTemplate
 

Detailed Description

Copyright (C) 2019, vit9696. All rights reserved.

All rights reserved.

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

THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

Definition in file VirtualVolume.c.

Function Documentation

◆ CreateVirtualFs()

EFI_STATUS CreateVirtualFs ( IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL * OriginalFileSystem,
IN EFI_FILE_OPEN OpenCallback,
OUT EFI_SIMPLE_FILE_SYSTEM_PROTOCOL ** NewFileSystem )

Create virtual file system by wrapping OriginalFileSystem into NewFileSystem with specified callback. Cacheable.

Parameters
[in]OriginalFileSystemSource file system.
[in]OpenCallbackFile open callback.
[out]NewFileSystemWrapped file system.
Returns
EFI_SUCCESS on successful wrapping.

Definition at line 71 of file VirtualVolume.c.

◆ VirtualFsOpenVolume()

STATIC EFI_STATUS EFIAPI VirtualFsOpenVolume ( IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL * This,
OUT EFI_FILE_PROTOCOL ** Root )

Definition at line 39 of file VirtualVolume.c.

Variable Documentation

◆ mVirtualFileSystemProtocolTemplate

STATIC CONST EFI_SIMPLE_FILE_SYSTEM_PROTOCOL mVirtualFileSystemProtocolTemplate
Initial value:
= {
.Revision = EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_REVISION,
.OpenVolume = VirtualFsOpenVolume
}
STATIC EFI_STATUS EFIAPI VirtualFsOpenVolume(IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *This, OUT EFI_FILE_PROTOCOL **Root)

Definition at line 65 of file VirtualVolume.c.

◆ mVirtualFileSystems

STATIC VIRTUAL_FILESYSTEM_DATA** mVirtualFileSystems

Definition at line 32 of file VirtualVolume.c.

◆ mVirtualFileSystemsAllocated

STATIC UINTN mVirtualFileSystemsAllocated

Definition at line 34 of file VirtualVolume.c.

◆ mVirtualFileSystemsUsed

STATIC UINTN mVirtualFileSystemsUsed

Definition at line 33 of file VirtualVolume.c.