Fix component name bugs when input Controller Name is invalid
Fix the driver binding version for platform/OEM specific drivers git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2275 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -154,6 +154,18 @@ UnixBusDriverComponentNameGetControllerName (
|
||||
EFI_UNIX_IO_PROTOCOL *UnixIo;
|
||||
UNIX_IO_DEVICE *Private;
|
||||
|
||||
//
|
||||
// Make sure this driver is currently managing ControllHandle
|
||||
//
|
||||
Status = EfiTestManagedDevice (
|
||||
ControllerHandle,
|
||||
gUnixBusDriverBinding.DriverBindingHandle,
|
||||
&gEfiUnixThunkProtocolGuid
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
//
|
||||
// This is a bus driver, so ChildHandle can not be NULL.
|
||||
//
|
||||
@@ -161,6 +173,15 @@ UnixBusDriverComponentNameGetControllerName (
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
Status = EfiTestChildHandle (
|
||||
ControllerHandle,
|
||||
ChildHandle,
|
||||
&gEfiUnixThunkProtocolGuid
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
//
|
||||
// Get our context back
|
||||
//
|
||||
|
@@ -107,7 +107,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUnixBusDriverBinding = {
|
||||
UnixBusDriverBindingSupported,
|
||||
UnixBusDriverBindingStart,
|
||||
UnixBusDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
@@ -454,7 +454,7 @@ Returns:
|
||||
|
||||
UnixDevice->ControllerNameTable = NULL;
|
||||
|
||||
// FIXME: check size
|
||||
// FIXME: check size
|
||||
StrCpy(ComponentName, UnixDevice->UnixIo.EnvString);
|
||||
|
||||
UnixDevice->DevicePath = UnixBusCreateDevicePath (
|
||||
|
Reference in New Issue
Block a user