git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7506
6f19259b-4bc3-4df7-8a09-
765794883524
Implement all four UEFI Runtime Variable services for the nonvolatile\r
and volatile storage space and install variable architecture protocol.\r
\r
Implement all four UEFI Runtime Variable services for the nonvolatile\r
and volatile storage space and install variable architecture protocol.\r
\r
-Copyright (c) 2006 - 2008, Intel Corporation \r
+Copyright (c) 2006 - 2009, Intel Corporation \r
All rights reserved. This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
All rights reserved. This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
UINTN Index;\r
\r
if (EfiAtRuntime ()) {\r
UINTN Index;\r
\r
if (EfiAtRuntime ()) {\r
// Don't use the cache at runtime\r
// Don't use the cache at runtime\r
if (StrCmp (VariableName, Entry->Name) == 0) { \r
Entry->Attributes = Attributes;\r
if (DataSize == 0) {\r
if (StrCmp (VariableName, Entry->Name) == 0) { \r
Entry->Attributes = Attributes;\r
if (DataSize == 0) {\r
if (Entry->DataSize != 0) {\r
FreePool (Entry->Data);\r
}\r
if (Entry->DataSize != 0) {\r
FreePool (Entry->Data);\r
}\r
CopyMem (Entry->Data, Data, DataSize);\r
} else {\r
Entry->Data = AllocatePool (DataSize);\r
CopyMem (Entry->Data, Data, DataSize);\r
} else {\r
Entry->Data = AllocatePool (DataSize);\r
+ ASSERT (Entry->Data != NULL);\r
+\r
Entry->DataSize = DataSize;\r
CopyMem (Entry->Data, Data, DataSize);\r
}\r
Entry->DataSize = DataSize;\r
CopyMem (Entry->Data, Data, DataSize);\r
}\r