]> git.proxmox.com Git - mirror_edk2.git/blame - ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/DiskImage.h
ShellPkg: Clean up source files
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / HexEdit / DiskImage.h
CommitLineData
632820d1 1/** @file\r
ba0014b9 2 Defines DiskImage - the view of the file that is visible at any point,\r
632820d1 3 as well as the event handlers for editing the file\r
ba0014b9
LG
4\r
5 Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved. <BR>\r
632820d1 6 This program and the accompanying materials\r
7 are licensed and made available under the terms and conditions of the BSD License\r
8 which accompanies this distribution. The full text of the license may be found at\r
9 http://opensource.org/licenses/bsd-license.php\r
10\r
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13\r
14**/\r
15\r
16#ifndef _LIB_DISK_IMAGE_H_\r
17#define _LIB_DISK_IMAGE_H_\r
18\r
19#include "HexEditor.h"\r
20\r
a1d4bfcc 21/**\r
22 Initialization function for HDiskImage.\r
ba0014b9 23\r
a1d4bfcc 24 @retval EFI_SUCCESS The operation was successful.\r
25 @retval EFI_LOAD_ERROR A load error occured.\r
26**/\r
632820d1 27EFI_STATUS\r
28HDiskImageInit (\r
29 VOID\r
30 );\r
a1d4bfcc 31\r
32/**\r
33 Cleanup function for HDiskImage.\r
34\r
35 @retval EFI_SUCCESS The operation was successful.\r
36**/\r
632820d1 37EFI_STATUS\r
38HDiskImageCleanup (\r
39 VOID\r
40 );\r
a1d4bfcc 41\r
42/**\r
ba0014b9 43 Backup function for HDiskImage. Only a few fields need to be backup.\r
a1d4bfcc 44 This is for making the Disk buffer refresh as few as possible.\r
45\r
46 @retval EFI_SUCCESS The operation was successful.\r
47 @retval EFI_OUT_OF_RESOURCES gST->ConOut of resources.\r
48**/\r
632820d1 49EFI_STATUS\r
50HDiskImageBackup (\r
51 VOID\r
52 );\r
53\r
a1d4bfcc 54/**\r
55 Read a disk from disk into HBufferImage.\r
56\r
57 @param[in] DeviceName filename to read.\r
58 @param[in] Offset The offset.\r
59 @param[in] Size The size.\r
60 @param[in] Recover if is for recover, no information print.\r
61\r
62 @retval EFI_SUCCESS The operation was successful.\r
63 @retval EFI_OUT_OF_RESOURCES A memory allocation failed.\r
64 @retval EFI_LOAD_ERROR A load error occured.\r
ba0014b9 65 @retval EFI_INVALID_PARAMETER A parameter was invalid.\r
a1d4bfcc 66**/\r
632820d1 67EFI_STATUS\r
68HDiskImageRead (\r
a1d4bfcc 69 IN CONST CHAR16 *DeviceName,\r
70 IN UINTN Offset,\r
71 IN UINTN Size,\r
72 IN BOOLEAN Recover\r
632820d1 73 );\r
a1d4bfcc 74\r
75/**\r
76 Save lines in HBufferImage to disk.\r
77 NOT ALLOW TO WRITE TO ANOTHER DISK!!!!!!!!!\r
78\r
79 @param[in] DeviceName The device name.\r
80 @param[in] Offset The offset.\r
81 @param[in] Size The size.\r
82\r
83 @retval EFI_SUCCESS The operation was successful.\r
84 @retval EFI_OUT_OF_RESOURCES A memory allocation failed.\r
85 @retval EFI_LOAD_ERROR A load error occured.\r
ba0014b9 86 @retval EFI_INVALID_PARAMETER A parameter was invalid.\r
a1d4bfcc 87**/\r
632820d1 88EFI_STATUS\r
89HDiskImageSave (\r
a1d4bfcc 90 IN CHAR16 *DeviceName,\r
91 IN UINTN Offset,\r
92 IN UINTN Size\r
632820d1 93 );\r
94\r
95#endif\r