diff options
author | eric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-01-04 05:51:44 +0000 |
---|---|---|
committer | eric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524> | 2008-01-04 05:51:44 +0000 |
commit | 07a7038c78349a6f06a52ca8a636dbb6bb8ee79b (patch) | |
tree | b408349041280bc2e1f553b9aa5bbd785be1f993 | |
parent | 900faff93e3a106b5d7aec031307e7f35d79135f (diff) | |
download | edk2-platforms-07a7038c78349a6f06a52ca8a636dbb6bb8ee79b.tar.xz |
update for passing the ICC compiler
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4498 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r-- | MdeModulePkg/Universal/iScsi/IScsiCHAP.c | 8 | ||||
-rw-r--r-- | MdeModulePkg/Universal/iScsi/IScsiConfig.h | 7 | ||||
-rw-r--r-- | MdeModulePkg/Universal/iScsi/IScsiDhcp.c | 6 | ||||
-rw-r--r-- | MdeModulePkg/Universal/iScsi/IScsiDhcp.h | 4 | ||||
-rw-r--r-- | MdeModulePkg/Universal/iScsi/IScsiIbft.c | 18 | ||||
-rw-r--r-- | MdeModulePkg/Universal/iScsi/IScsiImpl.h | 12 | ||||
-rw-r--r-- | MdeModulePkg/Universal/iScsi/IScsiMisc.c | 22 | ||||
-rw-r--r-- | MdeModulePkg/Universal/iScsi/IScsiMisc.h | 4 | ||||
-rw-r--r-- | MdeModulePkg/Universal/iScsi/IScsiProto.c | 32 | ||||
-rw-r--r-- | MdeModulePkg/Universal/iScsi/IScsiProto.h | 10 |
10 files changed, 57 insertions, 66 deletions
diff --git a/MdeModulePkg/Universal/iScsi/IScsiCHAP.c b/MdeModulePkg/Universal/iScsi/IScsiCHAP.c index e6ea8b5400..6f4b170a60 100644 --- a/MdeModulePkg/Universal/iScsi/IScsiCHAP.c +++ b/MdeModulePkg/Universal/iScsi/IScsiCHAP.c @@ -119,7 +119,6 @@ Returns: {
EFI_STATUS Status;
ISCSI_SESSION *Session;
- ISCSI_SESSION_CONFIG_DATA *ConfigData;
ISCSI_CHAP_AUTH_DATA *AuthData;
CHAR8 *Value;
UINT8 *Data;
@@ -137,7 +136,6 @@ Returns: ASSERT (Conn->RspQue.BufNum != 0);
Session = Conn->Session;
- ConfigData = &Session->ConfigData;
AuthData = &Session->AuthData;
Len = Conn->RspQue.BufSize;
@@ -153,7 +151,7 @@ Returns: //
// Build the key-value list from the data segment of the Login Response.
//
- KeyValueList = IScsiBuildKeyValueList (Data, Len);
+ KeyValueList = IScsiBuildKeyValueList ((CHAR8*)Data, Len);
if (KeyValueList == NULL) {
Status = EFI_OUT_OF_RESOURCES;
goto ON_EXIT;
@@ -319,7 +317,6 @@ Returns: EFI_STATUS Status;
ISCSI_SESSION *Session;
ISCSI_LOGIN_REQUEST *LoginReq;
- ISCSI_SESSION_CONFIG_DATA *ConfigData;
ISCSI_CHAP_AUTH_DATA *AuthData;
CHAR8 *Value;
CHAR8 ValueStr[256];
@@ -331,7 +328,6 @@ Returns: ASSERT (Conn->CurrentStage == ISCSI_SECURITY_NEGOTIATION);
Session = Conn->Session;
- ConfigData = &Session->ConfigData;
AuthData = &Session->AuthData;
LoginReq = (ISCSI_LOGIN_REQUEST *) NetbufGetByte (Pdu, 0, 0);
Status = EFI_SUCCESS;
@@ -387,7 +383,7 @@ Returns: //
// CHAP_N=<N>
//
- IScsiAddKeyValuePair (Pdu, ISCSI_KEY_CHAP_NAME, (UINT8 *) &AuthData->AuthConfig.CHAPName);
+ IScsiAddKeyValuePair (Pdu, ISCSI_KEY_CHAP_NAME, (CHAR8 *) &AuthData->AuthConfig.CHAPName);
//
// CHAP_R=<R>
//
diff --git a/MdeModulePkg/Universal/iScsi/IScsiConfig.h b/MdeModulePkg/Universal/iScsi/IScsiConfig.h index e5c528e08c..726b7a2f71 100644 --- a/MdeModulePkg/Universal/iScsi/IScsiConfig.h +++ b/MdeModulePkg/Universal/iScsi/IScsiConfig.h @@ -21,19 +21,12 @@ Abstract: #ifndef _ISCSI_CONFIG_H_
#define _ISCSI_CONFIG_H_
-//#include "Tiano.h"
-//#include "EfiDriverLib.h"
-//#include "Base.h"
#include <Library/FrameworkHiiLib.h>
#include <Protocol/FrameworkFormBrowser.h>
#include <Protocol/FrameworkFormCallback.h>
#include <Library/FrameworkIfrSupportLib.h>
#include <Library/DebugLib.h>
#include <Library/BaseLib.h>
-//#include "EfiPrintLib.h"
-//#include EFI_PROTOCOL_DEFINITION (Hii)
-//#include EFI_PROTOCOL_DEFINITION (FormBrowser)
-//#include EFI_PROTOCOL_DEFINITION (FormCallback)
#include <Library/NetLib.h>
#include "IScsiConfigNVDataStruc.h"
diff --git a/MdeModulePkg/Universal/iScsi/IScsiDhcp.c b/MdeModulePkg/Universal/iScsi/IScsiDhcp.c index b9b8cea8ab..145483b0e7 100644 --- a/MdeModulePkg/Universal/iScsi/IScsiDhcp.c +++ b/MdeModulePkg/Universal/iScsi/IScsiDhcp.c @@ -230,9 +230,9 @@ Returns: Status = This->Parse (This, Packet, &OptionCount, NULL);
if (Status != EFI_BUFFER_TOO_SMALL) {
-
return EFI_NOT_READY;
+ return EFI_NOT_READY;
}
-
+
OptionList = NetAllocatePool (OptionCount * sizeof (EFI_DHCP4_PACKET_OPTION *));
if (OptionList == NULL) {
return EFI_NOT_READY;
@@ -437,7 +437,7 @@ Returns: // Ask the server to reply with Netmask, Router, DNS and RootPath options.
//
ParaList->OpCode = DHCP4_TAG_PARA_LIST;
- ParaList->Length = ConfigData->NvData.TargetInfoFromDhcp ? 4 : 3;
+ ParaList->Length = (UINT8)(ConfigData->NvData.TargetInfoFromDhcp ? 4 : 3);
ParaList->Data[0] = DHCP4_TAG_NETMASK;
ParaList->Data[1] = DHCP4_TAG_ROUTER;
ParaList->Data[2] = DHCP4_TAG_DNS;
diff --git a/MdeModulePkg/Universal/iScsi/IScsiDhcp.h b/MdeModulePkg/Universal/iScsi/IScsiDhcp.h index 9312b547bd..f70aebd26e 100644 --- a/MdeModulePkg/Universal/iScsi/IScsiDhcp.h +++ b/MdeModulePkg/Universal/iScsi/IScsiDhcp.h @@ -20,9 +20,7 @@ Abstract: #ifndef _ISCSI_DHCP_H_
#define _ISCSI_DHCP_H_
-//#include "Tiano.h"
-//#include EFI_PROTOCOL_CONSUMER (Dhcp4)
-#include "protocol\Dhcp4.h"
+#include <Protocol/Dhcp4.h>
#define DHCP4_TAG_PARA_LIST 55
#define DHCP4_TAG_NETMASK 1
diff --git a/MdeModulePkg/Universal/iScsi/IScsiIbft.c b/MdeModulePkg/Universal/iScsi/IScsiIbft.c index e5d6324727..bf68be6a37 100644 --- a/MdeModulePkg/Universal/iScsi/IScsiIbft.c +++ b/MdeModulePkg/Universal/iScsi/IScsiIbft.c @@ -101,7 +101,7 @@ Returns: // Need expand the control section if more than 2 NIC/Target sections
// exist.
//
- Control->Header.Length += (UINT16) (NumOffset - 4) * sizeof (UINT16);
+ Control->Header.Length = (UINT16)(Control->Header.Length + (NumOffset - 4) * sizeof (UINT16));
}
}
@@ -191,7 +191,7 @@ Returns: //
// Get the identifier from the handle.
//
- Status = gBS->HandleProtocol (Handle, &mIScsiPrivateGuid, &IScsiIdentifier);
+ Status = gBS->HandleProtocol (Handle, &mIScsiPrivateGuid, (void **)&IScsiIdentifier);
if (EFI_ERROR (Status)) {
ASSERT (FALSE);
return ;
@@ -278,7 +278,7 @@ Returns: Status = gBS->HandleProtocol (
Controller,
&gEfiDevicePathProtocolGuid,
- &DevicePath
+ (void **)&DevicePath
);
if (EFI_ERROR (Status)) {
return 0;
@@ -293,7 +293,7 @@ Returns: return 0;
}
- Status = gBS->HandleProtocol (PciIoHandle, &gEfiPciIoProtocolGuid, &PciIo);
+ Status = gBS->HandleProtocol (PciIoHandle, &gEfiPciIoProtocolGuid, (void **)&PciIo);
if (EFI_ERROR (Status)) {
return 0;
}
@@ -333,7 +333,7 @@ Returns: Status = gBS->HandleProtocol (
Controller,
&gEfiSimpleNetworkProtocolGuid,
- &Snp
+ (void **)&Snp
);
ASSERT_EFI_ERROR (Status);
@@ -392,7 +392,7 @@ Returns: SectionOffset = &Control->NIC0Offset;
for (Index = 0; Index < HandleCount; Index++) {
- Status = gBS->HandleProtocol (Handles[Index], &mIScsiPrivateGuid, &IScsiIdentifier);
+ Status = gBS->HandleProtocol (Handles[Index], &mIScsiPrivateGuid, (void **)&IScsiIdentifier);
if (EFI_ERROR (Status)) {
ASSERT (FALSE);
return ;
@@ -552,7 +552,7 @@ Returns: EFI_ACPI_TABLE_VERSION Version;
UINT32 Signature;
- Status = gBS->LocateProtocol (&gEfiAcpiSupportProtocolGuid, NULL, &AcpiSupport);
+ Status = gBS->LocateProtocol (&gEfiAcpiSupportProtocolGuid, NULL, (void **)&AcpiSupport);
if (EFI_ERROR (Status)) {
return ;
}
@@ -563,7 +563,7 @@ Returns: Status = AcpiSupport->GetAcpiTable (
AcpiSupport,
Index,
- &Table,
+ (void **)&Table,
&Version,
&TableHandle
);
@@ -613,7 +613,7 @@ Returns: return ;
}
- Heap = (CHAR8 *) Table + IBFT_HEAP_OFFSET;
+ Heap = (UINT8 *) Table + IBFT_HEAP_OFFSET;
//
// Fill in the various section of the iSCSI Boot Firmware Table.
diff --git a/MdeModulePkg/Universal/iScsi/IScsiImpl.h b/MdeModulePkg/Universal/iScsi/IScsiImpl.h index 715f814882..535bc8461e 100644 --- a/MdeModulePkg/Universal/iScsi/IScsiImpl.h +++ b/MdeModulePkg/Universal/iScsi/IScsiImpl.h @@ -37,7 +37,7 @@ Abstract: #define ISCSI_SESSION_SIGNATURE EFI_SIGNATURE_32 ('I', 'S', 'S', 'N')
-typedef struct _ISCSI_SESSION {
+struct _ISCSI_SESSION {
UINT32 Signature;
ISCSI_SESSION_CONFIG_DATA ConfigData;
@@ -77,11 +77,11 @@ typedef struct _ISCSI_SESSION { BOOLEAN DataPDUInOrder;
BOOLEAN DataSequenceInOrder;
UINT8 ErrorRecoveryLevel;
-} ISCSI_SESSION;
+};
#define ISCSI_CONNECTION_SIGNATURE EFI_SIGNATURE_32 ('I', 'S', 'C', 'N')
-typedef struct _ISCSI_CONNECTION {
+struct _ISCSI_CONNECTION {
UINT32 Signature;
NET_LIST_ENTRY Link;
@@ -116,7 +116,7 @@ typedef struct _ISCSI_CONNECTION { UINT32 MaxRecvDataSegmentLength;
ISCSI_DIGEST_TYPE HeaderDigest;
ISCSI_DIGEST_TYPE DataDigest;
-} ISCSI_CONNECTION;
+};
#define ISCSI_DRIVER_DATA_SIGNATURE EFI_SIGNATURE_32 ('I', 'S', 'D', 'A')
@@ -142,7 +142,7 @@ typedef struct _ISCSI_CONNECTION { ISCSI_DRIVER_DATA_SIGNATURE \
)
-typedef struct _ISCSI_DRIVER_DATA {
+struct _ISCSI_DRIVER_DATA {
UINT32 Signature;
EFI_HANDLE Image;
EFI_HANDLE Controller;
@@ -156,6 +156,6 @@ typedef struct _ISCSI_DRIVER_DATA { EFI_DEVICE_PATH_PROTOCOL *DevicePath;
ISCSI_SESSION Session;
-} ISCSI_DRIVER_DATA;
+};
#endif
diff --git a/MdeModulePkg/Universal/iScsi/IScsiMisc.c b/MdeModulePkg/Universal/iScsi/IScsiMisc.c index 0347d32042..214af74697 100644 --- a/MdeModulePkg/Universal/iScsi/IScsiMisc.c +++ b/MdeModulePkg/Universal/iScsi/IScsiMisc.c @@ -167,7 +167,7 @@ Returns: Len++;
}
- return 32 - Len;
+ return (UINT8)(32 - Len);
}
EFI_STATUS
@@ -196,6 +196,7 @@ Returns: UINT32 Index;
CHAR8 *LunUnitStr[4];
CHAR8 Digit;
+ UINTN Temp;
NetZeroMem (Lun, 8);
NetZeroMem (LunUnitStr, sizeof (LunUnitStr));
@@ -203,7 +204,7 @@ Returns: Index = 0;
LunUnitStr[0] = Str;
- if (!IsHexDigit (&Digit, *Str)) {
+ if (!IsHexDigit ((UINT8 *)&Digit, *Str)) {
return EFI_INVALID_PARAMETER;
}
@@ -219,13 +220,13 @@ Returns: Index++;
if (*(Str + 1) != '\0') {
- if (!IsHexDigit (&Digit, *(Str + 1))) {
+ if (!IsHexDigit ((UINT8 *)&Digit, *(Str + 1))) {
return EFI_INVALID_PARAMETER;
}
LunUnitStr[Index] = Str + 1;
}
- } else if (!IsHexDigit (&Digit, *Str)) {
+ } else if (!IsHexDigit ((UINT8 *)&Digit, *Str)) {
return EFI_INVALID_PARAMETER;
}
@@ -237,7 +238,8 @@ Returns: return EFI_INVALID_PARAMETER;
}
- *((UINT16 *) &Lun[Index * 2]) = HTONS (AsciiStrHexToUintn (LunUnitStr[Index]));
+ Temp = AsciiStrHexToUintn (LunUnitStr[Index]);
+ *((UINT16 *) &Lun[Index * 2]) = HTONS (Temp);
}
return EFI_SUCCESS;
@@ -470,7 +472,7 @@ Returns: UINT32 Index;
for (Index = 0; Index < Len; Index++) {
- Str[3 * Index] = NibbleToHexChar (Mac->Addr[Index] >> 4);
+ Str[3 * Index] = NibbleToHexChar ((UINT8)(Mac->Addr[Index] >> 4));
Str[3 * Index + 1] = NibbleToHexChar (Mac->Addr[Index]);
Str[3 * Index + 2] = L'-';
}
@@ -600,7 +602,7 @@ Returns: } else {
Byte = BinBuffer[*BinLength - 1 - Index / 2];
Byte &= 0x0F;
- Byte |= Digit << 4;
+ Byte = (UINT8)(Byte | (Digit << 4));
}
BinBuffer[*BinLength - 1 - Index / 2] = Byte;
@@ -809,7 +811,7 @@ Returns: Status = gBS->HandleProtocol (
Private->Controller,
&gEfiSimpleNetworkProtocolGuid,
- &Snp
+ (void **)&Snp
);
if (EFI_ERROR (Status)) {
return Status;
@@ -905,7 +907,7 @@ Returns: Status = gBS->HandleProtocol (
Tcp4Io->Handle,
&gEfiDevicePathProtocolGuid,
- &DevicePath
+ (void **)&DevicePath
);
if (EFI_ERROR (Status)) {
return NULL;
@@ -923,7 +925,7 @@ Returns: ) {
DPathNode->Ipv4.LocalPort = 0;
- DPathNode->Ipv4.StaticIpAddress = !Session->ConfigData.NvData.InitiatorInfoFromDhcp;
+ DPathNode->Ipv4.StaticIpAddress = (BOOLEAN)(!Session->ConfigData.NvData.InitiatorInfoFromDhcp);
break;
}
diff --git a/MdeModulePkg/Universal/iScsi/IScsiMisc.h b/MdeModulePkg/Universal/iScsi/IScsiMisc.h index 33c51841a4..1f98a8e220 100644 --- a/MdeModulePkg/Universal/iScsi/IScsiMisc.h +++ b/MdeModulePkg/Universal/iScsi/IScsiMisc.h @@ -39,13 +39,13 @@ typedef struct _ISCSI_SESSION_CONFIG_NVDATA { } ISCSI_SESSION_CONFIG_NVDATA;
#pragma pack()
-typedef struct _ISCSI_SESSION_CONFIG_DATA {
+struct _ISCSI_SESSION_CONFIG_DATA {
ISCSI_SESSION_CONFIG_NVDATA NvData;
EFI_IPv4_ADDRESS PrimaryDns;
EFI_IPv4_ADDRESS SecondaryDns;
EFI_IPv4_ADDRESS DhcpServer;
-} ISCSI_SESSION_CONFIG_DATA;
+};
UINT8
IScsiGetSubnetMaskPrefixLength (
diff --git a/MdeModulePkg/Universal/iScsi/IScsiProto.c b/MdeModulePkg/Universal/iScsi/IScsiProto.c index 4cef3dc45d..fa1c7d6c1b 100644 --- a/MdeModulePkg/Universal/iScsi/IScsiProto.c +++ b/MdeModulePkg/Universal/iScsi/IScsiProto.c @@ -546,7 +546,7 @@ Returns: //
// Allocate the space for the key-value pair.
//
- Data = NetbufAllocSpace (Pdu, TotalLen, NET_BUF_TAIL);
+ Data = (CHAR8 *) NetbufAllocSpace (Pdu, TotalLen, NET_BUF_TAIL);
if (Data == NULL) {
return EFI_OUT_OF_RESOURCES;
}
@@ -668,7 +668,7 @@ Returns: //
// Check whether we will issue the stage transition signal?
//
- Conn->TransitInitiated = ISCSI_FLAG_ON (LoginReq, ISCSI_LOGIN_REQ_PDU_FLAG_TRANSIT);
+ Conn->TransitInitiated = (BOOLEAN)ISCSI_FLAG_ON (LoginReq, ISCSI_LOGIN_REQ_PDU_FLAG_TRANSIT);
}
return Nbuf;
@@ -746,7 +746,7 @@ Returns: // Process the TargetAddress key-value strings in the data segment to update the
// target address info.
//
- Status = IScsiUpdateTargetAddress (Session, DataSeg, DataSegLen);
+ Status = IScsiUpdateTargetAddress (Session, (CHAR8 *)DataSeg, DataSegLen);
if (EFI_ERROR (Status)) {
return Status;
}
@@ -765,11 +765,11 @@ Returns: //
// The status is sucess, extract the wanted fields from the header segment.
//
- Transit = ISCSI_FLAG_ON (LoginRsp, ISCSI_LOGIN_RSP_PDU_FLAG_TRANSIT);
- Continue = ISCSI_FLAG_ON (LoginRsp, ISCSI_LOGIN_RSP_PDU_FLAG_CONTINUE);
+ Transit = (BOOLEAN)ISCSI_FLAG_ON (LoginRsp, ISCSI_LOGIN_RSP_PDU_FLAG_TRANSIT);
+ Continue = (BOOLEAN)ISCSI_FLAG_ON (LoginRsp, ISCSI_LOGIN_RSP_PDU_FLAG_CONTINUE);
- CurrentStage = ISCSI_GET_CURRENT_STAGE (LoginRsp);
- NextStage = ISCSI_GET_NEXT_STAGE (LoginRsp);
+ CurrentStage = (UINT8)ISCSI_GET_CURRENT_STAGE (LoginRsp);
+ NextStage = (UINT8)ISCSI_GET_NEXT_STAGE (LoginRsp);
LoginRsp->InitiatorTaskTag = NTOHL (LoginRsp->InitiatorTaskTag);
@@ -1283,7 +1283,7 @@ Returns: return EFI_OUT_OF_RESOURCES;
}
- NetbufQueCopy (&Conn->RspQue, 0, Len, Data);
+ NetbufQueCopy (&Conn->RspQue, 0, Len, (UINT8 *)Data);
Status = EFI_PROTOCOL_ERROR;
@@ -1352,7 +1352,7 @@ Returns: goto ON_ERROR;
}
- Session->InitialR2T = Session->InitialR2T || (BOOLEAN) (AsciiStrCmp (Value, "Yes") == 0);
+ Session->InitialR2T = (BOOLEAN)(Session->InitialR2T || (AsciiStrCmp (Value, "Yes") == 0));
//
// ImmediateData, result function is AND.
@@ -1362,7 +1362,7 @@ Returns: goto ON_ERROR;
}
- Session->ImmediateData = Session->ImmediateData && (BOOLEAN) (AsciiStrCmp (Value, "Yes") == 0);
+ Session->ImmediateData = (BOOLEAN)(Session->ImmediateData && (AsciiStrCmp (Value, "Yes") == 0));
//
// MaxRecvDataSegmentLength, result function is Mininum.
@@ -1422,7 +1422,7 @@ Returns: goto ON_ERROR;
}
- Session->DataPDUInOrder = Session->DataPDUInOrder || (BOOLEAN) (AsciiStrCmp (Value, "Yes") == 0);
+ Session->DataPDUInOrder = (BOOLEAN)(Session->DataPDUInOrder || (AsciiStrCmp (Value, "Yes") == 0));
//
// DataSequenceInorder, result function is OR.
@@ -1432,7 +1432,7 @@ Returns: goto ON_ERROR;
}
- Session->DataSequenceInOrder = Session->DataSequenceInOrder || (BOOLEAN) (AsciiStrCmp (Value, "Yes") == 0);
+ Session->DataSequenceInOrder = (BOOLEAN)(Session->DataSequenceInOrder || (AsciiStrCmp (Value, "Yes") == 0));
//
// DefaultTime2Wait, result function is Maximum.
@@ -1799,7 +1799,7 @@ Returns: //
// Convert the upper-case characters to lower-case ones
//
- Name[Index] = Name[Index] - 'A' + 'a';
+ Name[Index] = (CHAR8)(Name[Index] - 'A' + 'a');
}
if (!NET_IS_LOWER_CASE_CHAR (Name[Index]) &&
@@ -2048,7 +2048,7 @@ Returns: //
// The CDB exceeds 16 bytes, an extended CDB AHS is required.
//
- AHSLength += ISCSI_ROUNDUP (Packet->CdbLength - 16) + sizeof (ISCSI_ADDITIONAL_HEADER);
+ AHSLength = (UINT8)(AHSLength + (ISCSI_ROUNDUP (Packet->CdbLength - 16) + sizeof (ISCSI_ADDITIONAL_HEADER)));
}
Length = sizeof (SCSI_COMMAND) + AHSLength;
@@ -2769,6 +2769,7 @@ Returns: UINT8 *Data;
ISCSI_IN_BUFFER_CONTEXT InBufferContext;
UINT64 Timeout;
+ UINT8 *Buffer;
Private = ISCSI_DRIVER_DATA_FROM_EXT_SCSI_PASS_THRU (PassThru);
Session = &Private->Session;
@@ -2814,7 +2815,8 @@ Returns: }
XferContext = &Tcb->XferContext;
- XferContext->Offset = ISCSI_GET_DATASEG_LEN (NetbufGetByte (Pdu, 0, NULL));
+ Buffer = NetbufGetByte (Pdu, 0, NULL);
+ XferContext->Offset = ISCSI_GET_DATASEG_LEN (Buffer);
//
// Transmit the SCSI Command PDU.
diff --git a/MdeModulePkg/Universal/iScsi/IScsiProto.h b/MdeModulePkg/Universal/iScsi/IScsiProto.h index 59608fcec7..d47a5b5679 100644 --- a/MdeModulePkg/Universal/iScsi/IScsiProto.h +++ b/MdeModulePkg/Universal/iScsi/IScsiProto.h @@ -119,8 +119,8 @@ typedef enum { #define ISCSI_IMMEDIATE_ON(PduHdr) ((PduHdr)->OpCode & ISCSI_REQ_IMMEDIATE)
#define ISCSI_SET_FLAG(PduHdr, Flag) (((ISCSI_BASIC_HEADER *) (PduHdr))->Flags |= (Flag))
#define ISCSI_CLEAR_FLAG(PduHdr, Flag) (((ISCSI_BASIC_HEADER *) (PduHdr))->Flags &= ~(Flag))
-#define ISCSI_FLAG_ON(PduHdr, Flag) ((((ISCSI_BASIC_HEADER *) (PduHdr))->Flags & (Flag)) == (Flag))
-#define ISCSI_SET_STAGES(PduHdr, Cur, Nxt) ((PduHdr)->Flags |= ((Cur) << 2 | (Nxt)))
+#define ISCSI_FLAG_ON(PduHdr, Flag) ((((ISCSI_BASIC_HEADER *) (PduHdr))->Flags & (Flag)) == (BOOLEAN)(Flag))
+#define ISCSI_SET_STAGES(PduHdr, Cur, Nxt) ((PduHdr)->Flags = (UINT8)(((PduHdr)->Flags)|(((Cur) << 2) | (Nxt))))
#define ISCSI_GET_CURRENT_STAGE(PduHdr) (((PduHdr)->Flags >> 2) & 0x3)
#define ISCSI_GET_NEXT_STAGE(PduHdr) (((PduHdr)->Flags) & 0x3)
@@ -129,9 +129,9 @@ typedef enum { #define HTON24(Dst, Src) \
do { \
- (Dst)[0] = (UINT8) ((Src) >> 16) & 0xFF; \
- (Dst)[1] = (UINT8) ((Src) >> 8) & 0xFF; \
- (Dst)[2] = (UINT8) (Src) & 0xFF; \
+ (Dst)[0] = (UINT8)(((Src) >> 16) & 0xFF); \
+ (Dst)[1] = (UINT8)(((Src) >> 8) & 0xFF); \
+ (Dst)[2] = (UINT8)((Src) & 0xFF); \
} while (0);
#define NTOH24(src) (((src)[0] << 16) | ((src)[1] << 8) | ((src)[2]))
|