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:
yshang1
2007-10-09 09:30:52 +00:00
parent 0c6bbb63f9
commit 67a58d0ffd
17 changed files with 40 additions and 38 deletions

View File

@@ -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;

View File

@@ -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"

View File

@@ -69,5 +69,5 @@ Mtftp4ParseOptionOack (
OUT MTFTP4_OPTION *Option
);
extern UINT8 *mMtftp4SupportedOptions[MTFTP4_SUPPORTED_OPTIONS];
extern CHAR8 *mMtftp4SupportedOptions[MTFTP4_SUPPORTED_OPTIONS];
#endif

View File

@@ -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"
);
}

View File

@@ -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);

View File

@@ -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"
);
}