Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BopEfiGetDebugDevice in dbgser.c doesn't iterate through the list of handles. #149

Closed
jparris opened this issue Jun 6, 2018 · 1 comment

Comments

@jparris
Copy link

jparris commented Jun 6, 2018

Hi, I was reading through dbgser.c and noticed that the for loop always uses Handles[0] instead of walking through the array of handles returned by LocateHandleBuffer.

    //
    // Loop through all the handles until one is successfully configured.
    //

    for (HandleIndex = 0; HandleIndex < HandleCount; HandleIndex += 1) {

        //
        // Get the serial I/O protocol.
        //

        EfiStatus = BopEfiHandleProtocol(Handles[0],   <---- Should be Handles[HandlesIndex]
                                         &BoEfiSerialIoProtocolGuid,
@evangreen
Copy link
Collaborator

Good catch. Thanks for pointing that out.

evangreen pushed a commit that referenced this issue Jul 8, 2018
In issue #149 on GitHub, jparris noticed that BopEfiGetDebugDevice was
trying to iterate over all the handles that responded to the
EfiSerialIoProtocolGuid, but was always calling HandleProtocol on the
first element in the handle array.

The fix is simply to call HandleProtocol using the iterator index.
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

No branches or pull requests

2 participants