summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
43e5497)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud elhaj@hp.com
Reviewed-by: Jaben Carsey <Jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14743
6f19259b-4bc3-4df7-8a09-
765794883524
typedef struct {\r
NIC_ADDR NicAddr; ///< Link layer address to identify the NIC.\r
UINT32 Source; ///< Static or DHCP.\r
typedef struct {\r
NIC_ADDR NicAddr; ///< Link layer address to identify the NIC.\r
UINT32 Source; ///< Static or DHCP.\r
- BOOLEAN Perment; ///< Survive the reboot or not.\r
+ BOOLEAN Permanent; ///< Survive the reboot or not.\r
EFI_IP4_IPCONFIG_DATA Ip4Info; ///< IP addresses.\r
} NIC_IP4_CONFIG_INFO;\r
\r
EFI_IP4_IPCONFIG_DATA Ip4Info; ///< IP addresses.\r
} NIC_IP4_CONFIG_INFO;\r
\r
EFI_DHCP4_MODE_DATA Dhcp4Mode;\r
EFI_IP4_IPCONFIG_DATA *Ip4Config;\r
EFI_STATUS Status;\r
EFI_DHCP4_MODE_DATA Dhcp4Mode;\r
EFI_IP4_IPCONFIG_DATA *Ip4Config;\r
EFI_STATUS Status;\r
IP4_ADDR Subnet;\r
IP4_ADDR Ip1;\r
IP4_ADDR Ip2;\r
IP4_ADDR Subnet;\r
IP4_ADDR Ip1;\r
IP4_ADDR Ip2;\r
// the instance and to NVRam. So, both the IP4 driver and\r
// other user can get that address.\r
//\r
// the instance and to NVRam. So, both the IP4 driver and\r
// other user can get that address.\r
//\r
\r
if (Instance->NicConfig != NULL) {\r
ASSERT (Instance->NicConfig->Source == IP4_CONFIG_SOURCE_DHCP);\r
\r
if (Instance->NicConfig != NULL) {\r
ASSERT (Instance->NicConfig->Source == IP4_CONFIG_SOURCE_DHCP);\r
- Perment = Instance->NicConfig->Perment;\r
+ Permanent = Instance->NicConfig->Permanent;\r
FreePool (Instance->NicConfig);\r
}\r
\r
FreePool (Instance->NicConfig);\r
}\r
\r
\r
CopyMem (&Instance->NicConfig->NicAddr, &Instance->NicAddr, sizeof (Instance->NicConfig->NicAddr));\r
Instance->NicConfig->Source = IP4_CONFIG_SOURCE_DHCP;\r
\r
CopyMem (&Instance->NicConfig->NicAddr, &Instance->NicAddr, sizeof (Instance->NicConfig->NicAddr));\r
Instance->NicConfig->Source = IP4_CONFIG_SOURCE_DHCP;\r
- Instance->NicConfig->Perment = Perment;\r
+ Instance->NicConfig->Permanent = Permanent;\r
\r
Ip4Config = &Instance->NicConfig->Ip4Info;\r
Ip4Config->StationAddress = Dhcp4Mode.ClientAddress;\r
\r
Ip4Config = &Instance->NicConfig->Ip4Info;\r
Ip4Config->StationAddress = Dhcp4Mode.ClientAddress;\r
//\r
NicConfig = Ip4ConfigReadVariable (Instance);\r
if (NicConfig != NULL) {\r
//\r
NicConfig = Ip4ConfigReadVariable (Instance);\r
if (NicConfig != NULL) {\r
- if (!NicConfig->Perment) {\r
+ if (!NicConfig->Permanent) {\r
//\r
// Delete the non-permanent configuration.\r
//\r
//\r
// Delete the non-permanent configuration.\r
//\r
ZeroMem (&Ip4ConfigInstance->Ip4ConfigCallbackInfo.Gateway, sizeof (EFI_IPv4_ADDRESS));\r
}\r
\r
ZeroMem (&Ip4ConfigInstance->Ip4ConfigCallbackInfo.Gateway, sizeof (EFI_IPv4_ADDRESS));\r
}\r
\r
- NicInfo->Perment = TRUE;\r
+ NicInfo->Permanent = TRUE;\r
CopyMem (&NicInfo->NicAddr, &Ip4ConfigInstance->NicAddr, sizeof (NIC_ADDR));\r
\r
return EfiNicIp4ConfigSetInfo (Ip4ConfigInstance, NicInfo, TRUE);\r
CopyMem (&NicInfo->NicAddr, &Ip4ConfigInstance->NicAddr, sizeof (NIC_ADDR));\r
\r
return EfiNicIp4ConfigSetInfo (Ip4ConfigInstance, NicInfo, TRUE);\r
if (Index != Info->IpCnt) {\r
//\r
// It's invalid if the first server doesn't accecpt any response\r
if (Index != Info->IpCnt) {\r
//\r
// It's invalid if the first server doesn't accecpt any response\r
- // and meanwhile any of the rest servers accept any reponse.\r
+ // but any of the other servers does accept any response.\r
//\r
Status = EFI_INVALID_PARAMETER;\r
goto ON_EXIT;\r
//\r
Status = EFI_INVALID_PARAMETER;\r
goto ON_EXIT;\r
\r
if (StringNoCaseCompare(&Temp, &DhcpTemp) == 0) {\r
//\r
\r
if (StringNoCaseCompare(&Temp, &DhcpTemp) == 0) {\r
//\r
- // Validate the parameter for DHCP, two valid forms: eth0 DHCP and eth0 DHCP perment\r
+ // Validate the parameter for DHCP, two valid forms: eth0 DHCP and eth0 DHCP permanent\r
//\r
if ((Argc != 2) && (Argc!= 3)) {\r
ShellPrintHiiEx(-1, -1, NULL,STRING_TOKEN (STR_GEN_PROBLEM_VAL), gShellNetwork1HiiHandle, Temp);\r
//\r
if ((Argc != 2) && (Argc!= 3)) {\r
ShellPrintHiiEx(-1, -1, NULL,STRING_TOKEN (STR_GEN_PROBLEM_VAL), gShellNetwork1HiiHandle, Temp);\r
}\r
\r
if ((OldConfig != NULL) && (OldConfig->Source == IP4_CONFIG_SOURCE_DHCP) &&\r
}\r
\r
if ((OldConfig != NULL) && (OldConfig->Source == IP4_CONFIG_SOURCE_DHCP) &&\r
- (OldConfig->Perment == Permanent)) {\r
+ (OldConfig->Permanent == Permanent)) {\r
\r
ShellPrintHiiEx(-1, -1, NULL,STRING_TOKEN (STR_IFCONFIG_INTERFACE_CONFIGURED), gShellNetwork1HiiHandle, Info->Name);\r
ShellStatus = SHELL_ALREADY_STARTED;\r
\r
ShellPrintHiiEx(-1, -1, NULL,STRING_TOKEN (STR_IFCONFIG_INTERFACE_CONFIGURED), gShellNetwork1HiiHandle, Info->Name);\r
ShellStatus = SHELL_ALREADY_STARTED;\r
} else if (StringNoCaseCompare(&Temp, &StaticTemp) == 0) {\r
//\r
// validate the parameter, two forms: eth0 static IP NETMASK GATEWAY and\r
} else if (StringNoCaseCompare(&Temp, &StaticTemp) == 0) {\r
//\r
// validate the parameter, two forms: eth0 static IP NETMASK GATEWAY and\r
- // eth0 static IP NETMASK GATEWAY perment\r
+ // eth0 static IP NETMASK GATEWAY permanent \r
//\r
if ((Argc != 5) && (Argc != 6)) {\r
ShellPrintHiiEx(-1, -1, NULL,STRING_TOKEN (STR_GEN_PROBLEM_VAL), gShellNetwork1HiiHandle, Temp);\r
//\r
if ((Argc != 5) && (Argc != 6)) {\r
ShellPrintHiiEx(-1, -1, NULL,STRING_TOKEN (STR_GEN_PROBLEM_VAL), gShellNetwork1HiiHandle, Temp);\r
\r
//\r
// The correct command line arguments for setting address are:\r
\r
//\r
// The correct command line arguments for setting address are:\r
- // IfConfig -s eth0 DHCP [perment]\r
- // IfConfig -s eth0 static ip netmask gateway [perment]\r
+ // IfConfig -s eth0 DHCP [permanent]\r
+ // IfConfig -s eth0 static ip netmask gateway [permanent]\r
//\r
if (Item == NULL || (CountSubItems(Item) < 2) || (CountSubItems(Item) > 6) || (CountSubItems(Item) == 4)) {\r
ShellPrintHiiEx(-1, -1, NULL,STRING_TOKEN (STR_GEN_PROBLEM_VAL), gShellNetwork1HiiHandle, L"-s");\r
//\r
if (Item == NULL || (CountSubItems(Item) < 2) || (CountSubItems(Item) > 6) || (CountSubItems(Item) == 4)) {\r
ShellPrintHiiEx(-1, -1, NULL,STRING_TOKEN (STR_GEN_PROBLEM_VAL), gShellNetwork1HiiHandle, L"-s");\r