+ This code gets the size of name of variable.\r
+\r
+Arguments:\r
+\r
+ Variable Pointer to the Variable Header.\r
+\r
+Returns:\r
+\r
+ UINTN Size of variable in bytes\r
+\r
+--*/\r
+{\r
+ if (Variable->State == (UINT8) (-1) ||\r
+ Variable->DataSize == (UINT32) -1 ||\r
+ Variable->NameSize == (UINT32) -1 ||\r
+ Variable->Attributes == (UINT32) -1) {\r
+ return 0;\r
+ }\r
+ return (UINTN) Variable->NameSize;\r
+}\r
+\r
+UINTN\r
+DataSizeOfVariable (\r
+ IN VARIABLE_HEADER *Variable\r
+ )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+ This code gets the size of name of variable.\r
+\r
+Arguments:\r
+\r
+ Variable Pointer to the Variable Header.\r
+\r
+Returns:\r
+\r
+ UINTN Size of variable in bytes\r
+\r
+--*/\r
+{\r
+ if (Variable->State == (UINT8) -1 ||\r
+ Variable->DataSize == (UINT32) -1 ||\r
+ Variable->NameSize == (UINT32) -1 ||\r
+ Variable->Attributes == (UINT32) -1) {\r
+ return 0;\r
+ }\r
+ return (UINTN) Variable->DataSize;\r
+}\r
+\r
+CHAR16 *\r
+GetVariableNamePtr (\r
+ IN VARIABLE_HEADER *Variable\r
+ )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+ This code gets the pointer to the variable name.\r
+\r
+Arguments:\r
+\r
+ Variable Pointer to the Variable Header.\r
+\r
+Returns:\r
+\r
+ CHAR16* Pointer to Variable Name\r
+\r
+--*/\r
+{\r
+\r
+ return (CHAR16 *) (Variable + 1);\r
+}\r
+\r
+\r
+UINT8 *\r
+GetVariableDataPtr (\r
+ IN VARIABLE_HEADER *Variable\r
+ )\r
+/*++\r
+\r
+Routine Description:\r
+\r
+ This code gets the pointer to the variable data.\r