mirror of https://github.com/acidanthera/audk.git
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
This commit is contained in:
parent
0a7294f7a1
commit
4da9ccc9e2
|
@ -473,7 +473,7 @@ IScsiFormExtractConfig (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
CHAR8 InitiatorName[ISCSI_NAME_IFR_MAX_SIZE];
|
CHAR8 InitiatorName[ISCSI_NAME_MAX_SIZE];
|
||||||
UINTN BufferSize;
|
UINTN BufferSize;
|
||||||
ISCSI_CONFIG_IFR_NVDATA *IfrNvData;
|
ISCSI_CONFIG_IFR_NVDATA *IfrNvData;
|
||||||
ISCSI_FORM_CALLBACK_INFO *Private;
|
ISCSI_FORM_CALLBACK_INFO *Private;
|
||||||
|
@ -512,7 +512,7 @@ IScsiFormExtractConfig (
|
||||||
IScsiConvertDeviceConfigDataToIfrNvData (Private->Current, IfrNvData);
|
IScsiConvertDeviceConfigDataToIfrNvData (Private->Current, IfrNvData);
|
||||||
}
|
}
|
||||||
|
|
||||||
BufferSize = ISCSI_NAME_IFR_MAX_SIZE;
|
BufferSize = ISCSI_NAME_MAX_SIZE;
|
||||||
Status = gIScsiInitiatorName.Get (&gIScsiInitiatorName, &BufferSize, InitiatorName);
|
Status = gIScsiInitiatorName.Get (&gIScsiInitiatorName, &BufferSize, InitiatorName);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
IfrNvData->InitiatorName[0] = L'\0';
|
IfrNvData->InitiatorName[0] = L'\0';
|
||||||
|
@ -666,7 +666,7 @@ IScsiFormCallback (
|
||||||
{
|
{
|
||||||
ISCSI_FORM_CALLBACK_INFO *Private;
|
ISCSI_FORM_CALLBACK_INFO *Private;
|
||||||
UINTN BufferSize;
|
UINTN BufferSize;
|
||||||
CHAR8 IScsiName[ISCSI_NAME_IFR_MAX_SIZE];
|
CHAR8 IScsiName[ISCSI_NAME_MAX_SIZE];
|
||||||
CHAR16 PortString[128];
|
CHAR16 PortString[128];
|
||||||
CHAR8 Ip4String[IP4_STR_MAX_SIZE];
|
CHAR8 Ip4String[IP4_STR_MAX_SIZE];
|
||||||
CHAR8 LunString[ISCSI_LUN_STR_MAX_LEN];
|
CHAR8 LunString[ISCSI_LUN_STR_MAX_LEN];
|
||||||
|
@ -704,7 +704,7 @@ IScsiFormCallback (
|
||||||
switch (QuestionId) {
|
switch (QuestionId) {
|
||||||
case KEY_INITIATOR_NAME:
|
case KEY_INITIATOR_NAME:
|
||||||
IScsiUnicodeStrToAsciiStr (IfrNvData->InitiatorName, IScsiName);
|
IScsiUnicodeStrToAsciiStr (IfrNvData->InitiatorName, IScsiName);
|
||||||
BufferSize = AsciiStrLen (IScsiName) + 1;
|
BufferSize = AsciiStrSize (IScsiName);
|
||||||
|
|
||||||
Status = gIScsiInitiatorName.Set (&gIScsiInitiatorName, &BufferSize, IScsiName);
|
Status = gIScsiInitiatorName.Set (&gIScsiInitiatorName, &BufferSize, IScsiName);
|
||||||
if (EFI_ERROR (Status)) {
|
if (EFI_ERROR (Status)) {
|
||||||
|
|
Loading…
Reference in New Issue