diff options
Diffstat (limited to 'ShellPkg/Library/UefiShellLevel2CommandsLib/Vol.c')
-rw-r--r-- | ShellPkg/Library/UefiShellLevel2CommandsLib/Vol.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Vol.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Vol.c index f911c7e..e6f4a19 100644 --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Vol.c +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Vol.c @@ -2,7 +2,7 @@ Main file for vol shell level 2 function.
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
- Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2011 - 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
@@ -63,7 +63,7 @@ HandleVol( StrStr(Name, L"/") != NULL ||
StrStr(Name, L" ") != NULL )
){
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel2HiiHandle, L"vol", Name);
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel2HiiHandle, L"vol", Name);
return (SHELL_INVALID_PARAMETER);
}
@@ -73,7 +73,7 @@ HandleVol( Name != NULL?EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE:EFI_FILE_MODE_READ);
if (EFI_ERROR(Status) || ShellFileHandle == NULL) {
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel2HiiHandle, L"vol", Path);
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel2HiiHandle, L"vol", Path);
return (SHELL_ACCESS_DENIED);
}
@@ -114,13 +114,13 @@ HandleVol( if (Size1 > Size2) {
SysInfo = ReallocatePool((UINTN)SysInfo->Size, (UINTN)SysInfo->Size + Size1 - Size2, SysInfo);
if (SysInfo == NULL) {
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellLevel2HiiHandle, L"vol");
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellLevel2HiiHandle, L"vol");
ShellStatus = SHELL_OUT_OF_RESOURCES;
- }
+ }
}
if (SysInfo != NULL) {
- StrCpyS ( (CHAR16 *) SysInfo->VolumeLabel,
- (Size1>Size2? Size1/sizeof(CHAR16) : Size2/sizeof(CHAR16)),
+ StrCpyS ( (CHAR16 *) SysInfo->VolumeLabel,
+ (Size1>Size2? Size1/sizeof(CHAR16) : Size2/sizeof(CHAR16)),
Name
);
SysInfo->Size = SIZE_OF_EFI_FILE_SYSTEM_INFO + Size1;
@@ -130,13 +130,13 @@ HandleVol( (UINTN)SysInfo->Size,
SysInfo);
}
- }
+ }
FreePool(SysInfo);
if (Delete || Name != NULL) {
if (EFI_ERROR(Status)) {
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_AD), gShellLevel2HiiHandle, L"vol", Path);
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_AD), gShellLevel2HiiHandle, L"vol", Path);
ShellStatus = SHELL_ACCESS_DENIED;
}
}
@@ -160,7 +160,7 @@ HandleVol( }
gEfiShellProtocol->CloseFile(ShellFileHandle);
-
+
ASSERT(SysInfo != NULL);
if (SysInfo != NULL) {
@@ -241,7 +241,7 @@ ShellCommandRunVol ( Status = ShellCommandLineParse (ParamList, &Package, &ProblemParam, TRUE);
if (EFI_ERROR(Status)) {
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel2HiiHandle, L"vol", ProblemParam);
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel2HiiHandle, L"vol", ProblemParam);
FreePool(ProblemParam);
ShellStatus = SHELL_INVALID_PARAMETER;
} else {
@@ -256,7 +256,7 @@ ShellCommandRunVol ( }
if (ShellCommandLineGetCount(Package) > 2) {
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"vol");
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"vol");
ShellStatus = SHELL_INVALID_PARAMETER;
} else {
PathName = ShellCommandLineGetRawValue(Package, 1);
@@ -264,7 +264,7 @@ ShellCommandRunVol ( CurDir = gEfiShellProtocol->GetCurDir(NULL);
if (CurDir == NULL) {
ShellStatus = SHELL_NOT_FOUND;
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_CWD), gShellLevel2HiiHandle, L"vol");
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_CWD), gShellLevel2HiiHandle, L"vol");
} else {
PathName = CurDir;
}
@@ -283,13 +283,13 @@ ShellCommandRunVol ( DeleteMode = ShellCommandLineGetFlag(Package, L"-d");
NewName = ShellCommandLineGetValue(Package, L"-n");
if (DeleteMode && ShellCommandLineGetFlag(Package, L"-n")) {
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellLevel2HiiHandle, L"vol", L"-d", L"-n");
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellLevel2HiiHandle, L"vol", L"-d", L"-n");
ShellStatus = SHELL_INVALID_PARAMETER;
} else if (ShellCommandLineGetFlag(Package, L"-n") && NewName == NULL) {
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellLevel2HiiHandle, L"vol", L"-n");
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellLevel2HiiHandle, L"vol", L"-n");
ShellStatus = SHELL_INVALID_PARAMETER;
} else if (NewName != NULL && StrLen(NewName) > 11) {
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM_VAL), gShellLevel2HiiHandle, L"vol", NewName, L"-n");
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM_VAL), gShellLevel2HiiHandle, L"vol", NewName, L"-n");
ShellStatus = SHELL_INVALID_PARAMETER;
} else if (ShellStatus == SHELL_SUCCESS) {
ShellStatus = HandleVol(
|