> On Jun 26, 2017, at 9:30 AM, TVKR <tres...@gmail.com> wrote:
> 
> Hi experts,
> 
> I have  a question related to the ConnectController implementation in the
> edk2 codebase (MdeModulePkg\Core\Dxe\Hand\DriverSupport.c). Under the
> CoreConnectSingleController function, what if DriverBinding->Supported
> returns an error? I see that there is a do/while loop waiting for
> DriverFound to be set to TRUE, but it looks like this wont happen if
> DriverBinding->Supported returns an error (looping for ever). Am I reading
> this wrong?
> 

How do you think a do while loop works in C?

DriverFound = FALSE;
do {
 ;
} while (DriverFound);

Is not an infinite loop? It just runs one time. 

The code is looping as long as Start() is called as calling Start() could cause 
other drivers Supported() to start returning TRUE, so you have to recheck the 
set after calling Start(). 

Thanks,

Andrew Fish

> Thanks
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to