Fix component name bugs when input Controller Name is invalid
authorqhuang8 <qhuang8@65ba2f78-6c18-0410-a7b4-885970cf29fa>
Fri, 19 Jan 2007 08:35:54 +0000 (08:35 +0000)
committerqhuang8 <qhuang8@65ba2f78-6c18-0410-a7b4-885970cf29fa>
Fri, 19 Jan 2007 08:35:54 +0000 (08:35 +0000)
Fix the driver binding version for platform/OEM specific drivers

git-svn-id: https://fat-driver2.tianocore.org/svn/fat-driver2/trunk@13 65ba2f78-6c18-0410-a7b4-885970cf29fa

EnhancedFat/Dxe/ComponentName.c
EnhancedFat/Dxe/Fat.c

index 4dc480f..f932ec0 100644 (file)
@@ -171,6 +171,7 @@ Returns:
 \r
 --*/\r
 {\r
+  EFI_STATUS  Status;\r
   //\r
   // This is a device driver, so ChildHandle must be NULL.\r
   //\r
@@ -178,6 +179,18 @@ Returns:
     return EFI_UNSUPPORTED;\r
   }\r
 \r
+  //\r
+  // Make sure this driver is currently managing ControllHandle\r
+  //\r
+  Status = EfiTestManagedDevice (\r
+             ControllerHandle,\r
+             gFatDriverBinding.DriverBindingHandle,\r
+             &gEfiDiskIoProtocolGuid\r
+             );\r
+  if (EFI_ERROR (Status)) {\r
+    return Status;\r
+  }\r
+\r
   return EfiLibLookupUnicodeString (\r
            Language,\r
            gFatComponentName.SupportedLanguages,\r
index 4b7a8a6..dfbb0d6 100644 (file)
@@ -63,7 +63,7 @@ EFI_DRIVER_BINDING_PROTOCOL gFatDriverBinding = {
   FatDriverBindingSupported,\r
   FatDriverBindingStart,\r
   FatDriverBindingStop,\r
-  0x10,\r
+  0xa,\r
   NULL,\r
   NULL\r
 };\r