summaryrefslogtreecommitdiff
path: root/ShellPkg/Application/Shell/ShellEnvVar.c
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg/Application/Shell/ShellEnvVar.c')
-rw-r--r--ShellPkg/Application/Shell/ShellEnvVar.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/ShellPkg/Application/Shell/ShellEnvVar.c b/ShellPkg/Application/Shell/ShellEnvVar.c
index 4c49c1c..6632764 100644
--- a/ShellPkg/Application/Shell/ShellEnvVar.c
+++ b/ShellPkg/Application/Shell/ShellEnvVar.c
@@ -1,7 +1,7 @@
/** @file
function declarations for shell environment functions.
- Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2009 - 2018, 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
@@ -143,9 +143,9 @@ GetEnvironmentVariableList(
if (ListHead == NULL) {
return (EFI_INVALID_PARAMETER);
}
-
+
Status = EFI_SUCCESS;
-
+
ValBufferSize = INIT_DATA_BUFFER_SIZE;
NameBufferSize = INIT_NAME_BUFFER_SIZE;
VariableName = AllocateZeroPool(NameBufferSize);
@@ -171,7 +171,7 @@ GetEnvironmentVariableList(
NameSize = NameBufferSize;
Status = gRT->GetNextVariableName(&NameSize, VariableName, &Guid);
}
-
+
if (!EFI_ERROR(Status) && CompareGuid(&Guid, &gShellVariableGuid)){
VarList = AllocateZeroPool(sizeof(ENV_VAR_LIST));
if (VarList == NULL) {
@@ -200,7 +200,7 @@ GetEnvironmentVariableList(
Status = EFI_OUT_OF_RESOURCES;
break;
}
-
+
ValSize = ValBufferSize;
Status = SHELL_GET_ENVIRONMENT_VARIABLE_AND_ATTRIBUTES(VariableName, &VarList->Atts, &ValSize, VarList->Val);
}
@@ -348,8 +348,8 @@ SetEnvironmentVariables(
//
// Copy the string into the Key, leaving the last character allocated as NULL to terminate
//
- StrnCpyS( Node->Key,
- StrStr(CurrentString, L"=") - CurrentString + 1,
+ StrnCpyS( Node->Key,
+ StrStr(CurrentString, L"=") - CurrentString + 1,
CurrentString,
StrStr(CurrentString, L"=") - CurrentString
);
@@ -413,7 +413,7 @@ ShellFindEnvVarInList (
)
{
ENV_VAR_LIST *Node;
-
+
if (Key == NULL || Value == NULL || ValueSize == NULL) {
return SHELL_INVALID_PARAMETER;
}
@@ -459,7 +459,7 @@ ShellAddEnvVarToList (
ENV_VAR_LIST *Node;
CHAR16 *LocalKey;
CHAR16 *LocalValue;
-
+
if (Key == NULL || Value == NULL || ValueSize == 0) {
return EFI_INVALID_PARAMETER;
}
@@ -511,7 +511,7 @@ ShellAddEnvVarToList (
Remove a specified environment variable in gShellEnvVarList.
@param Key The name of the environment variable.
-
+
@retval EFI_SUCCESS The command executed successfully.
@retval EFI_NOT_FOUND The environment variable is not found in
gShellEnvVarList.
@@ -546,7 +546,7 @@ ShellRemvoeEnvVarFromList (
/**
Initialize the gShellEnvVarList and cache all Shell-Guid-based environment
variables.
-
+
**/
EFI_STATUS
ShellInitEnvVarList (