mirror of https://github.com/acidanthera/audk.git
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:
parent
61fb1657e5
commit
caea5554ab
|
@ -160,7 +160,17 @@ UnixBlockIoComponentNameGetControllerName (
|
|||
if (ChildHandle != NULL) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
//
|
||||
// Make sure this driver is currently managing ControllerHandle
|
||||
//
|
||||
Status = EfiTestManagedDevice (
|
||||
ControllerHandle,
|
||||
gUnixBlockIoDriverBinding.DriverBindingHandle,
|
||||
&gEfiUnixIoProtocolGuid
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
//
|
||||
// Get our context back
|
||||
//
|
||||
|
|
|
@ -318,7 +318,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUnixBlockIoDriverBinding = {
|
|||
UnixBlockIoDriverBindingSupported,
|
||||
UnixBlockIoDriverBindingStart,
|
||||
UnixBlockIoDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -160,7 +160,17 @@ UnixConsoleComponentNameGetControllerName (
|
|||
if (ChildHandle != NULL) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
//
|
||||
// Make sure this driver is currently managing ControllerHandle
|
||||
//
|
||||
Status = EfiTestManagedDevice (
|
||||
ControllerHandle,
|
||||
gUnixConsoleDriverBinding.DriverBindingHandle,
|
||||
&gEfiUnixIoProtocolGuid
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
//
|
||||
// Get out context back
|
||||
//
|
||||
|
|
|
@ -50,7 +50,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUnixConsoleDriverBinding = {
|
|||
UnixConsoleDriverBindingSupported,
|
||||
UnixConsoleDriverBindingStart,
|
||||
UnixConsoleDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -167,6 +167,17 @@ UnixSimpleFileSystemComponentNameGetControllerName (
|
|||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
//
|
||||
// Make sure this driver is currently managing ControllerHandle
|
||||
//
|
||||
Status = EfiTestManagedDevice (
|
||||
ControllerHandle,
|
||||
gUnixSimpleFileSystemDriverBinding.DriverBindingHandle,
|
||||
&gEfiUnixIoProtocolGuid
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
//
|
||||
// Get our context back
|
||||
//
|
||||
|
|
|
@ -30,7 +30,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUnixSimpleFileSystemDriverBinding = {
|
|||
UnixSimpleFileSystemDriverBindingSupported,
|
||||
UnixSimpleFileSystemDriverBindingStart,
|
||||
UnixSimpleFileSystemDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -161,6 +161,17 @@ UnixUgaComponentNameGetControllerName (
|
|||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
//
|
||||
// Make sure this driver is currently managing ControllerHandle
|
||||
//
|
||||
Status = EfiTestManagedDevice (
|
||||
ControllerHandle,
|
||||
gUnixUgaDriverBinding.DriverBindingHandle,
|
||||
&gEfiUnixIoProtocolGuid
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
//
|
||||
// Get our context back
|
||||
//
|
||||
|
|
|
@ -31,7 +31,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUnixUgaDriverBinding = {
|
|||
UnixUgaDriverBindingSupported,
|
||||
UnixUgaDriverBindingStart,
|
||||
UnixUgaDriverBindingStop,
|
||||
0x10,
|
||||
0xa,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
|
|
@ -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
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue