TianoCore EDK2 master
Loading...
Searching...
No Matches
OpalHiiCallbacks.c
Go to the documentation of this file.
1
10#include "OpalHii.h"
11
20 VOID
21 )
22{
23 return gImageHandle;
24}
25
34VOID *
36 UINT8 DiskIndex
37 )
38{
40 UINT8 CurrentDisk;
41
43 CurrentDisk = 0;
44
45 if (DiskIndex >= GetDeviceCount ()) {
46 return NULL;
47 }
48
49 while (Dev != NULL) {
50 if (CurrentDisk == DiskIndex) {
51 return Dev;
52 } else {
53 Dev = Dev->Next;
54 CurrentDisk++;
55 }
56 }
57
58 return NULL;
59}
60
71 UINT8 DiskIndex
72 )
73{
74 VOID *Ctx;
76
77 Ctx = HiiGetDiskContextCB (DiskIndex);
78
79 if (Ctx == NULL) {
80 return NULL;
81 }
82
83 Tmp = (OPAL_DRIVER_DEVICE *)Ctx;
84
85 return &Tmp->OpalDisk;
86}
87
96CHAR8 *
98 UINT8 DiskIndex
99 )
100{
102
103 Ctx = (OPAL_DRIVER_DEVICE *)HiiGetDiskContextCB (DiskIndex);
104
105 if (Ctx != NULL) {
106 if (Ctx->NameZ == NULL) {
108 }
109
110 return Ctx->NameZ;
111 }
112
113 return NULL;
114}
#define NULL
Definition: Base.h:319
UINT8 GetDeviceCount(VOID)
Definition: OpalDriver.c:2351
OPAL_DRIVER_DEVICE * OpalDriverGetDeviceList(VOID)
Definition: OpalDriver.c:2375
BOOLEAN OpalDriverGetDriverDeviceName(OPAL_DRIVER_DEVICE *Dev)
Definition: OpalDriver.c:2581
EFI_HANDLE HiiGetDriverImageHandleCB(VOID)
OPAL_DISK * HiiGetOpalDiskCB(UINT8 DiskIndex)
VOID * HiiGetDiskContextCB(UINT8 DiskIndex)
CHAR8 * HiiDiskGetNameCB(UINT8 DiskIndex)
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
EFI_HANDLE gImageHandle
CHAR8 * NameZ
Allocated/freed by UEFI Filter Driver at device creation/removal.
Definition: OpalDriver.h:160
OPAL_DISK OpalDisk
User context.
Definition: OpalDriver.h:158
OPAL_DRIVER_DEVICE * Next
Linked list pointer.
Definition: OpalDriver.h:156