]> git.proxmox.com Git - mirror_edk2.git/blob - ShellPkg/Library/UefiShellDebug1CommandsLib/HexEdit/DiskImage.h
ShellPkg: Apply uncrustify changes
[mirror_edk2.git] / ShellPkg / Library / UefiShellDebug1CommandsLib / HexEdit / DiskImage.h
1 /** @file
2 Defines DiskImage - the view of the file that is visible at any point,
3 as well as the event handlers for editing the file
4
5 Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved. <BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9
10 #ifndef _LIB_DISK_IMAGE_H_
11 #define _LIB_DISK_IMAGE_H_
12
13 #include "HexEditor.h"
14
15 /**
16 Initialization function for HDiskImage.
17
18 @retval EFI_SUCCESS The operation was successful.
19 @retval EFI_LOAD_ERROR A load error occurred.
20 **/
21 EFI_STATUS
22 HDiskImageInit (
23 VOID
24 );
25
26 /**
27 Cleanup function for HDiskImage.
28
29 @retval EFI_SUCCESS The operation was successful.
30 **/
31 EFI_STATUS
32 HDiskImageCleanup (
33 VOID
34 );
35
36 /**
37 Backup function for HDiskImage. Only a few fields need to be backup.
38 This is for making the Disk buffer refresh as few as possible.
39
40 @retval EFI_SUCCESS The operation was successful.
41 @retval EFI_OUT_OF_RESOURCES gST->ConOut of resources.
42 **/
43 EFI_STATUS
44 HDiskImageBackup (
45 VOID
46 );
47
48 /**
49 Read a disk from disk into HBufferImage.
50
51 @param[in] DeviceName filename to read.
52 @param[in] Offset The offset.
53 @param[in] Size The size.
54 @param[in] Recover if is for recover, no information print.
55
56 @retval EFI_SUCCESS The operation was successful.
57 @retval EFI_OUT_OF_RESOURCES A memory allocation failed.
58 @retval EFI_LOAD_ERROR A load error occurred.
59 @retval EFI_INVALID_PARAMETER A parameter was invalid.
60 **/
61 EFI_STATUS
62 HDiskImageRead (
63 IN CONST CHAR16 *DeviceName,
64 IN UINTN Offset,
65 IN UINTN Size,
66 IN BOOLEAN Recover
67 );
68
69 /**
70 Save lines in HBufferImage to disk.
71 NOT ALLOW TO WRITE TO ANOTHER DISK!!!!!!!!!
72
73 @param[in] DeviceName The device name.
74 @param[in] Offset The offset.
75 @param[in] Size The size.
76
77 @retval EFI_SUCCESS The operation was successful.
78 @retval EFI_OUT_OF_RESOURCES A memory allocation failed.
79 @retval EFI_LOAD_ERROR A load error occurred.
80 @retval EFI_INVALID_PARAMETER A parameter was invalid.
81 **/
82 EFI_STATUS
83 HDiskImageSave (
84 IN CHAR16 *DeviceName,
85 IN UINTN Offset,
86 IN UINTN Size
87 );
88
89 #endif