MCPcopy Create free account
hub / github.com/CloverHackyColor/CloverBootloader / DTLookupEntry

Function DTLookupEntry

Library/DeviceTreeLib/DeviceTreeLib.c:174–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

172//
173
174EFI_STATUS
175DTLookupEntry (
176 IN CONST DTEntry SearchPoint,
177 IN CONST CHAR8 *PathName,
178 IN DTEntry *FoundEntry
179 )
180{
181 DTEntryNameBuf Buf;
182 DTEntry Cur;
183 CONST CHAR8 *Cp;
184
185 if (mDTRootNode == NULL) {
186 return EFI_INVALID_PARAMETER;
187 }
188
189 if (SearchPoint == NULL) {
190 Cur = mDTRootNode;
191 } else {
192 Cur = SearchPoint;
193 }
194
195 Cp = PathName;
196 if (*Cp == DT_PATH_NAME_SEPARATOR) {
197 Cp++;
198 if (*Cp == '\0') {
199 *FoundEntry = Cur;
200 return EFI_SUCCESS;
201 }
202 }
203
204 do {
205 Cp = GetNextComponent (Cp, Buf);
206
207 //
208 // Check for done.
209 //
210 if (*Buf == '\0') {
211 if (*Cp == '\0') {
212 *FoundEntry = Cur;
213 return EFI_SUCCESS;
214 }
215 break;
216 }
217
218 Cur = FindChild (Cur, Buf);
219 } while (Cur != NULL);
220
221 return EFI_INVALID_PARAMETER;
222}
223
224EFI_STATUS
225DTCreateEntryIterator (

Callers 7

DumpDeviceTreeFunction · 0.70
DTDeletePropertyFunction · 0.70
DTInsertPropertyFunction · 0.70
PatchLoadedKextsMethod · 0.50
InjectKextsMethod · 0.50
HideSlideFromOsFunction · 0.50

Calls 2

GetNextComponentFunction · 0.70
FindChildFunction · 0.70

Tested by

no test coverage detected