TianoCore EDK2 master
Loading...
Searching...
No Matches
ShellEnvVar.h
Go to the documentation of this file.
1
14#ifndef _SHELL_ENVIRONMENT_VARIABLE_HEADER_
15#define _SHELL_ENVIRONMENT_VARIABLE_HEADER_
16
17typedef struct {
18 LIST_ENTRY Link;
19 CHAR16 *Key;
20 CHAR16 *Val;
21 UINT32 Atts;
23
24//
25// The list is used to cache the environment variables.
26//
27extern ENV_VAR_LIST gShellEnvVarList;
28
40 IN CONST CHAR16 *EnvVarName,
41 OUT BOOLEAN *Volatile
42 );
43
55#define SHELL_DELETE_ENVIRONMENT_VARIABLE(EnvVarName) \
56 (gRT->SetVariable((CHAR16*)EnvVarName, \
57 &gShellVariableGuid, \
58 0, \
59 0, \
60 NULL))
61
75#define SHELL_SET_ENVIRONMENT_VARIABLE_NV(EnvVarName, BufferSize, Buffer) \
76 (gRT->SetVariable((CHAR16*)EnvVarName, \
77 &gShellVariableGuid, \
78 EFI_VARIABLE_NON_VOLATILE|EFI_VARIABLE_BOOTSERVICE_ACCESS, \
79 BufferSize, \
80 (VOID*)Buffer))
81
95#define SHELL_GET_ENVIRONMENT_VARIABLE(EnvVarName, BufferSize, Buffer) \
96 (gRT->GetVariable((CHAR16*)EnvVarName, \
97 &gShellVariableGuid, \
98 0, \
99 BufferSize, \
100 Buffer))
101
116#define SHELL_GET_ENVIRONMENT_VARIABLE_AND_ATTRIBUTES(EnvVarName, Atts, BufferSize, Buffer) \
117 (gRT->GetVariable((CHAR16*)EnvVarName, \
118 &gShellVariableGuid, \
119 Atts, \
120 BufferSize, \
121 Buffer))
122
136#define SHELL_SET_ENVIRONMENT_VARIABLE_V(EnvVarName, BufferSize, Buffer) \
137 (gRT->SetVariable((CHAR16*)EnvVarName, \
138 &gShellVariableGuid, \
139 EFI_VARIABLE_BOOTSERVICE_ACCESS, \
140 BufferSize, \
141 (VOID*)Buffer))
142
153 IN OUT LIST_ENTRY *List
154 );
155
170 IN LIST_ENTRY *List
171 );
172
190 IN CONST CHAR16 **Environment
191 );
192
198VOID
200 IN LIST_ENTRY *List
201 );
202
220 IN CONST CHAR16 *Key,
221 OUT CHAR16 **Value,
222 OUT UINTN *ValueSize,
223 OUT UINT32 *Atts OPTIONAL
224 );
225
241 IN CONST CHAR16 *Key,
242 IN CONST CHAR16 *Value,
243 IN UINTN ValueSize,
244 IN UINT32 Atts
245 );
246
258 IN CONST CHAR16 *Key
259 );
260
268 VOID
269 );
270
275VOID
277 VOID
278 );
279
280#endif //_SHELL_ENVIRONMENT_VARIABLE_HEADER_
UINT64 UINTN
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_STATUS ShellFindEnvVarInList(IN CONST CHAR16 *Key, OUT CHAR16 **Value, OUT UINTN *ValueSize, OUT UINT32 *Atts OPTIONAL)
Definition: ShellEnvVar.c:426
EFI_STATUS SetEnvironmentVariableList(IN LIST_ENTRY *List)
Definition: ShellEnvVar.c:254
EFI_STATUS GetEnvironmentVariableList(IN OUT LIST_ENTRY *List)
Definition: ShellEnvVar.c:134
EFI_STATUS ShellInitEnvVarList(VOID)
Definition: ShellEnvVar.c:576
EFI_STATUS IsVolatileEnv(IN CONST CHAR16 *EnvVarName, OUT BOOLEAN *Volatile)
Definition: ShellEnvVar.c:29
EFI_STATUS ShellAddEnvVarToList(IN CONST CHAR16 *Key, IN CONST CHAR16 *Value, IN UINTN ValueSize, IN UINT32 Atts)
Definition: ShellEnvVar.c:472
EFI_STATUS ShellRemvoeEnvVarFromList(IN CONST CHAR16 *Key)
Definition: ShellEnvVar.c:543
VOID FreeEnvironmentVariableList(IN LIST_ENTRY *List)
Definition: ShellEnvVar.c:95
VOID ShellFreeEnvVarList(VOID)
Definition: ShellEnvVar.c:593
EFI_STATUS SetEnvironmentVariables(IN CONST CHAR16 **Environment)
Definition: ShellEnvVar.c:322
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29