microsoft / microsoft/mu_basecore
[Task] UefiPxeBcDxe: Check return status of `NetLibDetectMediaWaitTimeout()` in
@makubacki is already working on this.
Since Feb 12, 2026.
- Dominant language
- C
- Stars
- 290
- Forks
- 187
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 37
Description
The point of `NetLibDetectMediaWaitTimeout()` in `DxeNetLib` is to return whether network media is present. It returns a status code that is ignored in 14/15 calls throughout the codebase.
These are the possible return values defined for `NetLibDetectMediaWaitTimeout()`:
https://github.com/microsoft/mu_basecore/blob/b09f1fd5f3bf28ee3ba6d3bb7c25406246564b78/NetworkPkg/Library/DxeNetLib/DxeNetLib.c#L2656-L2687
It would be intuitive to expect that if `NetLibDetectMediaWaitTimeout()` returns a non-`EFI_SUCCESS` code, the output pointer value in the `*MediaState` argument is invalid. That's not done today.
---
This issue tracks exploration of conditionally accepting `*MediaState` in combination with the function return value. That may require other work like #1635 being completed first.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.