Intel Extensible Firmware Interface User Manual

Page 163

Advertising
background image

Services — Boot Services

Version 1.10

12/01/02

5-65

do {

//
// Find the handle that best matches the Device Path. If it is only a
// partial match the remaining part of the device path is returned in
// RemainingDevicePath.
//
RemainingDevicePath = DevicePath;
Status = gBS->LocateDevicePath (

&gEfiDevicePathProtocolGuid,
&RemainingDevicePath,
&Handle
);

if (EFI_ERROR(Status)) {

return EFI_NOT_FOUND;

}

//
// Connect all drivers that apply to Handle and RemainingDevicePath
// If no drivers are connected Handle, then return EFI_NOT_FOUND
// The Recursive flag is FALSE so only one level will be expanded.
//
Status = gBS->ConnectController (

Handle,
NULL,
RemainingDevicePath,
FALSE
);

if (EFI_ERROR(Status)) {

return EFI_NOT_FOUND;

}

//
// Loop until RemainingDevicePath is an empty device path
//

} while (!IsDevicePathEnd (RemainingDevicePath));

//
// A handle with DevicePath exists in the handle database
//
return EFI_SUCCESS;

Advertising