mirror of https://github.com/acidanthera/audk.git
Clean up Network Components to support GCC build.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4062 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
0c6bbb63f9
commit
67a58d0ffd
|
@ -1188,7 +1188,7 @@ Returns:
|
|||
}
|
||||
}
|
||||
|
||||
if (0x1e >= InquiryData.Peripheral_Type >= 0xa) {
|
||||
if (0x1e >= InquiryData.Peripheral_Type && InquiryData.Peripheral_Type >= 0xa) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
|
@ -346,7 +346,7 @@ DxeIplAddEncapsulatedFirmwareVolumes (
|
|||
PeiServicesFfsGetVolumeInfo (&VolumeHandle, &VolumeInfo);
|
||||
|
||||
PeiPiLibBuildPiFvInfoPpi (
|
||||
(EFI_PHYSICAL_ADDRESS) FvHeader,
|
||||
(EFI_PHYSICAL_ADDRESS) (UINTN) FvHeader,
|
||||
FvHeader->FvLength,
|
||||
&(VolumeInfo.FvName),
|
||||
&(((EFI_FFS_FILE_HEADER*)FileHandle)->Name)
|
||||
|
|
|
@ -142,8 +142,8 @@ PeiFileHandleToVolume (
|
|||
PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (GetPeiServicesTablePointer ());
|
||||
for (Index = 0; Index < PrivateData->FvCount; Index++) {
|
||||
FwVolHeader = PrivateData->Fv[Index].FvHeader;
|
||||
if (((UINT64) FileHandle > (UINT64) FwVolHeader ) && \
|
||||
((UINT64) FileHandle <= ((UINT64) FwVolHeader + FwVolHeader->FvLength - 1))) {
|
||||
if (((UINT64) (UINTN) FileHandle > (UINT64) (UINTN) FwVolHeader ) && \
|
||||
((UINT64) (UINTN) FileHandle <= ((UINT64) (UINTN) FwVolHeader + FwVolHeader->FvLength - 1))) {
|
||||
*VolumeHandle = (EFI_PEI_FV_HANDLE)FwVolHeader;
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ UINT8 mSyslogDstMac [NET_ETHER_ADDR_LEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}
|
|||
UINT32 mSyslogDstIp = 0xffffffff;
|
||||
UINT32 mSyslogSrcIp = 0;
|
||||
|
||||
UINT8 *
|
||||
CHAR8 *
|
||||
MonthName[] = {
|
||||
"Jan",
|
||||
"Feb",
|
||||
|
|
|
@ -559,7 +559,7 @@ EfiDhcp4RenewRebind (
|
|||
DhcpSb->Selected,
|
||||
DhcpSb->Para,
|
||||
DHCP_MSG_REQUEST,
|
||||
"Extra renew/rebind by the application"
|
||||
(UINT8 *) "Extra renew/rebind by the application"
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
|
|
|
@ -756,14 +756,14 @@ DhcpHandleRequest (
|
|||
Message = NULL;
|
||||
|
||||
if (!EFI_IP4_EQUAL (&Head->YourAddr, &Selected->YourAddr)) {
|
||||
Message = "Lease confirmed isn't the same as that in the offer";
|
||||
Message = (UINT8 *) "Lease confirmed isn't the same as that in the offer";
|
||||
goto REJECT;
|
||||
}
|
||||
|
||||
Status = DhcpCallUser (DhcpSb, Dhcp4RcvdAck, Packet, NULL);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
Message = "Lease is denied upon received ACK";
|
||||
Message = (UINT8 *) "Lease is denied upon received ACK";
|
||||
goto REJECT;
|
||||
}
|
||||
|
||||
|
@ -773,7 +773,7 @@ DhcpHandleRequest (
|
|||
Status = DhcpLeaseAcquired (DhcpSb);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
Message = "Lease is denied upon entering bound";
|
||||
Message = (UINT8 *) "Lease is denied upon entering bound";
|
||||
goto REJECT;
|
||||
}
|
||||
|
||||
|
|
|
@ -225,8 +225,8 @@ Ip4ConfigDriverBindingStart (
|
|||
Instance->Controller = ControllerHandle;
|
||||
Instance->Image = This->DriverBindingHandle;
|
||||
|
||||
Instance->Ip4ConfigProtocol = mIp4ConfigProtocolTemplate;
|
||||
Instance->NicIp4Protocol = mNicIp4ConfigProtocolTemplate;
|
||||
CopyMem (&Instance->Ip4ConfigProtocol, &mIp4ConfigProtocolTemplate, sizeof (mIp4ConfigProtocolTemplate));
|
||||
CopyMem (&Instance->NicIp4Protocol, &mNicIp4ConfigProtocolTemplate, sizeof (mNicIp4ConfigProtocolTemplate));
|
||||
|
||||
Instance->State = IP4_CONFIG_STATE_IDLE;
|
||||
Instance->Mnp = Mnp;
|
||||
|
|
|
@ -795,6 +795,8 @@ MnpEnqueuePacket (
|
|||
MNP_GROUP_ADDRESS *GroupAddress;
|
||||
MNP_RXDATA_WRAP *RxDataWrap;
|
||||
|
||||
|
||||
GroupAddress = NULL;
|
||||
//
|
||||
// First, analyse the packet header.
|
||||
//
|
||||
|
|
|
@ -61,7 +61,7 @@ EfiMtftp4GetModeData (
|
|||
Instance = MTFTP4_PROTOCOL_FROM_THIS (This);
|
||||
CopyMem(&ModeData->ConfigData, &Instance->Config, sizeof (Instance->Config));
|
||||
ModeData->SupportedOptionCount = MTFTP4_SUPPORTED_OPTIONS;
|
||||
ModeData->SupportedOptoins = mMtftp4SupportedOptions;
|
||||
ModeData->SupportedOptoins = (UINT8 **) mMtftp4SupportedOptions;
|
||||
ModeData->UnsupportedOptionCount = 0;
|
||||
ModeData->UnsupportedOptoins = NULL;
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ Abstract:
|
|||
|
||||
#include "Mtftp4Impl.h"
|
||||
|
||||
UINT8 *mMtftp4SupportedOptions[MTFTP4_SUPPORTED_OPTIONS] = {
|
||||
CHAR8 *mMtftp4SupportedOptions[MTFTP4_SUPPORTED_OPTIONS] = {
|
||||
"blksize",
|
||||
"timeout",
|
||||
"tsize",
|
||||
|
@ -438,7 +438,7 @@ Mtftp4ParseOption (
|
|||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if (NetStringEqualNoCase (This->OptionStr, "blksize")) {
|
||||
if (NetStringEqualNoCase (This->OptionStr, (UINT8 *) "blksize")) {
|
||||
//
|
||||
// block size option, valid value is between [8, 65464]
|
||||
//
|
||||
|
@ -451,7 +451,7 @@ Mtftp4ParseOption (
|
|||
MtftpOption->BlkSize = (UINT16) Value;
|
||||
MtftpOption->Exist |= MTFTP4_BLKSIZE_EXIST;
|
||||
|
||||
} else if (NetStringEqualNoCase (This->OptionStr, "timeout")) {
|
||||
} else if (NetStringEqualNoCase (This->OptionStr, (UINT8 *) "timeout")) {
|
||||
//
|
||||
// timeout option, valid value is between [1, 255]
|
||||
//
|
||||
|
@ -463,14 +463,14 @@ Mtftp4ParseOption (
|
|||
|
||||
MtftpOption->Timeout = (UINT8) Value;
|
||||
|
||||
} else if (NetStringEqualNoCase (This->OptionStr, "tsize")) {
|
||||
} else if (NetStringEqualNoCase (This->OptionStr, (UINT8 *) "tsize")) {
|
||||
//
|
||||
// tsize option, the biggest transfer supported is 4GB with block size option
|
||||
//
|
||||
MtftpOption->Tsize = NetStringToU32 (This->ValueStr);
|
||||
MtftpOption->Exist |= MTFTP4_TSIZE_EXIST;
|
||||
|
||||
} else if (NetStringEqualNoCase (This->OptionStr, "multicast")) {
|
||||
} else if (NetStringEqualNoCase (This->OptionStr, (UINT8 *) "multicast")) {
|
||||
//
|
||||
// Multicast option, if it is a request, the value must be a zero
|
||||
// length string, otherwise, it is formated like "204.0.0.1,1857,1\0"
|
||||
|
|
|
@ -69,5 +69,5 @@ Mtftp4ParseOptionOack (
|
|||
OUT MTFTP4_OPTION *Option
|
||||
);
|
||||
|
||||
extern UINT8 *mMtftp4SupportedOptions[MTFTP4_SUPPORTED_OPTIONS];
|
||||
extern CHAR8 *mMtftp4SupportedOptions[MTFTP4_SUPPORTED_OPTIONS];
|
||||
#endif
|
||||
|
|
|
@ -172,7 +172,7 @@ Mtftp4RrqSaveBlock (
|
|||
Mtftp4SendError (
|
||||
Instance,
|
||||
EFI_MTFTP4_ERRORCODE_ILLEGAL_OPERATION,
|
||||
"User aborted download"
|
||||
(UINT8 *) "User aborted download"
|
||||
);
|
||||
|
||||
return EFI_ABORTED;
|
||||
|
@ -203,7 +203,7 @@ Mtftp4RrqSaveBlock (
|
|||
Mtftp4SendError (
|
||||
Instance,
|
||||
EFI_MTFTP4_ERRORCODE_DISK_FULL,
|
||||
"User provided memory block is too small"
|
||||
(UINT8 *) "User provided memory block is too small"
|
||||
);
|
||||
|
||||
return EFI_BUFFER_TOO_SMALL;
|
||||
|
@ -480,7 +480,7 @@ Mtftp4RrqHandleOack (
|
|||
Mtftp4SendError (
|
||||
Instance,
|
||||
EFI_MTFTP4_ERRORCODE_ILLEGAL_OPERATION,
|
||||
"Mal-formated OACK packet"
|
||||
(UINT8 *) "Mal-formated OACK packet"
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -501,7 +501,7 @@ Mtftp4RrqHandleOack (
|
|||
Mtftp4SendError (
|
||||
Instance,
|
||||
EFI_MTFTP4_ERRORCODE_ILLEGAL_OPERATION,
|
||||
"Illegal multicast setting"
|
||||
(UINT8 *) "Illegal multicast setting"
|
||||
);
|
||||
|
||||
return EFI_TFTP_ERROR;
|
||||
|
@ -529,7 +529,7 @@ Mtftp4RrqHandleOack (
|
|||
Mtftp4SendError (
|
||||
Instance,
|
||||
EFI_MTFTP4_ERRORCODE_ACCESS_VIOLATION,
|
||||
"Failed to create socket to receive multicast packet"
|
||||
(UINT8 *) "Failed to create socket to receive multicast packet"
|
||||
);
|
||||
|
||||
return Status;
|
||||
|
@ -675,7 +675,7 @@ Mtftp4RrqInput (
|
|||
Mtftp4SendError (
|
||||
Instance,
|
||||
EFI_MTFTP4_ERRORCODE_REQUEST_DENIED,
|
||||
"User aborted the transfer"
|
||||
(UINT8 *) "User aborted the transfer"
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -278,7 +278,7 @@ Mtftp4SendRequest (
|
|||
Mode = Instance->Token->ModeStr;
|
||||
|
||||
if (Mode == NULL) {
|
||||
Mode = "octet";
|
||||
Mode = (UINT8 *) "octet";
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -583,7 +583,7 @@ Mtftp4OnTimerTick (
|
|||
Mtftp4SendError (
|
||||
Instance,
|
||||
EFI_MTFTP4_ERRORCODE_REQUEST_DENIED,
|
||||
"User aborted the transfer in time out"
|
||||
(UINT8 *) "User aborted the transfer in time out"
|
||||
);
|
||||
|
||||
Mtftp4CleanOperation (Instance, EFI_ABORTED);
|
||||
|
|
|
@ -149,7 +149,7 @@ Mtftp4WrqSendBlock (
|
|||
Mtftp4SendError (
|
||||
Instance,
|
||||
EFI_MTFTP4_ERRORCODE_REQUEST_DENIED,
|
||||
"User aborted the transfer"
|
||||
(UINT8 *) "User aborted the transfer"
|
||||
);
|
||||
|
||||
return EFI_ABORTED;
|
||||
|
@ -235,7 +235,7 @@ Mtftp4WrqHandleAck (
|
|||
Mtftp4SendError (
|
||||
Instance,
|
||||
EFI_MTFTP4_ERRORCODE_REQUEST_DENIED,
|
||||
"Block number rolls back, not supported, try blksize option"
|
||||
(UINT8 *) "Block number rolls back, not supported, try blksize option"
|
||||
);
|
||||
|
||||
return EFI_TFTP_ERROR;
|
||||
|
@ -339,7 +339,7 @@ Mtftp4WrqHandleOack (
|
|||
Mtftp4SendError (
|
||||
Instance,
|
||||
EFI_MTFTP4_ERRORCODE_ILLEGAL_OPERATION,
|
||||
"Mal-formated OACK packet"
|
||||
(UINT8 *) "Mal-formated OACK packet"
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -465,7 +465,7 @@ Mtftp4WrqInput (
|
|||
Mtftp4SendError (
|
||||
Instance,
|
||||
EFI_MTFTP4_ERRORCODE_REQUEST_DENIED,
|
||||
"User aborted the transfer"
|
||||
(UINT8 *) "User aborted the transfer"
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -1662,7 +1662,7 @@ IpFilter (
|
|||
Enable = EFI_SIMPLE_NETWORK_RECEIVE_BROADCAST;
|
||||
|
||||
for (Index = 0; Index < Filter->IpCnt; ++Index) {
|
||||
PxebcMode->IpFilter.IpList[Index] = Filter->IpList[Index];
|
||||
CopyMem (&PxebcMode->IpFilter.IpList[Index], &Filter->IpList[Index], sizeof (EFI_IP_ADDRESS));
|
||||
|
||||
if (IS_MULTICAST (&Filter->IpList[Index])) {
|
||||
EFI_IP_ADDRESS *TmpIp;
|
||||
|
@ -1674,7 +1674,7 @@ IpFilter (
|
|||
//
|
||||
if (!Index2)
|
||||
{
|
||||
TmpIp = (EFI_IP_ADDRESS *) &AllSystemsGroup;
|
||||
TmpIp = (EFI_IP_ADDRESS *) &AllSystemsGroup;
|
||||
--Index;
|
||||
} else {
|
||||
TmpIp = (EFI_IP_ADDRESS *) &Filter->IpList[Index];
|
||||
|
@ -2009,8 +2009,8 @@ BcSetStationIP (
|
|||
goto RELEASE_LOCK;
|
||||
}
|
||||
|
||||
PxebcMode->StationIp = *StationIpPtr;
|
||||
PxebcMode->SubnetMask = *SubnetMaskPtr;
|
||||
CopyMem (&PxebcMode->StationIp, StationIpPtr, sizeof (EFI_IP_ADDRESS));
|
||||
CopyMem (&PxebcMode->SubnetMask, SubnetMaskPtr, sizeof (EFI_IP_ADDRESS));
|
||||
Private->GoodStationIp = TRUE;
|
||||
|
||||
RELEASE_LOCK:
|
||||
|
|
|
@ -1101,8 +1101,8 @@ MtftpDownload (
|
|||
|
||||
Filter.Filters = EFI_PXE_BASE_CODE_IP_FILTER_BROADCAST;
|
||||
Filter.IpCnt = 2;
|
||||
Filter.IpList[0] = Private->EfiBc.Mode->StationIp;
|
||||
Filter.IpList[1] = MtftpInfoPtr->MCastIp;
|
||||
CopyMem (&Filter.IpList[0], &Private->EfiBc.Mode->StationIp, sizeof (EFI_IP_ADDRESS));
|
||||
CopyMem (&Filter.IpList[1], &MtftpInfoPtr->MCastIp, sizeof (EFI_IP_ADDRESS));
|
||||
|
||||
if ((Status = IpFilter (Private, &Filter)) != EFI_SUCCESS) {
|
||||
return Status;
|
||||
|
|
|
@ -317,7 +317,7 @@ UdpRead (
|
|||
|
||||
if (DestIpPtr == NULL) {
|
||||
DestIpPtr = &TmpDestIp;
|
||||
TmpDestIp = Private->EfiBc.Mode->StationIp;
|
||||
CopyMem (&TmpDestIp, &Private->EfiBc.Mode->StationIp, sizeof (EFI_IP_ADDRESS));
|
||||
}
|
||||
|
||||
#if SUPPORT_IPV6
|
||||
|
@ -384,7 +384,7 @@ UdpRead (
|
|||
DEBUG (
|
||||
(DEBUG_INFO,
|
||||
"\nUdpRead() Hdrs.Udpv4PseudoHeader == %Xh",
|
||||
Hdrs.Udpv4PseudoHeader)
|
||||
&Hdrs.Udpv4PseudoHeader)
|
||||
);
|
||||
DEBUG (
|
||||
(DEBUG_INFO,
|
||||
|
|
Loading…
Reference in New Issue