TianoCore EDK2 master
Loading...
Searching...
No Matches
DiskImage.c File Reference
#include "HexEditor.h"
#include <Protocol/BlockIo.h>

Go to the source code of this file.

Functions

EFI_STATUS HDiskImageInit (VOID)
 
EFI_STATUS HDiskImageBackup (VOID)
 
EFI_STATUS HDiskImageCleanup (VOID)
 
EFI_STATUS HDiskImageSetDiskNameOffsetSize (IN CONST CHAR16 *Str, IN UINTN Offset, IN UINTN Size)
 
EFI_STATUS HDiskImageRead (IN CONST CHAR16 *DeviceName, IN UINTN Offset, IN UINTN Size, IN BOOLEAN Recover)
 
EFI_STATUS HDiskImageSave (IN CHAR16 *DeviceName, IN UINTN Offset, IN UINTN Size)
 

Variables

EFI_HANDLE HImageHandleBackup
 
HEFI_EDITOR_BUFFER_IMAGE HBufferImage
 
BOOLEAN HBufferImageNeedRefresh
 
BOOLEAN HBufferImageOnlyLineNeedRefresh
 
BOOLEAN HBufferImageMouseNeedRefresh
 
HEFI_EDITOR_GLOBAL_EDITOR HMainEditor
 
HEFI_EDITOR_DISK_IMAGE HDiskImage
 
HEFI_EDITOR_DISK_IMAGE HDiskImageBackupVar
 
HEFI_EDITOR_DISK_IMAGE HDiskImageConst
 

Detailed Description

Functions to deal with Disk buffer.

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

Definition in file DiskImage.c.

Function Documentation

◆ HDiskImageBackup()

EFI_STATUS HDiskImageBackup ( VOID  )

Backup function for HDiskImage. Only a few fields need to be backup. This is for making the Disk buffer refresh as few as possible.

Return values
EFI_SUCCESSThe operation was successful.
EFI_OUT_OF_RESOURCESgST->ConOut of resources.

Definition at line 63 of file DiskImage.c.

◆ HDiskImageCleanup()

EFI_STATUS HDiskImageCleanup ( VOID  )

Cleanup function for HDiskImage.

Return values
EFI_SUCCESSThe operation was successful.

Definition at line 90 of file DiskImage.c.

◆ HDiskImageInit()

EFI_STATUS HDiskImageInit ( VOID  )

Initialization function for HDiskImage.

Return values
EFI_SUCCESSThe operation was successful.
EFI_LOAD_ERRORA load error occurred.

Definition at line 41 of file DiskImage.c.

◆ HDiskImageRead()

EFI_STATUS HDiskImageRead ( IN CONST CHAR16 *  DeviceName,
IN UINTN  Offset,
IN UINTN  Size,
IN BOOLEAN  Recover 
)

Read a disk from disk into HBufferImage.

Parameters
[in]DeviceNamefilename to read.
[in]OffsetThe offset.
[in]SizeThe size.
[in]Recoverif is for recover, no information print.
Return values
EFI_SUCCESSThe operation was successful.
EFI_OUT_OF_RESOURCESA memory allocation failed.
EFI_LOAD_ERRORA load error occurred.
EFI_INVALID_PARAMETERA parameter was invalid.

Definition at line 154 of file DiskImage.c.

◆ HDiskImageSave()

EFI_STATUS HDiskImageSave ( IN CHAR16 *  DeviceName,
IN UINTN  Offset,
IN UINTN  Size 
)

Save lines in HBufferImage to disk. NOT ALLOW TO WRITE TO ANOTHER DISK!!!!!!!!!

Parameters
[in]DeviceNameThe device name.
[in]OffsetThe offset.
[in]SizeThe size.
Return values
EFI_SUCCESSThe operation was successful.
EFI_OUT_OF_RESOURCESA memory allocation failed.
EFI_LOAD_ERRORA load error occurred.
EFI_INVALID_PARAMETERA parameter was invalid.

Definition at line 329 of file DiskImage.c.

◆ HDiskImageSetDiskNameOffsetSize()

EFI_STATUS HDiskImageSetDiskNameOffsetSize ( IN CONST CHAR16 *  Str,
IN UINTN  Offset,
IN UINTN  Size 
)

Set FileName field in HFileImage.

Parameters
[in]StrFile name to set.
[in]OffsetThe offset.
[in]SizeThe size.
Return values
EFI_SUCCESSThe operation was successful.
EFI_OUT_OF_RESOURCESA memory allocation failed.

Definition at line 111 of file DiskImage.c.

Variable Documentation

◆ HBufferImage

HEFI_EDITOR_BUFFER_IMAGE HBufferImage
extern

Definition at line 27 of file BufferImage.c.

◆ HBufferImageMouseNeedRefresh

BOOLEAN HBufferImageMouseNeedRefresh
extern

Definition at line 69 of file BufferImage.c.

◆ HBufferImageNeedRefresh

BOOLEAN HBufferImageNeedRefresh
extern

Definition at line 62 of file BufferImage.c.

◆ HBufferImageOnlyLineNeedRefresh

BOOLEAN HBufferImageOnlyLineNeedRefresh
extern

Definition at line 67 of file BufferImage.c.

◆ HDiskImage

Definition at line 21 of file DiskImage.c.

◆ HDiskImageBackupVar

HEFI_EDITOR_DISK_IMAGE HDiskImageBackupVar

Definition at line 22 of file DiskImage.c.

◆ HDiskImageConst

HEFI_EDITOR_DISK_IMAGE HDiskImageConst
Initial value:
= {
0,
0,
0
}
#define NULL
Definition: Base.h:319

Definition at line 27 of file DiskImage.c.

◆ HMainEditor

HEFI_EDITOR_GLOBAL_EDITOR HMainEditor
extern

Definition at line 38 of file MainHexEditor.c.