Skip to content

Commit

Permalink
Sync patch r15328 from main trunk.
Browse files Browse the repository at this point in the history
Remove ASSERT when failed to Get/Set "AttemptOrder" and "ClientId" variable.
Removes RT attribute for "AttemptOrder?" variable.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <[email protected]>

git-svn-id: https://svn.code.sf.net/p/edk2/code/branches/UDK2010.SR1@15345 6f19259b-4bc3-4df7-8a09-765794883524
  • Loading branch information
vanjeff authored and vanjeff committed Mar 20, 2014
1 parent 2decc0a commit 5a11e17
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 9 deletions.
7 changes: 5 additions & 2 deletions NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @file
Dhcp6 support functions implementation.
Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
Expand Down Expand Up @@ -157,7 +157,10 @@ Dhcp6GenerateClientId (
Duid->Length + 2,
(VOID *) Duid
);
ASSERT_EFI_ERROR (Status);
if (EFI_ERROR (Status)) {
FreePool (Duid);
return NULL;
}

return Duid;
}
Expand Down
9 changes: 4 additions & 5 deletions NetworkPkg/IScsiDxe/IScsiConfig.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @file
Helper functions for configuring or getting the parameters relating to iSCSI.
Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
Expand Down Expand Up @@ -784,7 +784,7 @@ IScsiConvertIfrNvDataToAttemptConfigData (
Status = gRT->SetVariable (
L"AttemptOrder",
&gIScsiConfigGuid,
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,
AttemptConfigOrderSize,
AttemptConfigOrder
);
Expand Down Expand Up @@ -1246,8 +1246,7 @@ IScsiConfigDeleteAttempts (
}
}

Attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS
| EFI_VARIABLE_NON_VOLATILE;
Attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE;

//
// Update AttemptOrder in NVR.
Expand Down Expand Up @@ -1558,7 +1557,7 @@ IScsiConfigOrderAttempts (
Status = gRT->SetVariable (
L"AttemptOrder",
&gIScsiConfigGuid,
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_NON_VOLATILE,
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,
AttemptConfigOrderSize,
AttemptConfigOrderTmp
);
Expand Down
8 changes: 6 additions & 2 deletions NetworkPkg/IScsiDxe/IScsiDriver.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,9 @@ IScsiStart (
&gIScsiConfigGuid,
&AttemptConfigOrderSize
);
ASSERT (AttemptConfigOrder != NULL);
if (AttemptConfigOrder == NULL) {
goto ON_ERROR;
}
for (Index = 0; Index < AttemptConfigOrderSize / sizeof (UINT8); Index++) {
if (AttemptConfigOrder[Index] == mPrivate->BootSelectedIndex ||
AttemptConfigOrder[Index] == BootSelected) {
Expand Down Expand Up @@ -683,7 +685,9 @@ IScsiStart (

goto ON_EXIT;
} else {
ASSERT (AttemptConfigOrder[Index] == BootSelected);
if (AttemptConfigOrder[Index] != BootSelected) {
goto ON_ERROR;
}
mPrivate->BootSelectedIndex = BootSelected;
//
// Clear the resource in ExistPrivate.
Expand Down

0 comments on commit 5a11e17

Please sign in to comment.