Revision: 15345
http://sourceforge.net/p/edk2/code/15345
Author: vanjeff
Date: 2014-03-20 03:10:17 +0000 (Thu, 20 Mar 2014)
Log Message:
-----------
Sync patch r15328 from main trunk.
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]>
Revision Links:
--------------
http://sourceforge.net/p/edk2/code/15328
Modified Paths:
--------------
branches/UDK2010.SR1/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c
branches/UDK2010.SR1/NetworkPkg/IScsiDxe/IScsiConfig.c
branches/UDK2010.SR1/NetworkPkg/IScsiDxe/IScsiDriver.c
Modified: branches/UDK2010.SR1/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c
===================================================================
--- branches/UDK2010.SR1/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c 2014-03-20
03:06:54 UTC (rev 15344)
+++ branches/UDK2010.SR1/NetworkPkg/Dhcp6Dxe/Dhcp6Utility.c 2014-03-20
03:10:17 UTC (rev 15345)
@@ -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
@@ -157,7 +157,10 @@
Duid->Length + 2,
(VOID *) Duid
);
- ASSERT_EFI_ERROR (Status);
+ if (EFI_ERROR (Status)) {
+ FreePool (Duid);
+ return NULL;
+ }
return Duid;
}
Modified: branches/UDK2010.SR1/NetworkPkg/IScsiDxe/IScsiConfig.c
===================================================================
--- branches/UDK2010.SR1/NetworkPkg/IScsiDxe/IScsiConfig.c 2014-03-20
03:06:54 UTC (rev 15344)
+++ branches/UDK2010.SR1/NetworkPkg/IScsiDxe/IScsiConfig.c 2014-03-20
03:10:17 UTC (rev 15345)
@@ -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
@@ -784,7 +784,7 @@
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
);
@@ -1246,8 +1246,7 @@
}
}
- 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.
@@ -1558,7 +1557,7 @@
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
);
Modified: branches/UDK2010.SR1/NetworkPkg/IScsiDxe/IScsiDriver.c
===================================================================
--- branches/UDK2010.SR1/NetworkPkg/IScsiDxe/IScsiDriver.c 2014-03-20
03:06:54 UTC (rev 15344)
+++ branches/UDK2010.SR1/NetworkPkg/IScsiDxe/IScsiDriver.c 2014-03-20
03:10:17 UTC (rev 15345)
@@ -645,7 +645,9 @@
&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) {
@@ -683,7 +685,9 @@
goto ON_EXIT;
} else {
- ASSERT (AttemptConfigOrder[Index] == BootSelected);
+ if (AttemptConfigOrder[Index] != BootSelected) {
+ goto ON_ERROR;
+ }
mPrivate->BootSelectedIndex = BootSelected;
//
// Clear the resource in ExistPrivate.
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits