Lines Matching refs:Entry
49 VARIABLE_ARRAY_ENTRY *Entry;
65 Entry = mVariableArrayNextFree;
66 CopyGuid (&Entry->VendorGuid, VendorGuid);
67 Entry->Attribute = Attributes;
68 Entry->DataSize = DataSize;
79 return Entry;
84 IN VARIABLE_ARRAY_ENTRY *Entry
91 Size = StrSize ((CHAR16 *)(Entry + 1)) + sizeof (VARIABLE_ARRAY_ENTRY) + Entry->DataSize;
92 Data = ((UINT8 *)Entry) + Size;
94 CopyMem (Entry, Data, (UINTN)mVariableArrayNextFree - (UINTN)Data);
117 VARIABLE_ARRAY_ENTRY *Entry;
121 // by definition first entry is null-terminated string
128 for (Entry = mVariableArray; Entry < mVariableArrayEnd;) {
129 if (CompareGuid (VendorGuid, &Entry->VendorGuid)) {
130 if (StrCmp (VariableName, (CHAR16 *)(Entry + 1))) {
131 Size = StrSize ((CHAR16 *)(Entry + 1));
133 *Data = (VOID *)(((UINT8 *)Entry) + (Size + sizeof (VARIABLE_ARRAY_ENTRY)));
135 return Entry;
139 Size = StrSize ((CHAR16 *)(Entry + 1)) + sizeof (VARIABLE_ARRAY_ENTRY) + Entry->DataSize;
140 Entry = (VARIABLE_ARRAY_ENTRY *)(((UINT8 *)Entry) + Size);
156 VARIABLE_ARRAY_ENTRY *Entry;
165 Entry = GetVariableArrayEntry (VariableName, VendorGuid, &InternalData);
166 if (Entry == NULL) {
170 if (*DataSize < Entry->DataSize) {
171 *DataSize = Entry->DataSize;
175 *DataSize = Entry->DataSize;
177 *Attributes = Entry->Attribute;
192 VARIABLE_ARRAY_ENTRY *Entry;
198 Entry = GetVariableArrayEntry (VariableName, VendorGuid, &InternalData);
199 if (Entry == NULL) {
204 Done = (EfiAtRuntime () && ((Entry->Attribute & EFI_VARIABLE_RUNTIME_ACCESS) == 0)) ? FALSE : TRUE;
207 StringSize = StrSize ((CHAR16 *)(Entry + 1));
208 Entry = (VARIABLE_ARRAY_ENTRY *)(((UINT8 *)Entry) + (StringSize + sizeof (VARIABLE_ARRAY_ENTRY) + Entry->DataSize));
209 if (Entry >= mVariableArrayEnd) {
219 CopyMem (VariableName, (CHAR16 *)(Entry + 1), StringSize);
220 CopyMem (VendorGuid, &Entry->VendorGuid, sizeof (EFI_GUID));
235 VARIABLE_ARRAY_ENTRY *Entry;
242 Entry = GetVariableArrayEntry (VariableName, VendorGuid, &InternalData);
243 if (Entry == NULL) {
247 Entry = AddEntry (VariableName, VendorGuid, Attributes, DataSize, Data);
248 return (Entry == NULL) ? EFI_OUT_OF_RESOURCES : EFI_SUCCESS;
252 DeleteEntry (Entry);
253 } else if (DataSize == Entry->DataSize) {
255 Entry->Attribute |= Attributes;
258 // Grow the entry by deleting and adding back. Don't lose previous Attributes
259 Attributes |= Entry->Attribute;
260 DeleteEntry (Entry);
261 Entry = AddEntry (VariableName, VendorGuid, Attributes, DataSize, Data);
262 return (Entry == NULL) ? EFI_OUT_OF_RESOURCES : EFI_SUCCESS;