summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authortye1 <tye1@6f19259b-4bc3-4df7-8a09-765794883524>2011-04-21 09:59:53 +0000
committertye1 <tye1@6f19259b-4bc3-4df7-8a09-765794883524>2011-04-21 09:59:53 +0000
commit4da9ccc9e26c7e74d10425b46eae005dc0ecbf24 (patch)
treebc4841403836e2a8d52a46d9cc703086e9b04ce6 /MdeModulePkg
parent0a7294f7a158eb10cad794a296834e14b9d3a655 (diff)
downloadedk2-4da9ccc9e26c7e74d10425b46eae005dc0ecbf24.zip
edk2-4da9ccc9e26c7e74d10425b46eae005dc0ecbf24.tar.gz
edk2-4da9ccc9e26c7e74d10425b46eae005dc0ecbf24.tar.bz2
Fix issue that iscsi initiator name with 223 bytes can not be saved.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11577 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c
index 9155864..fa8f202 100644
--- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c
+++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c
@@ -473,7 +473,7 @@ IScsiFormExtractConfig (
)
{
EFI_STATUS Status;
- CHAR8 InitiatorName[ISCSI_NAME_IFR_MAX_SIZE];
+ CHAR8 InitiatorName[ISCSI_NAME_MAX_SIZE];
UINTN BufferSize;
ISCSI_CONFIG_IFR_NVDATA *IfrNvData;
ISCSI_FORM_CALLBACK_INFO *Private;
@@ -512,7 +512,7 @@ IScsiFormExtractConfig (
IScsiConvertDeviceConfigDataToIfrNvData (Private->Current, IfrNvData);
}
- BufferSize = ISCSI_NAME_IFR_MAX_SIZE;
+ BufferSize = ISCSI_NAME_MAX_SIZE;
Status = gIScsiInitiatorName.Get (&gIScsiInitiatorName, &BufferSize, InitiatorName);
if (EFI_ERROR (Status)) {
IfrNvData->InitiatorName[0] = L'\0';
@@ -666,7 +666,7 @@ IScsiFormCallback (
{
ISCSI_FORM_CALLBACK_INFO *Private;
UINTN BufferSize;
- CHAR8 IScsiName[ISCSI_NAME_IFR_MAX_SIZE];
+ CHAR8 IScsiName[ISCSI_NAME_MAX_SIZE];
CHAR16 PortString[128];
CHAR8 Ip4String[IP4_STR_MAX_SIZE];
CHAR8 LunString[ISCSI_LUN_STR_MAX_LEN];
@@ -704,7 +704,7 @@ IScsiFormCallback (
switch (QuestionId) {
case KEY_INITIATOR_NAME:
IScsiUnicodeStrToAsciiStr (IfrNvData->InitiatorName, IScsiName);
- BufferSize = AsciiStrLen (IScsiName) + 1;
+ BufferSize = AsciiStrSize (IScsiName);
Status = gIScsiInitiatorName.Set (&gIScsiInitiatorName, &BufferSize, IScsiName);
if (EFI_ERROR (Status)) {