]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmbeddedPkg/Ebl/Network.c
Vlv2TbltDevicePkg/PlatformBdsLib: Add DebugAgent Console
[mirror_edk2.git] / EmbeddedPkg / Ebl / Network.c
index 7d3d553bb31e4547afb6c2853d6058568fd42906..f2562e60b0db7997b09f6a2a8e46eaf070e0f13d 100644 (file)
@@ -2,6 +2,7 @@
   EBL commands for Network Devices\r
 \r
   Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
+  (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -28,11 +29,12 @@ ParseIp (
   Address->v4.Addr[2] = (UINT8)AsciiStrDecimalToUintn (String);\r
   String = AsciiStrStr(String, ".") + 1;\r
   Address->v4.Addr[3] = (UINT8)AsciiStrDecimalToUintn (String);\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
 EFI_STATUS\r
+EFIAPI\r
 EblIpCmd (\r
   IN UINTN  Argc,\r
   IN CHAR8  **Argv\r
@@ -41,28 +43,28 @@ EblIpCmd (
   EFI_STATUS        Status = EFI_INVALID_PARAMETER;\r
   EFI_MAC_ADDRESS   Mac;\r
   EFI_IP_ADDRESS    Ip;\r
-  \r
-  if (Argc == 1) {  \r
+\r
+  if (Argc == 1) {\r
     // Get current IP/MAC\r
-  \r
+\r
     // Get current MAC address\r
     Status = EblGetCurrentMacAddress (&Mac);\r
     if (EFI_ERROR (Status)) {\r
       goto Exit;\r
     }\r
-    \r
+\r
     AsciiPrint ("MAC Address:  %02x:%02x:%02x:%02x:%02x:%02x\n", Mac.Addr[0],  Mac.Addr[1],  Mac.Addr[2],  Mac.Addr[3],  Mac.Addr[4],  Mac.Addr[5]);\r
-    \r
+\r
     // Get current IP address\r
     Status = EblGetCurrentIpAddress (&Ip);\r
     if (EFI_ERROR(Status)) {\r
       AsciiPrint("IP Address is not configured.\n");\r
       Status = EFI_SUCCESS;\r
       goto Exit;\r
-    }    \r
+    }\r
+\r
+    AsciiPrint("IP Address:   %d.%d.%d.%d\n", Ip.v4.Addr[0], Ip.v4.Addr[1],Ip.v4.Addr[2], Ip.v4.Addr[3]);\r
 \r
-       AsciiPrint("IP Address:   %d.%d.%d.%d\n", Ip.v4.Addr[0], Ip.v4.Addr[1],Ip.v4.Addr[2], Ip.v4.Addr[3]);\r
-    \r
   } else if ((Argv[1][0] == 'r') && (Argc == 2)) {\r
     // Get new address via dhcp\r
     Status = EblPerformDHCP (TRUE);\r
@@ -72,10 +74,10 @@ EblIpCmd (
     if (EFI_ERROR (Status)) {\r
       goto Exit;\r
     }\r
-    \r
+\r
     Status = EblSetStationIp (&Ip, NULL);\r
   }\r
-  \r
+\r
 Exit:\r
   return Status;\r
 }\r