Skip to content

Conversation

necauqua
Copy link
Contributor

@necauqua necauqua commented Nov 8, 2021

The device path pointer does not need to be exclusive here, and also lift the mutable pointer to said device path pointer out of the function - this argument in LocateDevicePath is IN OUT, and is used to return remaining part of the device path:

On input, a pointer to a pointer to the device path. On output, the
device path pointer is modified to point to the remaining part of the
device path—that is, when the function finds the closest handle, it
splits the device path into two parts, stripping off the front part, and
returning the remaining portion. EFI_DEVICE_PATH_PROTOCOL is
defined in Section 10.2.

@nicholasbishop
Copy link
Member

Looks good, thanks!

@nicholasbishop nicholasbishop merged commit 452b9c6 into rust-osdev:master Nov 23, 2021
@necauqua necauqua deleted the fix-locate-device-path branch November 23, 2021 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants