MdeModulePkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -249,11 +249,11 @@ DhcpComponentNameGetDriverName (
|
||||
|
||||
@param Dhcp4[in] A pointer to the EFI_DHCP4_PROTOCOL.
|
||||
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.
|
||||
@retval EFI_INVALID_PARAMETER The input parameter is invalid.
|
||||
@retval EFI_DEVICE_ERROR DHCP is in unknown state.
|
||||
|
||||
|
||||
**/
|
||||
EFI_STATUS
|
||||
UpdateName (
|
||||
@@ -274,16 +274,16 @@ UpdateName (
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
if (gDhcpControllerNameTable != NULL) {
|
||||
FreeUnicodeStringTable (gDhcpControllerNameTable);
|
||||
gDhcpControllerNameTable = NULL;
|
||||
}
|
||||
|
||||
|
||||
if (Dhcp4ModeData.State > Dhcp4Rebooting) {
|
||||
return EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
|
||||
Status = AddUnicodeString2 (
|
||||
"eng",
|
||||
gDhcp4ComponentName.SupportedLanguages,
|
||||
@@ -294,7 +294,7 @@ UpdateName (
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
return AddUnicodeString2 (
|
||||
"en",
|
||||
gDhcp4ComponentName2.SupportedLanguages,
|
||||
@@ -391,10 +391,10 @@ DhcpComponentNameGetControllerName (
|
||||
if (ChildHandle == NULL) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
//
|
||||
// Make sure this driver produced ChildHandle
|
||||
//
|
||||
|
||||
//
|
||||
// Make sure this driver produced ChildHandle
|
||||
//
|
||||
Status = EfiTestChildHandle (
|
||||
ControllerHandle,
|
||||
ChildHandle,
|
||||
@@ -404,9 +404,9 @@ DhcpComponentNameGetControllerName (
|
||||
return Status;
|
||||
}
|
||||
|
||||
//
|
||||
// Retrieve an instance of a produced protocol from ChildHandle
|
||||
//
|
||||
//
|
||||
// Retrieve an instance of a produced protocol from ChildHandle
|
||||
//
|
||||
Status = gBS->OpenProtocol (
|
||||
ChildHandle,
|
||||
&gEfiDhcp4ProtocolGuid,
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -355,7 +355,7 @@ ON_ERROR:
|
||||
|
||||
/**
|
||||
Callback function which provided by user to remove one node in NetDestroyLinkList process.
|
||||
|
||||
|
||||
@param[in] Entry The entry to be removed.
|
||||
@param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList.
|
||||
|
||||
@@ -445,7 +445,7 @@ Dhcp4DriverBindingStop (
|
||||
if (!IsListEmpty (&DhcpSb->Children)) {
|
||||
//
|
||||
// Destroy all the children instances before destory the service.
|
||||
//
|
||||
//
|
||||
List = &DhcpSb->Children;
|
||||
Status = NetDestroyLinkList (
|
||||
List,
|
||||
@@ -481,7 +481,7 @@ Dhcp4DriverBindingStop (
|
||||
gDhcpControllerNameTable = NULL;
|
||||
}
|
||||
FreePool (DhcpSb);
|
||||
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Header for the DHCP4 driver.
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -78,7 +78,7 @@ Dhcp4DriverBindingStart (
|
||||
restrictions for this service. DisconnectController()
|
||||
must follow these calling restrictions. If any other agent wishes
|
||||
to call Stop() it must also follow these calling restrictions.
|
||||
|
||||
|
||||
@param[in] This Protocol instance pointer.
|
||||
@param[in] ControllerHandle Handle of device to stop driver on
|
||||
@param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
|
||||
@@ -100,14 +100,14 @@ Dhcp4DriverBindingStop (
|
||||
|
||||
/**
|
||||
Creates a child handle and installs a protocol.
|
||||
|
||||
The CreateChild() function installs a protocol on ChildHandle.
|
||||
If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
|
||||
|
||||
The CreateChild() function installs a protocol on ChildHandle.
|
||||
If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle.
|
||||
If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle.
|
||||
|
||||
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||
@param ChildHandle Pointer to the handle of the child to create. If it is NULL,
|
||||
then a new handle is created. If it is a pointer to an existing UEFI handle,
|
||||
then a new handle is created. If it is a pointer to an existing UEFI handle,
|
||||
then the protocol is added to the existing UEFI handle.
|
||||
|
||||
@retval EFI_SUCCES The protocol was added to ChildHandle.
|
||||
@@ -126,9 +126,9 @@ Dhcp4ServiceBindingCreateChild (
|
||||
|
||||
/**
|
||||
Destroys a child handle with a protocol installed on it.
|
||||
|
||||
The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
|
||||
that was installed by CreateChild() from ChildHandle. If the removed protocol is the
|
||||
|
||||
The DestroyChild() function does the opposite of CreateChild(). It removes a protocol
|
||||
that was installed by CreateChild() from ChildHandle. If the removed protocol is the
|
||||
last protocol on ChildHandle, then ChildHandle is destroyed.
|
||||
|
||||
@param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance.
|
||||
|
@@ -5,7 +5,7 @@
|
||||
# capability to collect configuration information for the EFI IPv4 Protocol drivers
|
||||
# and to provide DHCPv4 server and PXE boot server discovery services.
|
||||
#
|
||||
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
# which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -31,7 +31,7 @@
|
||||
#
|
||||
# VALID_ARCHITECTURES = IA32 X64 IPF EBC
|
||||
#
|
||||
# DRIVER_BINDING = gDhcp4DriverBinding
|
||||
# DRIVER_BINDING = gDhcp4DriverBinding
|
||||
# COMPONENT_NAME = gDhcp4ComponentName
|
||||
# COMPONENT_NAME2 = gDhcp4ComponentName2
|
||||
#
|
||||
|
@@ -5,13 +5,13 @@
|
||||
// capability to collect configuration information for the EFI IPv4 Protocol drivers
|
||||
// and to provide DHCPv4 server and PXE boot server discovery services.
|
||||
//
|
||||
// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
// which accompanies this distribution. The full text of the license may be found at
|
||||
// http://opensource.org/licenses/bsd-license.php
|
||||
//
|
||||
//
|
||||
// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /** @file
|
||||
// Dhcp4Dxe Localized Strings and Content
|
||||
//
|
||||
// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
//
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -13,8 +13,8 @@
|
||||
//
|
||||
// **/
|
||||
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
#string STR_PROPERTIES_MODULE_NAME
|
||||
#language en-US
|
||||
"DHCP v4 DXE Driver"
|
||||
|
||||
|
||||
|
@@ -1203,9 +1203,9 @@ Dhcp4InstanceConfigUdpIo (
|
||||
EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN *Token;
|
||||
EFI_UDP4_CONFIG_DATA UdpConfigData;
|
||||
IP4_ADDR ClientAddr;
|
||||
IP4_ADDR Ip;
|
||||
INTN Class;
|
||||
IP4_ADDR SubnetMask;
|
||||
IP4_ADDR Ip;
|
||||
INTN Class;
|
||||
IP4_ADDR SubnetMask;
|
||||
|
||||
Instance = (DHCP_PROTOCOL *) Context;
|
||||
DhcpSb = Instance->Service;
|
||||
@@ -1238,7 +1238,7 @@ Dhcp4InstanceConfigUdpIo (
|
||||
if (Class >= IP4_ADDR_CLASSE) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
SubnetMask = gIp4AllMasks[Class << 3];
|
||||
} else {
|
||||
SubnetMask = DhcpSb->Netmask;
|
||||
@@ -1548,7 +1548,7 @@ EfiDhcp4TransmitReceive (
|
||||
}
|
||||
|
||||
ClientAddr = EFI_NTOHL (Token->Packet->Dhcp4.Header.ClientAddr);
|
||||
|
||||
|
||||
if (ClientAddr == 0) {
|
||||
return EFI_NO_MAPPING;
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
RFC 2132: DHCP Options and BOOTP Vendor Extensions
|
||||
RFC 1534: Interoperation Between DHCP and BOOTP
|
||||
RFC 3396: Encoding Long Options in DHCP.
|
||||
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
EFI DHCP protocol implementation.
|
||||
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -41,7 +41,7 @@ DhcpInitRequest (
|
||||
// Clear initial time to make sure that elapsed-time is set to 0 for first Discover or REQUEST message.
|
||||
//
|
||||
DhcpSb->ActiveChild->ElaspedTime= 0;
|
||||
|
||||
|
||||
if (DhcpSb->DhcpState == Dhcp4Init) {
|
||||
DhcpSetState (DhcpSb, Dhcp4Selecting, FALSE);
|
||||
Status = DhcpSendMessage (DhcpSb, NULL, NULL, DHCP_MSG_DISCOVER, NULL);
|
||||
@@ -1381,13 +1381,13 @@ DhcpSendMessage (
|
||||
}
|
||||
|
||||
ASSERT (UdpIo != NULL);
|
||||
|
||||
|
||||
Status = UdpIoSendDatagram (
|
||||
UdpIo,
|
||||
Wrap,
|
||||
&EndPoint,
|
||||
NULL,
|
||||
DhcpOnPacketSent,
|
||||
UdpIo,
|
||||
Wrap,
|
||||
&EndPoint,
|
||||
NULL,
|
||||
DhcpOnPacketSent,
|
||||
DhcpSb
|
||||
);
|
||||
|
||||
@@ -1509,7 +1509,7 @@ DhcpOnTimerTick (
|
||||
if (Instance != NULL && Instance->ElaspedTime < 0xffff) {
|
||||
Instance->ElaspedTime++;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Check the retransmit timer
|
||||
//
|
||||
@@ -1531,7 +1531,7 @@ DhcpOnTimerTick (
|
||||
goto ON_EXIT;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (++DhcpSb->CurRetry < DhcpSb->MaxRetries) {
|
||||
//
|
||||
// Still has another try
|
||||
@@ -1570,7 +1570,7 @@ DhcpOnTimerTick (
|
||||
goto END_SESSION;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// If an address has been acquired, check whether need to
|
||||
// refresh or whether it has expired.
|
||||
@@ -1602,8 +1602,8 @@ DhcpOnTimerTick (
|
||||
|
||||
if (Instance != NULL) {
|
||||
Instance->ElaspedTime= 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Status = DhcpSendMessage (
|
||||
DhcpSb,
|
||||
DhcpSb->Selected,
|
||||
@@ -1626,7 +1626,7 @@ DhcpOnTimerTick (
|
||||
|
||||
if (Instance != NULL) {
|
||||
Instance->ElaspedTime= 0;
|
||||
}
|
||||
}
|
||||
|
||||
Status = DhcpSendMessage (
|
||||
DhcpSb,
|
||||
@@ -1648,7 +1648,7 @@ ON_EXIT:
|
||||
//
|
||||
NET_LIST_FOR_EACH_SAFE (Entry, Next, &DhcpSb->Children) {
|
||||
Instance = NET_LIST_USER_STRUCT (Entry, DHCP_PROTOCOL, Link);
|
||||
|
||||
|
||||
if ((Instance != NULL) && (Instance->Token != NULL)) {
|
||||
Instance->Timeout--;
|
||||
if (Instance->Timeout == 0) {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The DHCP4 protocol implementation.
|
||||
|
||||
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Function to validate, parse, process the DHCP options.
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
To validate, parse and process the DHCP options.
|
||||
|
||||
Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -22,7 +22,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
#define DHCP_OPTION_MAGIC 0x63538263 // Network byte order
|
||||
#define DHCP_MAX_OPTIONS 256
|
||||
|
||||
|
||||
|
||||
//
|
||||
// DHCP option types, this is used to validate the DHCP options.
|
||||
//
|
||||
|
Reference in New Issue
Block a user