Hi all,

I am working on some project where I need to open Disk protocol.
Below is my code-

        Status = gBS->OpenProtocol(ControllerHandle 
,&gEfiDiskIoProtocolGuid,(VOID **) &DiskIo, gImageHandle, NULL, 
EFI_OPEN_PROTOCOL_BY_DRIVER);
        if (EFI_ERROR(Status)) {
        Print(L"Disk IO error %d\n",Status);
                return Status;
        }

Why this code always goes to error condition.
If I use EFI_OPEN_PROTOCOL_GET_PROTOCOL as parameter it will not go to error 
condition, how to get rid of this problem ?
Best Regards,
Parmeshwr Prasad

[cid:image001.png@01CECB66.2CFA58B0]

<<inline: image001.png>>

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to