| 360 | } |
| 361 | |
| 362 | EFI_STATUS |
| 363 | DTGetProperty( |
| 364 | IN CONST DTEntry Entry, |
| 365 | IN CHAR8 *PropertyName, |
| 366 | IN VOID **PropertyValue, |
| 367 | IN UINT32 *PropertySize |
| 368 | ) |
| 369 | { |
| 370 | DTProperty *Prop; |
| 371 | UINT32 Count; |
| 372 | |
| 373 | if (Entry == NULL || Entry->NumProperties == 0) { |
| 374 | return EFI_INVALID_PARAMETER; |
| 375 | } |
| 376 | |
| 377 | Prop = (DTProperty *) (Entry + 1); |
| 378 | for (Count = 0; Count < Entry->NumProperties; Count++) { |
| 379 | if (AsciiStrCmp(Prop->Name, PropertyName) == 0) { |
| 380 | *PropertyValue = (VOID *) (((UINT8 *)Prop) + sizeof (DTProperty)); |
| 381 | *PropertySize = Prop->Length; |
| 382 | return EFI_SUCCESS; |
| 383 | } |
| 384 | Prop = DEVICE_TREE_GET_NEXT_PROPERTY (Prop); |
| 385 | } |
| 386 | |
| 387 | return EFI_INVALID_PARAMETER; |
| 388 | } |
| 389 | |
| 390 | EFI_STATUS |
| 391 | DTCreatePropertyIterator ( |
no test coverage detected