]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/PxeBcDxe/Bc.c
Clean up Network Components to support GCC build.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / PxeBcDxe / Bc.c
index a520349135f1e4bda998adb86ef3d3b330976e81..63d11d2fe1b82b24de19fe8dad027b27298a875b 100644 (file)
@@ -1146,9 +1146,6 @@ PxebcBisDetect (
   return TRUE;\r
 }\r
 \r
-static VOID *BCNotifyReg;\r
-\r
-\r
 /**\r
   Start and initialize the BaseCode protocol, Simple Network protocol and UNDI.\r
 \r
@@ -1559,7 +1556,7 @@ BcStop (
   return StatCode;\r
 }\r
 \r
-const IPV4_ADDR AllSystemsGroup = { 224, 0, 0, 1 };\r
+const IPV4_ADDR AllSystemsGroup = {{224, 0, 0, 1}};\r
 \r
 \r
 /**\r
@@ -1665,7 +1662,7 @@ IpFilter (
       Enable = EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST;\r
 \r
       for (Index = 0; Index < Filter->IpCnt; ++Index) {\r
-        PxebcMode->IpFilter.IpList[Index] = Filter->IpList[Index];\r
+        CopyMem (&PxebcMode->IpFilter.IpList[Index], &Filter->IpList[Index], sizeof (EFI_IP_ADDRESS));\r
 \r
         if (IS_MULTICAST (&Filter->IpList[Index])) {\r
           EFI_IP_ADDRESS  *TmpIp;\r
@@ -1677,7 +1674,7 @@ IpFilter (
           //\r
           if (!Index2)\r
           {\r
-              TmpIp = (EFI_IP_ADDRESS *) &AllSystemsGroup;\r
+            TmpIp = (EFI_IP_ADDRESS *) &AllSystemsGroup;\r
             --Index;\r
           } else {\r
             TmpIp = (EFI_IP_ADDRESS *) &Filter->IpList[Index];\r
@@ -2012,8 +2009,8 @@ BcSetStationIP (
     goto RELEASE_LOCK;\r
   }\r
 \r
-  PxebcMode->StationIp   = *StationIpPtr;\r
-  PxebcMode->SubnetMask  = *SubnetMaskPtr;\r
+  CopyMem (&PxebcMode->StationIp, StationIpPtr, sizeof (EFI_IP_ADDRESS));\r
+  CopyMem (&PxebcMode->SubnetMask, SubnetMaskPtr, sizeof (EFI_IP_ADDRESS));\r
   Private->GoodStationIp = TRUE;\r
 \r
 RELEASE_LOCK:\r
@@ -2384,15 +2381,14 @@ InitializeBCDriver (
   //\r
   // Initialize EFI library\r
   //\r
-  Status = EfiLibInstallAllDriverProtocols (\r
-            ImageHandle,\r
-            SystemTable,\r
-            &mPxeBcDriverBinding,\r
-            NULL,\r
-            COMPONENT_NAME,\r
-            NULL,\r
-            NULL\r
-            );\r
+  Status = EfiLibInstallDriverBindingComponentName2 (\r
+             ImageHandle,\r
+             SystemTable,\r
+             &mPxeBcDriverBinding,\r
+             NULL,\r
+             &gPxeBcComponentName,\r
+             &gPxeBcComponentName2\r
+             );\r
 \r
   InitArpHeader ();\r
   OptionsStrucInit ();\r