ShellPkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Provides interface to advanced shell functionality for parsing both handle and protocol database.
|
||||
|
||||
Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
(C) Copyright 2013-2016 Hewlett-Packard Development Company, L.P.<BR>
|
||||
This program and the accompanying materials
|
||||
@@ -163,53 +163,53 @@
|
||||
/// EFI_FIRMWARE_IMAGE_DESCRIPTOR in UEFI spec < 2.4a
|
||||
///
|
||||
typedef struct {
|
||||
///
|
||||
/// A unique number identifying the firmware image within the device. The number is
|
||||
///
|
||||
/// A unique number identifying the firmware image within the device. The number is
|
||||
/// between 1 and DescriptorCount.
|
||||
///
|
||||
///
|
||||
UINT8 ImageIndex;
|
||||
///
|
||||
/// A unique number identifying the firmware image type.
|
||||
///
|
||||
/// A unique number identifying the firmware image type.
|
||||
///
|
||||
EFI_GUID ImageTypeId;
|
||||
///
|
||||
/// A unique number identifying the firmware image.
|
||||
///
|
||||
///
|
||||
/// A unique number identifying the firmware image.
|
||||
///
|
||||
UINT64 ImageId;
|
||||
///
|
||||
/// A pointer to a null-terminated string representing the firmware image name.
|
||||
///
|
||||
///
|
||||
/// A pointer to a null-terminated string representing the firmware image name.
|
||||
///
|
||||
CHAR16 *ImageIdName;
|
||||
///
|
||||
/// Identifies the version of the device firmware. The format is vendor specific and new
|
||||
///
|
||||
/// Identifies the version of the device firmware. The format is vendor specific and new
|
||||
/// version must have a greater value than an old version.
|
||||
///
|
||||
///
|
||||
UINT32 Version;
|
||||
///
|
||||
///
|
||||
/// A pointer to a null-terminated string representing the firmware image version name.
|
||||
///
|
||||
///
|
||||
CHAR16 *VersionName;
|
||||
///
|
||||
///
|
||||
/// Size of the image in bytes. If size=0, then only ImageIndex and ImageTypeId are valid.
|
||||
///
|
||||
///
|
||||
UINTN Size;
|
||||
///
|
||||
/// Image attributes that are supported by this device. See 'Image Attribute Definitions'
|
||||
/// for possible returned values of this parameter. A value of 1 indicates the attribute is
|
||||
/// supported and the current setting value is indicated in AttributesSetting. A
|
||||
/// value of 0 indicates the attribute is not supported and the current setting value in
|
||||
///
|
||||
/// Image attributes that are supported by this device. See 'Image Attribute Definitions'
|
||||
/// for possible returned values of this parameter. A value of 1 indicates the attribute is
|
||||
/// supported and the current setting value is indicated in AttributesSetting. A
|
||||
/// value of 0 indicates the attribute is not supported and the current setting value in
|
||||
/// AttributesSetting is meaningless.
|
||||
///
|
||||
///
|
||||
UINT64 AttributesSupported;
|
||||
///
|
||||
/// Image attributes. See 'Image Attribute Definitions' for possible returned values of
|
||||
///
|
||||
/// Image attributes. See 'Image Attribute Definitions' for possible returned values of
|
||||
/// this parameter.
|
||||
///
|
||||
///
|
||||
UINT64 AttributesSetting;
|
||||
///
|
||||
/// Image compatibilities. See 'Image Compatibility Definitions' for possible returned
|
||||
///
|
||||
/// Image compatibilities. See 'Image Compatibility Definitions' for possible returned
|
||||
/// values of this parameter.
|
||||
///
|
||||
///
|
||||
UINT64 Compatibilities;
|
||||
} EFI_FIRMWARE_IMAGE_DESCRIPTOR_V1;
|
||||
|
||||
@@ -218,53 +218,53 @@ typedef struct {
|
||||
/// EFI_FIRMWARE_IMAGE_DESCRIPTOR in UEFI spec > 2.4a and < 2.5
|
||||
///
|
||||
typedef struct {
|
||||
///
|
||||
/// A unique number identifying the firmware image within the device. The number is
|
||||
///
|
||||
/// A unique number identifying the firmware image within the device. The number is
|
||||
/// between 1 and DescriptorCount.
|
||||
///
|
||||
///
|
||||
UINT8 ImageIndex;
|
||||
///
|
||||
/// A unique number identifying the firmware image type.
|
||||
///
|
||||
/// A unique number identifying the firmware image type.
|
||||
///
|
||||
EFI_GUID ImageTypeId;
|
||||
///
|
||||
/// A unique number identifying the firmware image.
|
||||
///
|
||||
///
|
||||
/// A unique number identifying the firmware image.
|
||||
///
|
||||
UINT64 ImageId;
|
||||
///
|
||||
/// A pointer to a null-terminated string representing the firmware image name.
|
||||
///
|
||||
///
|
||||
/// A pointer to a null-terminated string representing the firmware image name.
|
||||
///
|
||||
CHAR16 *ImageIdName;
|
||||
///
|
||||
/// Identifies the version of the device firmware. The format is vendor specific and new
|
||||
///
|
||||
/// Identifies the version of the device firmware. The format is vendor specific and new
|
||||
/// version must have a greater value than an old version.
|
||||
///
|
||||
///
|
||||
UINT32 Version;
|
||||
///
|
||||
///
|
||||
/// A pointer to a null-terminated string representing the firmware image version name.
|
||||
///
|
||||
///
|
||||
CHAR16 *VersionName;
|
||||
///
|
||||
///
|
||||
/// Size of the image in bytes. If size=0, then only ImageIndex and ImageTypeId are valid.
|
||||
///
|
||||
///
|
||||
UINTN Size;
|
||||
///
|
||||
/// Image attributes that are supported by this device. See 'Image Attribute Definitions'
|
||||
/// for possible returned values of this parameter. A value of 1 indicates the attribute is
|
||||
/// supported and the current setting value is indicated in AttributesSetting. A
|
||||
/// value of 0 indicates the attribute is not supported and the current setting value in
|
||||
///
|
||||
/// Image attributes that are supported by this device. See 'Image Attribute Definitions'
|
||||
/// for possible returned values of this parameter. A value of 1 indicates the attribute is
|
||||
/// supported and the current setting value is indicated in AttributesSetting. A
|
||||
/// value of 0 indicates the attribute is not supported and the current setting value in
|
||||
/// AttributesSetting is meaningless.
|
||||
///
|
||||
///
|
||||
UINT64 AttributesSupported;
|
||||
///
|
||||
/// Image attributes. See 'Image Attribute Definitions' for possible returned values of
|
||||
///
|
||||
/// Image attributes. See 'Image Attribute Definitions' for possible returned values of
|
||||
/// this parameter.
|
||||
///
|
||||
///
|
||||
UINT64 AttributesSetting;
|
||||
///
|
||||
/// Image compatibilities. See 'Image Compatibility Definitions' for possible returned
|
||||
///
|
||||
/// Image compatibilities. See 'Image Compatibility Definitions' for possible returned
|
||||
/// values of this parameter.
|
||||
///
|
||||
///
|
||||
UINT64 Compatibilities;
|
||||
///
|
||||
/// Describes the lowest ImageDescriptor version that the device will accept. Only
|
||||
|
@@ -1,6 +1,6 @@
|
||||
## @file
|
||||
# Provides interface to advanced shell functionality for parsing both handle and protocol database.
|
||||
# Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved. <BR>
|
||||
# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved. <BR>
|
||||
# (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
# (C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
|
||||
#
|
||||
@@ -354,4 +354,4 @@
|
||||
|
||||
[Pcd.common]
|
||||
gEfiShellPkgTokenSpaceGuid.PcdShellPrintBufferSize ## CONSUMES
|
||||
gEfiShellPkgTokenSpaceGuid.PcdShellIncludeNtGuids ## CONSUMES
|
||||
gEfiShellPkgTokenSpaceGuid.PcdShellIncludeNtGuids ## CONSUMES
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for BCFG command.
|
||||
|
||||
(C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 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
|
||||
@@ -94,8 +94,8 @@ typedef struct {
|
||||
**/
|
||||
EFI_STATUS
|
||||
UpdateOptionalData(
|
||||
UINT16 Index,
|
||||
UINTN DataSize,
|
||||
UINT16 Index,
|
||||
UINTN DataSize,
|
||||
UINT8 *Data,
|
||||
IN CONST BCFG_OPERATION_TARGET Target
|
||||
)
|
||||
@@ -109,7 +109,7 @@ UpdateOptionalData(
|
||||
UINTN OriginalOptionDataSize;
|
||||
|
||||
UnicodeSPrint(VariableName, sizeof(VariableName), L"%s%04x", Target == BcfgTargetBootOrder?L"Boot":L"Driver", Index);
|
||||
|
||||
|
||||
OriginalSize = 0;
|
||||
OriginalData = NULL;
|
||||
NewData = NULL;
|
||||
@@ -157,7 +157,7 @@ UpdateOptionalData(
|
||||
// put the data back under the variable
|
||||
//
|
||||
Status = gRT->SetVariable(
|
||||
VariableName,
|
||||
VariableName,
|
||||
(EFI_GUID*)&gEfiGlobalVariableGuid,
|
||||
EFI_VARIABLE_NON_VOLATILE|EFI_VARIABLE_BOOTSERVICE_ACCESS|EFI_VARIABLE_RUNTIME_ACCESS,
|
||||
NewSize,
|
||||
@@ -180,7 +180,7 @@ UpdateOptionalData(
|
||||
**/
|
||||
EFI_STATUS
|
||||
GetBootOptionCrc(
|
||||
UINT32 *Crc,
|
||||
UINT32 *Crc,
|
||||
UINT16 BootIndex
|
||||
)
|
||||
{
|
||||
@@ -629,7 +629,7 @@ BcfgAdd(
|
||||
(VOID**)&FilePath);
|
||||
}
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_HANDLE), gShellBcfgHiiHandle, L"bcfg", HandleNumber);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_HANDLE), gShellBcfgHiiHandle, L"bcfg", HandleNumber);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
} else {
|
||||
@@ -660,7 +660,7 @@ BcfgAdd(
|
||||
|| ParentControllerHandleCount > 0
|
||||
|| ChildControllerHandleCount > 0
|
||||
|| !EFI_ERROR(Status) ) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", L"Handle Number");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", L"Handle Number");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@@ -680,18 +680,18 @@ BcfgAdd(
|
||||
//
|
||||
// If filename matched nothing fail
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellBcfgHiiHandle, L"bcfg", File);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellBcfgHiiHandle, L"bcfg", File);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (FileList->Link.ForwardLink != FileList->Link.BackLink) {
|
||||
//
|
||||
// If filename expanded to multiple names, fail
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_FILE), gShellBcfgHiiHandle, L"bcfg", File);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_FILE), gShellBcfgHiiHandle, L"bcfg", File);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Arg = (EFI_SHELL_FILE_INFO*)GetFirstNode(&FileList->Link);
|
||||
if (EFI_ERROR(Arg->Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_FILE_OPEN), gShellBcfgHiiHandle, L"bcfg", File);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_FILE_OPEN), gShellBcfgHiiHandle, L"bcfg", File);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@@ -703,7 +703,7 @@ BcfgAdd(
|
||||
//
|
||||
DevicePath = gEfiShellProtocol->GetDevicePathFromFilePath(Arg->FullName);
|
||||
if (DevicePath == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_FILE_DP), gShellBcfgHiiHandle, L"bcfg", Arg->FullName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_FILE_DP), gShellBcfgHiiHandle, L"bcfg", Arg->FullName);
|
||||
ShellStatus = SHELL_UNSUPPORTED;
|
||||
} else {
|
||||
if (UsePath) {
|
||||
@@ -752,7 +752,7 @@ BcfgAdd(
|
||||
}
|
||||
|
||||
if (TargetLocation == 0xFFFF) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_TARGET_NF), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_TARGET_NF), gShellBcfgHiiHandle, L"bcfg");
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_TARGET), gShellBcfgHiiHandle, TargetLocation);
|
||||
}
|
||||
@@ -794,7 +794,7 @@ BcfgAdd(
|
||||
}
|
||||
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_SET_VAR_FAIL), gShellBcfgHiiHandle, L"bcfg", OptionStr);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_SET_VAR_FAIL), gShellBcfgHiiHandle, L"bcfg", OptionStr);
|
||||
} else {
|
||||
NewOrder = AllocateZeroPool ((OrderCount + 1) * sizeof (NewOrder[0]));
|
||||
if (NewOrder != NULL) {
|
||||
@@ -882,7 +882,7 @@ BcfgRemove(
|
||||
0,
|
||||
NULL);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_WRITE_FAIL), gShellBcfgHiiHandle, L"bcfg", VariableName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_WRITE_FAIL), gShellBcfgHiiHandle, L"bcfg", VariableName);
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
NewOrder = AllocateZeroPool(OrderCount*sizeof(CurrentOrder[0]));
|
||||
@@ -903,7 +903,7 @@ BcfgRemove(
|
||||
Status = EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_WRITE_FAIL), gShellBcfgHiiHandle, L"bcfg", Target == BcfgTargetBootOrder?(CHAR16*)L"BootOrder":(CHAR16*)L"DriverOrder");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_WRITE_FAIL), gShellBcfgHiiHandle, L"bcfg", Target == BcfgTargetBootOrder?(CHAR16*)L"BootOrder":(CHAR16*)L"DriverOrder");
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
return (SHELL_SUCCESS);
|
||||
@@ -965,7 +965,7 @@ BcfgMove(
|
||||
FreePool(NewOrder);
|
||||
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_WRITE_FAIL), gShellBcfgHiiHandle, L"bcfg", Target == BcfgTargetBootOrder?(CHAR16*)L"BootOrder":(CHAR16*)L"DriverOrder");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_WRITE_FAIL), gShellBcfgHiiHandle, L"bcfg", Target == BcfgTargetBootOrder?(CHAR16*)L"BootOrder":(CHAR16*)L"DriverOrder");
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
return (SHELL_SUCCESS);
|
||||
@@ -1027,7 +1027,7 @@ BcfgAddOpt(
|
||||
//
|
||||
Status = ShellConvertStringToUint64(Walker, &Intermediate, FALSE, TRUE);
|
||||
if (EFI_ERROR(Status) || (((UINT16)Intermediate) != Intermediate) || StrStr(Walker, L" ") == NULL || ((UINT16)Intermediate) > ((UINT16)OrderCount)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", L"Option Index");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", L"Option Index");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
return (ShellStatus);
|
||||
}
|
||||
@@ -1042,7 +1042,7 @@ BcfgAddOpt(
|
||||
}
|
||||
|
||||
//
|
||||
// determine whether we have file with data, quote delimited information, or a hot-key
|
||||
// determine whether we have file with data, quote delimited information, or a hot-key
|
||||
//
|
||||
if (Walker[0] == L'\"') {
|
||||
//
|
||||
@@ -1050,12 +1050,12 @@ BcfgAddOpt(
|
||||
//
|
||||
Temp = StrStr(Walker+1, L"\"");
|
||||
if (Temp == NULL || StrLen(Temp) != 1) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", Walker);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", Walker);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
FileName = StrnCatGrow(&FileName, NULL, Walker+1, 0);
|
||||
if (FileName == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellStatus = SHELL_OUT_OF_RESOURCES;
|
||||
return (ShellStatus);
|
||||
}
|
||||
@@ -1064,7 +1064,7 @@ BcfgAddOpt(
|
||||
Temp2[0] = CHAR_NULL;
|
||||
Temp2++;
|
||||
if (StrLen(Temp2)>0) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", Walker);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", Walker);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
if (EFI_ERROR(ShellFileExists(Walker))) {
|
||||
@@ -1086,14 +1086,14 @@ BcfgAddOpt(
|
||||
// filename
|
||||
//
|
||||
if (EFI_ERROR(ShellFileExists(Walker))) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FIND_FAIL), gShellBcfgHiiHandle, L"bcfg", Walker);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FIND_FAIL), gShellBcfgHiiHandle, L"bcfg", Walker);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
FileName = StrnCatGrow(&FileName, NULL, Walker, 0);
|
||||
}
|
||||
} else {
|
||||
if (Target != BcfgTargetBootOrder) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_BOOT_ONLY), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_BOOT_ONLY), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@@ -1103,7 +1103,7 @@ BcfgAddOpt(
|
||||
//
|
||||
Status = ShellConvertStringToUint64(Walker, &Intermediate, FALSE, TRUE);
|
||||
if (EFI_ERROR(Status) || (((UINT32)Intermediate) != Intermediate) || StrStr(Walker, L" ") == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", Walker);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", Walker);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
NewKeyOption.KeyData.PackedValue = (UINT32)Intermediate;
|
||||
@@ -1118,12 +1118,12 @@ BcfgAddOpt(
|
||||
|
||||
if (ShellStatus == SHELL_SUCCESS) {
|
||||
//
|
||||
// Now we know how many EFI_INPUT_KEY structs we need to attach to the end of the EFI_KEY_OPTION struct.
|
||||
// Now we know how many EFI_INPUT_KEY structs we need to attach to the end of the EFI_KEY_OPTION struct.
|
||||
// Re-allocate with the added information.
|
||||
//
|
||||
KeyOptionBuffer = AllocatePool (sizeof(EFI_KEY_OPTION) + (sizeof(EFI_INPUT_KEY) * NewKeyOption.KeyData.Options.InputKeyCount));
|
||||
if (KeyOptionBuffer == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_MEM), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_MEM), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellStatus = SHELL_OUT_OF_RESOURCES;
|
||||
return ShellStatus;
|
||||
}
|
||||
@@ -1135,7 +1135,7 @@ BcfgAddOpt(
|
||||
//
|
||||
Status = ShellConvertStringToUint64(Walker, &Intermediate, FALSE, TRUE);
|
||||
if (EFI_ERROR(Status) || (((UINT16)Intermediate) != Intermediate) || StrStr(Walker, L" ") == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", Walker);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", Walker);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
((EFI_INPUT_KEY*)(((UINT8*)KeyOptionBuffer) + sizeof(EFI_KEY_OPTION)))[LoopCounter].ScanCode = (UINT16)Intermediate;
|
||||
@@ -1152,7 +1152,7 @@ BcfgAddOpt(
|
||||
//
|
||||
Status = ShellConvertStringToUint64(Walker, &Intermediate, FALSE, TRUE);
|
||||
if (EFI_ERROR(Status) || (((UINT16)Intermediate) != Intermediate)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", Walker);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", Walker);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
((EFI_INPUT_KEY*)(((UINT8*)KeyOptionBuffer) + sizeof(EFI_KEY_OPTION)))[LoopCounter].UnicodeChar = (UINT16)Intermediate;
|
||||
@@ -1173,9 +1173,9 @@ BcfgAddOpt(
|
||||
KeyOptionBuffer->BootOption = CurrentOrder[OptionIndex];
|
||||
Status = GetBootOptionCrc(&(KeyOptionBuffer->BootOptionCrc), KeyOptionBuffer->BootOption);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", L"Option Index");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", L"Option Index");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ShellStatus == SHELL_SUCCESS) {
|
||||
@@ -1197,11 +1197,11 @@ BcfgAddOpt(
|
||||
sizeof(EFI_KEY_OPTION) + (sizeof(EFI_INPUT_KEY) * NewKeyOption.KeyData.Options.InputKeyCount),
|
||||
KeyOptionBuffer);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_SET_VAR_FAIL), gShellBcfgHiiHandle, L"bcfg", VariableName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_SET_VAR_FAIL), gShellBcfgHiiHandle, L"bcfg", VariableName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_VAR_NO_NUM), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_VAR_NO_NUM), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
ASSERT(FileName == NULL && Data == NULL);
|
||||
@@ -1229,7 +1229,7 @@ BcfgAddOpt(
|
||||
}
|
||||
Data = AllocateZeroPool((UINTN)Intermediate);
|
||||
if (Data == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_MEM), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_MEM), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellStatus = SHELL_OUT_OF_RESOURCES;
|
||||
}
|
||||
if (!EFI_ERROR(Status)) {
|
||||
@@ -1242,14 +1242,14 @@ BcfgAddOpt(
|
||||
if (!EFI_ERROR(Status) && ShellStatus == SHELL_SUCCESS && Data != NULL) {
|
||||
Status = UpdateOptionalData(CurrentOrder[OptionIndex], (UINTN)Intermediate, (UINT8*)Data, Target);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_SET_VAR_FAIL), gShellBcfgHiiHandle, L"bcfg", VariableName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_SET_VAR_FAIL), gShellBcfgHiiHandle, L"bcfg", VariableName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (EFI_ERROR(Status) && ShellStatus == SHELL_SUCCESS) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_SET_VAR_FAIL), gShellBcfgHiiHandle, L"bcfg", VariableName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_SET_VAR_FAIL), gShellBcfgHiiHandle, L"bcfg", VariableName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SHELL_FREE_NON_NULL(Data);
|
||||
@@ -1291,7 +1291,7 @@ BcfgDisplayDump(
|
||||
UINTN OptionalDataOffset;
|
||||
|
||||
if (OrderCount == 0) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN(STR_BCFG_NONE), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN(STR_BCFG_NONE), gShellBcfgHiiHandle, L"bcfg");
|
||||
return (SHELL_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -1321,7 +1321,7 @@ BcfgDisplayDump(
|
||||
}
|
||||
|
||||
if (EFI_ERROR(Status) || Buffer == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_READ_FAIL), gShellBcfgHiiHandle, L"bcfg", VariableName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_READ_FAIL), gShellBcfgHiiHandle, L"bcfg", VariableName);
|
||||
++Errors;
|
||||
goto Cleanup;
|
||||
}
|
||||
@@ -1463,7 +1463,7 @@ ShellCommandRunBcfg (
|
||||
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), gShellBcfgHiiHandle, L"bcfg", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellBcfgHiiHandle, L"bcfg", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -1476,7 +1476,7 @@ ShellCommandRunBcfg (
|
||||
if (ShellCommandLineGetFlag(Package, L"-opt")) {
|
||||
CurrentOperation.OptData = ShellCommandLineGetValue(Package, L"-opt");
|
||||
if (CurrentOperation.OptData == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellBcfgHiiHandle, L"bcfg", L"-opt");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellBcfgHiiHandle, L"bcfg", L"-opt");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
CurrentOperation.Type = BcfgTypeOpt;
|
||||
@@ -1488,14 +1488,14 @@ ShellCommandRunBcfg (
|
||||
if ((ShellCommandLineGetCount(Package) < 3 && CurrentOperation.Type != BcfgTypeOpt) ||
|
||||
(ShellCommandLineGetCount(Package) < 2 && CurrentOperation.Type == BcfgTypeOpt)
|
||||
){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (gUnicodeCollation->StriColl(gUnicodeCollation, (CHAR16*)ShellCommandLineGetRawValue(Package, 1), L"driver") == 0) {
|
||||
CurrentOperation.Target = BcfgTargetDriverOrder;
|
||||
} else if (gUnicodeCollation->StriColl(gUnicodeCollation, (CHAR16*)ShellCommandLineGetRawValue(Package, 1), L"boot") == 0) {
|
||||
CurrentOperation.Target = BcfgTargetBootOrder;
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_DRIVER_BOOT), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_DRIVER_BOOT), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@@ -1541,17 +1541,17 @@ ShellCommandRunBcfg (
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
} else if (ShellCommandLineGetFlag(Package, L"-v")) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", L"-v (without dump)");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", L"-v (without dump)");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (gUnicodeCollation->StriColl(gUnicodeCollation, (CHAR16*)CurrentParam, L"add") == 0) {
|
||||
if ((ParamNumber + 3) >= ShellCommandLineGetCount(Package)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
CurrentOperation.Type = BcfgTypeAdd;
|
||||
CurrentParam = ShellCommandLineGetRawValue(Package, ++ParamNumber);
|
||||
if (CurrentParam == NULL || !ShellIsHexOrDecimalNumber(CurrentParam, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ShellConvertStringToUint64(CurrentParam, &Intermediate, TRUE, FALSE);
|
||||
@@ -1563,13 +1563,13 @@ ShellCommandRunBcfg (
|
||||
}
|
||||
} else if (gUnicodeCollation->StriColl(gUnicodeCollation, (CHAR16*)CurrentParam, L"addp") == 0) {
|
||||
if ((ParamNumber + 3) >= ShellCommandLineGetCount(Package)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
CurrentOperation.Type = BcfgTypeAddp;
|
||||
CurrentParam = ShellCommandLineGetRawValue(Package, ++ParamNumber);
|
||||
if (CurrentParam == NULL || !ShellIsHexOrDecimalNumber(CurrentParam, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ShellConvertStringToUint64(CurrentParam, &Intermediate, TRUE, FALSE);
|
||||
@@ -1581,20 +1581,20 @@ ShellCommandRunBcfg (
|
||||
}
|
||||
} else if (gUnicodeCollation->StriColl(gUnicodeCollation, (CHAR16*)CurrentParam, L"addh") == 0) {
|
||||
if ((ParamNumber + 3) >= ShellCommandLineGetCount(Package)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
CurrentOperation.Type = BcfgTypeAddh;
|
||||
CurrentParam = ShellCommandLineGetRawValue(Package, ++ParamNumber);
|
||||
if (CurrentParam == NULL || !ShellIsHexOrDecimalNumber(CurrentParam, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ShellConvertStringToUint64(CurrentParam, &Intermediate, TRUE, FALSE);
|
||||
CurrentOperation.Number1 = (UINT16)Intermediate;
|
||||
CurrentParam = ShellCommandLineGetRawValue(Package, ++ParamNumber);
|
||||
if (CurrentParam == NULL || !ShellIsHexOrDecimalNumber(CurrentParam, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ShellConvertStringToUint64(CurrentParam, &Intermediate, TRUE, FALSE);
|
||||
@@ -1605,42 +1605,42 @@ ShellCommandRunBcfg (
|
||||
}
|
||||
} else if (gUnicodeCollation->StriColl(gUnicodeCollation, (CHAR16*)CurrentParam, L"rm") == 0) {
|
||||
if ((ParamNumber + 1) >= ShellCommandLineGetCount(Package)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
CurrentOperation.Type = BcfgTypeRm;
|
||||
CurrentParam = ShellCommandLineGetRawValue(Package, ++ParamNumber);
|
||||
if (CurrentParam == NULL || !ShellIsHexOrDecimalNumber(CurrentParam, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ShellConvertStringToUint64(CurrentParam, &Intermediate, TRUE, FALSE);
|
||||
CurrentOperation.Number1 = (UINT16)Intermediate;
|
||||
if (CurrentOperation.Number1 >= Count){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_NUMB_RANGE), gShellBcfgHiiHandle, L"bcfg", Count);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_NUMB_RANGE), gShellBcfgHiiHandle, L"bcfg", Count);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
} else if (gUnicodeCollation->StriColl(gUnicodeCollation, (CHAR16*)CurrentParam, L"mv") == 0) {
|
||||
if ((ParamNumber + 2) >= ShellCommandLineGetCount(Package)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellBcfgHiiHandle, L"bcfg");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
CurrentOperation.Type = BcfgTypeMv;
|
||||
CurrentParam = ShellCommandLineGetRawValue(Package, ++ParamNumber);
|
||||
if (CurrentParam == NULL || !ShellIsHexOrDecimalNumber(CurrentParam, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ShellConvertStringToUint64(CurrentParam, &Intermediate, TRUE, FALSE);
|
||||
CurrentOperation.Number1 = (UINT16)Intermediate;
|
||||
if (CurrentOperation.Number1 >= Count){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_NUMB_RANGE), gShellBcfgHiiHandle, L"bcfg", Count);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_NUMB_RANGE), gShellBcfgHiiHandle, L"bcfg", Count);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
CurrentParam = ShellCommandLineGetRawValue(Package, ++ParamNumber);
|
||||
if (CurrentParam == NULL || !ShellIsHexOrDecimalNumber(CurrentParam, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ShellConvertStringToUint64(CurrentParam, &Intermediate, TRUE, FALSE);
|
||||
@@ -1649,7 +1649,7 @@ ShellCommandRunBcfg (
|
||||
if (CurrentOperation.Number2 == CurrentOperation.Number1
|
||||
||CurrentOperation.Number2 >= Count
|
||||
){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_NUMB_RANGE), gShellBcfgHiiHandle, L"bcfg", Count);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_BCFG_NUMB_RANGE), gShellBcfgHiiHandle, L"bcfg", Count);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
@@ -1751,7 +1751,7 @@ ShellCommandRunBcfg (
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellBcfgHiiHandle, L"bcfg", CurrentParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# Provides interface to shell functionality for shell commands and applications.
|
||||
#
|
||||
# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved. <BR>
|
||||
# Copyright (c) 2006 - 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
|
||||
@@ -40,5 +40,5 @@
|
||||
[Protocols]
|
||||
gEfiShellParametersProtocolGuid ## CONSUMES
|
||||
gEfiShellInterfaceGuid ## SOMETIMES_CONSUMES
|
||||
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Main file for support of shell consist mapping.
|
||||
|
||||
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 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
|
||||
@@ -56,10 +56,10 @@ typedef struct {
|
||||
@retval EFI_OUT_OF_RESOURCES Out of resources.
|
||||
@retval EFI_SUCCESS The appending was successful.
|
||||
**/
|
||||
typedef
|
||||
EFI_STATUS
|
||||
typedef
|
||||
EFI_STATUS
|
||||
(*SERIAL_DECODE_FUNCTION) (
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevPath,
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevPath,
|
||||
DEVICE_CONSIST_MAPPING_INFO *MapInfo,
|
||||
EFI_DEVICE_PATH_PROTOCOL *OrigDevPath
|
||||
);
|
||||
@@ -640,7 +640,7 @@ DevPathSerialUsb (
|
||||
UsbIo = NULL;
|
||||
if (!EFI_ERROR(Status)) {
|
||||
Status = gBS->OpenProtocol(TempHandle, &gEfiUsbIoProtocolGuid, (VOID**)&UsbIo, gImageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);
|
||||
}
|
||||
}
|
||||
|
||||
if (!EFI_ERROR(Status)) {
|
||||
ASSERT(UsbIo != NULL);
|
||||
@@ -661,7 +661,7 @@ DevPathSerialUsb (
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return Status;
|
||||
}
|
||||
@@ -1520,13 +1520,13 @@ ShellCommandConsistMappingInitialize (
|
||||
continue;
|
||||
}
|
||||
|
||||
Status = gBS->HandleProtocol( HandleBuffer[HandleLoop],
|
||||
&gEfiBlockIoProtocolGuid,
|
||||
Status = gBS->HandleProtocol( HandleBuffer[HandleLoop],
|
||||
&gEfiBlockIoProtocolGuid,
|
||||
(VOID **)&BlockIo
|
||||
);
|
||||
if (EFI_ERROR(Status)) {
|
||||
Status = gBS->HandleProtocol( HandleBuffer[HandleLoop],
|
||||
&gEfiSimpleFileSystemProtocolGuid,
|
||||
Status = gBS->HandleProtocol( HandleBuffer[HandleLoop],
|
||||
&gEfiSimpleFileSystemProtocolGuid,
|
||||
(VOID **)&SimpleFileSystem
|
||||
);
|
||||
if (EFI_ERROR(Status)) {
|
||||
|
@@ -79,7 +79,7 @@ CommandInit(
|
||||
UINTN Index;
|
||||
EFI_STATUS Status;
|
||||
CHAR8 *PlatformLang;
|
||||
|
||||
|
||||
GetEfiGlobalVariable2 (EFI_PLATFORM_LANG_VARIABLE_NAME, (VOID**)&PlatformLang, NULL);
|
||||
if (PlatformLang == NULL) {
|
||||
return EFI_UNSUPPORTED;
|
||||
@@ -115,7 +115,7 @@ CommandInit(
|
||||
|
||||
//
|
||||
// Find the best matching matching language from the supported languages
|
||||
// of Unicode Collation2 protocol.
|
||||
// of Unicode Collation2 protocol.
|
||||
//
|
||||
BestLanguage = GetBestLanguage (
|
||||
Uc->SupportedLanguages,
|
||||
@@ -311,7 +311,7 @@ ShellCommandFindDynamicCommand (
|
||||
//
|
||||
// not found or out of resources
|
||||
//
|
||||
return NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
for (NextCommand = CommandHandleList; *NextCommand != NULL; NextCommand++) {
|
||||
@@ -328,7 +328,7 @@ ShellCommandFindDynamicCommand (
|
||||
if (gUnicodeCollation->StriColl(
|
||||
gUnicodeCollation,
|
||||
(CHAR16*)CommandString,
|
||||
(CHAR16*)DynamicCommand->CommandName) == 0
|
||||
(CHAR16*)DynamicCommand->CommandName) == 0
|
||||
){
|
||||
FreePool(CommandHandleList);
|
||||
return (DynamicCommand);
|
||||
@@ -429,7 +429,7 @@ ShellCommandGetDynamicCommandHelp(
|
||||
//
|
||||
// TODO: how to get proper language?
|
||||
//
|
||||
return DynamicCommand->GetHelp(DynamicCommand, "en");
|
||||
return DynamicCommand->GetHelp(DynamicCommand, "en");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -847,7 +847,7 @@ ShellCommandRegisterAlias (
|
||||
{
|
||||
ALIAS_LIST *Node;
|
||||
ALIAS_LIST *CommandAlias;
|
||||
ALIAS_LIST *PrevCommandAlias;
|
||||
ALIAS_LIST *PrevCommandAlias;
|
||||
INTN LexicalMatchValue;
|
||||
|
||||
//
|
||||
@@ -896,7 +896,7 @@ ShellCommandRegisterAlias (
|
||||
//
|
||||
// Swap PrevCommandAlias and CommandAlias list entry if PrevCommandAlias list entry
|
||||
// is alphabetically greater than CommandAlias list entry
|
||||
//
|
||||
//
|
||||
if (LexicalMatchValue > 0) {
|
||||
CommandAlias = (ALIAS_LIST *) SwapListEntries (&PrevCommandAlias->Link, &CommandAlias->Link);
|
||||
} else if (LexicalMatchValue < 0) {
|
||||
|
@@ -154,7 +154,7 @@ ShellCommandRunComp (
|
||||
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), gShellDebug1HiiHandle, L"comp", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"comp", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -162,22 +162,22 @@ ShellCommandRunComp (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 3) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"comp");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"comp");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) < 3) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"comp");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"comp");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
TempParam = ShellCommandLineGetRawValue(Package, 1);
|
||||
ASSERT(TempParam != NULL);
|
||||
FileName1 = ShellFindFilePath(TempParam);
|
||||
if (FileName1 == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_FIND_FAIL), gShellDebug1HiiHandle, L"comp", TempParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_FIND_FAIL), gShellDebug1HiiHandle, L"comp", TempParam);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
} else {
|
||||
Status = ShellOpenFileByName(FileName1, &FileHandle1, EFI_FILE_MODE_READ, 0);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"comp", TempParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"comp", TempParam);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
@@ -185,12 +185,12 @@ ShellCommandRunComp (
|
||||
ASSERT(TempParam != NULL);
|
||||
FileName2 = ShellFindFilePath(TempParam);
|
||||
if (FileName2 == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_FIND_FAIL), gShellDebug1HiiHandle, L"comp", TempParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_FIND_FAIL), gShellDebug1HiiHandle, L"comp", TempParam);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
} else {
|
||||
Status = ShellOpenFileByName(FileName2, &FileHandle2, EFI_FILE_MODE_READ, 0);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"comp", TempParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"comp", TempParam);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
|
@@ -7,7 +7,7 @@
|
||||
This sequence is further divided into Blocks and Huffman codings
|
||||
are applied to each Block.
|
||||
|
||||
Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2007 - 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
|
||||
@@ -181,7 +181,7 @@ PutDword (
|
||||
|
||||
/**
|
||||
Allocate memory spaces for data structures used in compression process.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Memory was allocated successfully.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
**/
|
||||
@@ -740,7 +740,7 @@ MakeLen (
|
||||
|
||||
/**
|
||||
Assign code to each symbol based on the code length array.
|
||||
|
||||
|
||||
@param[in] LoopVar8 The number of symbols.
|
||||
@param[in] Len The code length array.
|
||||
@param[out] Code The stores codes for each symbol.
|
||||
@@ -764,7 +764,7 @@ MakeCode (
|
||||
Code[LoopVar1] = Start[Len[LoopVar1]]++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Generates Huffman codes given a frequency distribution of symbols.
|
||||
|
||||
@@ -1175,7 +1175,7 @@ HufEncodeStart (
|
||||
/**
|
||||
Outputs an Original Character or a Pointer.
|
||||
|
||||
@param[in] LoopVar5 The original character or the 'String Length' element of
|
||||
@param[in] LoopVar5 The original character or the 'String Length' element of
|
||||
a Pointer.
|
||||
@param[in] LoopVar7 The 'Position' field of a Pointer.
|
||||
**/
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for Dblk shell Debug1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 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
|
||||
@@ -69,11 +69,11 @@ DisplayTheBlocks(
|
||||
Status = BlockIo->ReadBlocks(BlockIo, BlockIo->Media->MediaId, Lba, BufferSize, Buffer);
|
||||
if (!EFI_ERROR(Status) && Buffer != NULL) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DBLK_HEADER),
|
||||
gShellDebug1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DBLK_HEADER),
|
||||
gShellDebug1HiiHandle,
|
||||
Lba,
|
||||
BufferSize,
|
||||
BlockIo
|
||||
@@ -81,7 +81,7 @@ DisplayTheBlocks(
|
||||
|
||||
DumpHex(2,0,BufferSize,Buffer);
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_READ_FAIL), gShellDebug1HiiHandle, L"dblk", L"BlockIo");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_READ_FAIL), gShellDebug1HiiHandle, L"dblk", L"BlockIo");
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ ShellCommandRunDblk (
|
||||
Status = ShellCommandLineParse (EmptyParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"dblk", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"dblk", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -143,10 +143,10 @@ ShellCommandRunDblk (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 4) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"dblk");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"dblk");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) < 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"dblk");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"dblk");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@@ -160,7 +160,7 @@ ShellCommandRunDblk (
|
||||
Lba = 0;
|
||||
} else {
|
||||
if (!ShellIsHexOrDecimalNumber(LbaString, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dblk", LbaString);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dblk", LbaString);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
ShellConvertStringToUint64(LbaString, &Lba, TRUE, FALSE);
|
||||
@@ -170,29 +170,29 @@ ShellCommandRunDblk (
|
||||
BlockCount = 1;
|
||||
} else {
|
||||
if (!ShellIsHexOrDecimalNumber(BlockCountString, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dblk", BlockCountString);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dblk", BlockCountString);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
ShellConvertStringToUint64(BlockCountString, &BlockCount, TRUE, FALSE);
|
||||
if (BlockCount > 0x10) {
|
||||
BlockCount = 0x10;
|
||||
} else if (BlockCount == 0) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dblk", BlockCountString);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dblk", BlockCountString);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (ShellStatus == SHELL_SUCCESS) {
|
||||
//
|
||||
// do the work if we have a valid block identifier
|
||||
//
|
||||
if (gEfiShellProtocol->GetDevicePathFromMap(BlockName) == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dblk", BlockName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dblk", BlockName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
DevPath = (EFI_DEVICE_PATH_PROTOCOL*)gEfiShellProtocol->GetDevicePathFromMap(BlockName);
|
||||
if (gBS->LocateDevicePath(&gEfiBlockIoProtocolGuid, &DevPath, NULL) == EFI_NOT_FOUND) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_MAP_PROTOCOL), gShellDebug1HiiHandle, L"dblk", BlockName, L"BlockIo");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_MAP_PROTOCOL), gShellDebug1HiiHandle, L"dblk", BlockName, L"BlockIo");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
ShellStatus = DisplayTheBlocks(gEfiShellProtocol->GetDevicePathFromMap(BlockName), Lba, (UINT8)BlockCount);
|
||||
|
@@ -1,9 +1,9 @@
|
||||
/** @file
|
||||
Main file for Dmem shell Debug1 function.
|
||||
|
||||
Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<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
|
||||
@@ -62,7 +62,7 @@ DisplayMmioMemory(
|
||||
|
||||
Status = gBS->LocateProtocol(&gEfiPciRootBridgeIoProtocolGuid, NULL, (VOID**)&PciRbIo);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PCIRBIO_NF), gShellDebug1HiiHandle, L"dmem");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PCIRBIO_NF), gShellDebug1HiiHandle, L"dmem");
|
||||
return (SHELL_NOT_FOUND);
|
||||
}
|
||||
Buffer = AllocateZeroPool(Size);
|
||||
@@ -72,7 +72,7 @@ DisplayMmioMemory(
|
||||
|
||||
Status = PciRbIo->Mem.Read(PciRbIo, EfiPciWidthUint8, (UINT64)(UINTN)Address, Size, Buffer);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PCIRBIO_ER), gShellDebug1HiiHandle, L"dmem");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PCIRBIO_ER), gShellDebug1HiiHandle, L"dmem");
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DMEM_MMIO_HEADER_ROW), gShellDebug1HiiHandle, (UINT64)(UINTN)Address, Size);
|
||||
@@ -135,7 +135,7 @@ ShellCommandRunDmem (
|
||||
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), gShellDebug1HiiHandle, L"dmem", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"dmem", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -143,7 +143,7 @@ ShellCommandRunDmem (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 3) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"dmem");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"dmem");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Temp1 = ShellCommandLineGetRawValue(Package, 1);
|
||||
@@ -152,15 +152,15 @@ ShellCommandRunDmem (
|
||||
Size = 512;
|
||||
} else {
|
||||
if (!ShellIsHexOrDecimalNumber(Temp1, TRUE, FALSE) || EFI_ERROR(ShellConvertStringToUint64(Temp1, (UINT64*)&Address, TRUE, FALSE))) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dmem", Temp1);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dmem", Temp1);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
Temp1 = ShellCommandLineGetRawValue(Package, 2);
|
||||
if (Temp1 == NULL) {
|
||||
Size = 512;
|
||||
} else {
|
||||
if (!ShellIsHexOrDecimalNumber(Temp1, FALSE, FALSE) || EFI_ERROR(ShellConvertStringToUint64(Temp1, &Size, TRUE, FALSE))) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dmem", Temp1);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dmem", Temp1);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
@@ -204,7 +204,7 @@ ShellCommandRunDmem (
|
||||
}
|
||||
}
|
||||
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DMEM_SYSTEM_TABLE), gShellDebug1HiiHandle,
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DMEM_SYSTEM_TABLE), gShellDebug1HiiHandle,
|
||||
(UINT64)(UINTN)Address,
|
||||
gST->Hdr.HeaderSize,
|
||||
gST->Hdr.Revision,
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
Main file for DmpStore shell Debug1 function.
|
||||
|
||||
|
||||
(C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 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
|
||||
@@ -51,7 +51,7 @@ GetAttrType (
|
||||
|
||||
BufLen = 0;
|
||||
RetString = NULL;
|
||||
|
||||
|
||||
if ((Atts & EFI_VARIABLE_NON_VOLATILE) != 0) {
|
||||
StrnCatGrow (&RetString, &BufLen, L"+NV", 0);
|
||||
}
|
||||
@@ -157,11 +157,11 @@ LoadVariablesFromFile (
|
||||
if (EFI_ERROR (Status)) {
|
||||
return SHELL_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
|
||||
ShellStatus = SHELL_SUCCESS;
|
||||
|
||||
|
||||
InitializeListHead (&List);
|
||||
|
||||
|
||||
Position = 0;
|
||||
while (Position < FileSize) {
|
||||
//
|
||||
@@ -220,7 +220,7 @@ LoadVariablesFromFile (
|
||||
}
|
||||
|
||||
Position += BufferSize + sizeof (Crc32);
|
||||
|
||||
|
||||
Variable = AllocateZeroPool (sizeof (*Variable) + NameSize + DataSize);
|
||||
if (Variable == NULL) {
|
||||
FreePool (Buffer);
|
||||
@@ -239,20 +239,20 @@ LoadVariablesFromFile (
|
||||
InsertTailList (&List, &Variable->Link);
|
||||
FreePool (Buffer);
|
||||
}
|
||||
|
||||
|
||||
if ((Position != FileSize) || (ShellStatus != SHELL_SUCCESS)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_LOAD_BAD_FILE), gShellDebug1HiiHandle, L"dmpstore");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_LOAD_BAD_FILE), gShellDebug1HiiHandle, L"dmpstore");
|
||||
if (Position != FileSize) {
|
||||
ShellStatus = SHELL_VOLUME_CORRUPTED;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
for ( Link = GetFirstNode (&List)
|
||||
; !IsNull (&List, Link) && (ShellStatus == SHELL_SUCCESS)
|
||||
; Link = GetNextNode (&List, Link)
|
||||
) {
|
||||
Variable = CR (Link, DMP_STORE_VARIABLE, Link, DMP_STORE_VARIABLE_SIGNATURE);
|
||||
|
||||
|
||||
if (((Name == NULL) || gUnicodeCollation->MetaiMatch (gUnicodeCollation, Variable->Name, (CHAR16 *) Name)) &&
|
||||
((Guid == NULL) || CompareGuid (&Variable->Guid, Guid))
|
||||
) {
|
||||
@@ -272,7 +272,7 @@ LoadVariablesFromFile (
|
||||
Variable->Data
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_LOAD_GEN_FAIL), gShellDebug1HiiHandle, L"dmpstore", Variable->Name, Status);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_LOAD_GEN_FAIL), gShellDebug1HiiHandle, L"dmpstore", Variable->Name, Status);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -369,19 +369,19 @@ AppendSingleVariableToFile (
|
||||
Status = ShellWriteFile (FileHandle, &BufferSize, Buffer);
|
||||
FreePool (Buffer);
|
||||
|
||||
if (!EFI_ERROR (Status) &&
|
||||
if (!EFI_ERROR (Status) &&
|
||||
(BufferSize != sizeof (NameSize) + sizeof (DataSize) + sizeof (*Guid) + sizeof (Attributes) + NameSize + DataSize + sizeof (UINT32))
|
||||
) {
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
}
|
||||
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
/**
|
||||
Recursive function to display or delete variables.
|
||||
|
||||
This function will call itself to create a stack-based list of allt he variables to process,
|
||||
This function will call itself to create a stack-based list of allt he variables to process,
|
||||
then fromt he last to the first, they will do either printing or deleting.
|
||||
|
||||
This is necessary since once a delete happens GetNextVariableName() will work.
|
||||
@@ -480,9 +480,9 @@ CascadeProcessVariables (
|
||||
// No matter what happened we process our own variable
|
||||
// Only continue if Guid and VariableName are each either NULL or a match
|
||||
//
|
||||
if ( ( Name == NULL
|
||||
if ( ( Name == NULL
|
||||
|| gUnicodeCollation->MetaiMatch(gUnicodeCollation, FoundVarName, (CHAR16*) Name) )
|
||||
&& ( Guid == NULL
|
||||
&& ( Guid == NULL
|
||||
|| CompareGuid(&FoundVarGuid, Guid) )
|
||||
) {
|
||||
DataSize = 0;
|
||||
@@ -634,16 +634,16 @@ ProcessVariables (
|
||||
|
||||
if (!Found) {
|
||||
if (ShellStatus == SHELL_OUT_OF_RESOURCES) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellDebug1HiiHandle, L"dmpstore");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellDebug1HiiHandle, L"dmpstore");
|
||||
return (ShellStatus);
|
||||
} else if (Name != NULL && Guid == NULL) {
|
||||
if (StandardFormatOutput) {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_NO_VAR_FOUND_N_SFO), gShellDebug1HiiHandle, Name);
|
||||
} else {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_NO_VAR_FOUND_N), gShellDebug1HiiHandle, L"dmpstore", Name);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_NO_VAR_FOUND_N), gShellDebug1HiiHandle, L"dmpstore", Name);
|
||||
}
|
||||
} else if (Name != NULL && Guid != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_NO_VAR_FOUND_GN), gShellDebug1HiiHandle, L"dmpstore", Guid, Name);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_NO_VAR_FOUND_GN), gShellDebug1HiiHandle, L"dmpstore", Guid, Name);
|
||||
} else if (Name == NULL && Guid == NULL) {
|
||||
if (StandardFormatOutput) {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_NO_VAR_FOUND_SFO), gShellDebug1HiiHandle);
|
||||
@@ -656,7 +656,7 @@ ProcessVariables (
|
||||
} else {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_DMPSTORE_NO_VAR_FOUND_G), gShellDebug1HiiHandle, L"dmpstore", Guid);
|
||||
}
|
||||
}
|
||||
}
|
||||
return (SHELL_NOT_FOUND);
|
||||
}
|
||||
return (ShellStatus);
|
||||
@@ -710,7 +710,7 @@ ShellCommandRunDmpStore (
|
||||
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), gShellDebug1HiiHandle, L"dmpstore", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"dmpstore", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -718,19 +718,19 @@ ShellCommandRunDmpStore (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"dmpstore");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"dmpstore");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetFlag(Package, L"-all") && ShellCommandLineGetFlag(Package, L"-guid")) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDebug1HiiHandle, L"dmpstore", L"-all", L"-guid");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDebug1HiiHandle, L"dmpstore", L"-all", L"-guid");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetFlag(Package, L"-s") && ShellCommandLineGetFlag(Package, L"-l")) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDebug1HiiHandle, L"dmpstore", L"-l", L"-s");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDebug1HiiHandle, L"dmpstore", L"-l", L"-s");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if ((ShellCommandLineGetFlag(Package, L"-s") || ShellCommandLineGetFlag(Package, L"-l")) && ShellCommandLineGetFlag(Package, L"-d")) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDebug1HiiHandle, L"dmpstore", L"-l or -s", L"-d");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDebug1HiiHandle, L"dmpstore", L"-l or -s", L"-d");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if ((ShellCommandLineGetFlag(Package, L"-s") || ShellCommandLineGetFlag(Package, L"-l")) && ShellCommandLineGetFlag(Package, L"-sfo")) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDebug1HiiHandle, L"dmpstore", L"-l or -s", L"-sfo");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDebug1HiiHandle, L"dmpstore", L"-l or -s", L"-sfo");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@@ -741,7 +741,7 @@ ShellCommandRunDmpStore (
|
||||
if (GuidStr != NULL) {
|
||||
RStatus = StrToGuid (GuidStr, &GuidData);
|
||||
if (RETURN_ERROR (RStatus) || (GuidStr[GUID_STRING_LENGTH] != L'\0')) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dmpstore", GuidStr);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"dmpstore", GuidStr);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
Guid = &GuidData;
|
||||
@@ -762,7 +762,7 @@ ShellCommandRunDmpStore (
|
||||
Type = DmpStoreSave;
|
||||
File = ShellCommandLineGetValue(Package, L"-s");
|
||||
if (File == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"dmpstore", L"-s");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"dmpstore", L"-s");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ShellOpenFileByName (File, &FileHandle, EFI_FILE_MODE_WRITE | EFI_FILE_MODE_READ, 0);
|
||||
@@ -772,16 +772,16 @@ ShellCommandRunDmpStore (
|
||||
//
|
||||
FileInfo = ShellGetFileInfo (FileHandle);
|
||||
if (FileInfo == NULL) {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
Status = EFI_DEVICE_ERROR;
|
||||
} else {
|
||||
if ((FileInfo->Attribute & EFI_FILE_DIRECTORY) == EFI_FILE_DIRECTORY) {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_IS_DIRECTORY), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_IS_DIRECTORY), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
Status = EFI_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ShellDeleteFile (&FileHandle);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_DELETE_FAIL), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_DELETE_FAIL), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
}
|
||||
}
|
||||
FreePool (FileInfo);
|
||||
@@ -795,13 +795,13 @@ ShellCommandRunDmpStore (
|
||||
//
|
||||
// Otherwise it's bad.
|
||||
//
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
}
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
Status = ShellOpenFileByName (File, &FileHandle, EFI_FILE_MODE_CREATE | EFI_FILE_MODE_WRITE | EFI_FILE_MODE_READ, 0);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -813,21 +813,21 @@ ShellCommandRunDmpStore (
|
||||
Type = DmpStoreLoad;
|
||||
File = ShellCommandLineGetValue(Package, L"-l");
|
||||
if (File == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"dmpstore", L"-l");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"dmpstore", L"-l");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ShellOpenFileByName (File, &FileHandle, EFI_FILE_MODE_READ, 0);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
FileInfo = ShellGetFileInfo (FileHandle);
|
||||
if (FileInfo == NULL) {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
} else {
|
||||
if ((FileInfo->Attribute & EFI_FILE_DIRECTORY) == EFI_FILE_DIRECTORY) {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_IS_DIRECTORY), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_IS_DIRECTORY), gShellDebug1HiiHandle, L"dmpstore", File);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
FreePool (FileInfo);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for Edit shell Debug1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2005 - 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
|
||||
@@ -59,7 +59,7 @@ ShellCommandRunEdit (
|
||||
Status = ShellCommandLineParse (EmptyParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"edit", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"edit", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -67,7 +67,7 @@ ShellCommandRunEdit (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"edit");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"edit");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Cwd = gEfiShellProtocol->GetCurDir(NULL);
|
||||
@@ -86,7 +86,7 @@ ShellCommandRunEdit (
|
||||
}
|
||||
gEfiShellProtocol->SetCurDir(NULL, Nfs);
|
||||
FreePool(Nfs);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,7 +135,7 @@ ShellCommandRunEdit (
|
||||
//
|
||||
if (Status == EFI_SUCCESS) {
|
||||
} else if (Status == EFI_OUT_OF_RESOURCES) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN(STR_GEN_OUT_MEM), gShellDebug1HiiHandle, L"edit");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN(STR_GEN_OUT_MEM), gShellDebug1HiiHandle, L"edit");
|
||||
} else {
|
||||
if (Buffer != NULL) {
|
||||
if (StrCmp (Buffer, L"") != 0) {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Implements filebuffer interface functions.
|
||||
|
||||
Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2005 - 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
|
||||
@@ -53,7 +53,7 @@ EFI_EDITOR_FILE_BUFFER FileBufferConst = {
|
||||
//
|
||||
// the whole edit area needs to be refreshed
|
||||
//
|
||||
BOOLEAN FileBufferNeedRefresh;
|
||||
BOOLEAN FileBufferNeedRefresh;
|
||||
|
||||
//
|
||||
// only the current line in edit area needs to be refresh
|
||||
@@ -144,7 +144,7 @@ FileBufferBackup (
|
||||
|
||||
/**
|
||||
Advance to the next Count lines
|
||||
|
||||
|
||||
@param[in] Count The line number to advance by.
|
||||
@param[in] CurrentLine The pointer to the current line structure.
|
||||
@param[in] LineList The pointer to the linked list of lines.
|
||||
@@ -183,7 +183,7 @@ InternalEditorMiscLineAdvance (
|
||||
|
||||
/**
|
||||
Retreat to the previous Count lines.
|
||||
|
||||
|
||||
@param[in] Count The line number to retreat by.
|
||||
@param[in] CurrentLine The pointer to the current line structure.
|
||||
@param[in] LineList The pointer to the linked list of lines.
|
||||
@@ -222,7 +222,7 @@ InternalEditorMiscLineRetreat (
|
||||
|
||||
/**
|
||||
Advance/Retreat lines
|
||||
|
||||
|
||||
@param[in] Count line number to advance/retreat
|
||||
>0 : advance
|
||||
<0 : retreat
|
||||
@@ -484,7 +484,7 @@ FileBufferPrintLine (
|
||||
UINTN Limit;
|
||||
CHAR16 *PrintLine;
|
||||
CHAR16 *PrintLine2;
|
||||
UINTN BufLen;
|
||||
UINTN BufLen;
|
||||
|
||||
//
|
||||
// print start from correct character
|
||||
@@ -710,7 +710,7 @@ FileBufferCreateLine (
|
||||
Set FileName field in FileBuffer.
|
||||
|
||||
@param Str The file name to set.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The filename was successfully set.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@retval EFI_INVALID_PARAMETER Str is not a valid filename.
|
||||
@@ -763,10 +763,10 @@ FileBufferFree (
|
||||
|
||||
/**
|
||||
Read a file from disk into the FileBuffer.
|
||||
|
||||
|
||||
@param[in] FileName The filename to read.
|
||||
@param[in] Recover TRUE if is for recover mode, no information printouts.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The load was successful.
|
||||
@retval EFI_LOAD_ERROR The load failed.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@@ -823,7 +823,7 @@ FileBufferRead (
|
||||
}
|
||||
|
||||
Info = ShellGetFileInfo(FileHandle);
|
||||
|
||||
|
||||
if (Info->Attribute & EFI_FILE_DIRECTORY) {
|
||||
StatusBarSetStatusString (L"Directory Can Not Be Edited");
|
||||
FreePool (Info);
|
||||
@@ -1397,7 +1397,7 @@ UnicodeToAscii (
|
||||
@param[in] FileName The file name for writing.
|
||||
|
||||
@retval EFI_SUCCESS Data was written.
|
||||
@retval EFI_LOAD_ERROR
|
||||
@retval EFI_LOAD_ERROR
|
||||
@retval EFI_OUT_OF_RESOURCES There were not enough resources to write the file.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -1472,7 +1472,7 @@ FileBufferSave (
|
||||
FreePool(Info);
|
||||
return EFI_LOAD_ERROR;
|
||||
}
|
||||
|
||||
|
||||
if (Info != NULL) {
|
||||
Attribute = Info->Attribute & ~EFI_FILE_READ_ONLY;
|
||||
FreePool(Info);
|
||||
@@ -1550,7 +1550,7 @@ FileBufferSave (
|
||||
Size = TotalSize - LeftSize;
|
||||
Status = ShellWriteFile (FileHandle, &Size, Cache);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellDeleteFile (&FileHandle);
|
||||
ShellDeleteFile (&FileHandle);
|
||||
FreePool (Cache);
|
||||
return EFI_LOAD_ERROR;
|
||||
}
|
||||
@@ -1911,7 +1911,7 @@ FileBufferDoReturn (
|
||||
}
|
||||
|
||||
/**
|
||||
Delete current character from current line. This is the effect caused
|
||||
Delete current character from current line. This is the effect caused
|
||||
by the 'del' key.
|
||||
|
||||
@retval EFI_SUCCESS
|
||||
@@ -2023,7 +2023,7 @@ FileBufferScrollRight (
|
||||
/**
|
||||
Insert a char into line
|
||||
|
||||
|
||||
|
||||
@param[in] Line The line to insert into.
|
||||
@param[in] Char The char to insert.
|
||||
@param[in] Pos The position to insert the char at ( start from 0 ).
|
||||
@@ -2395,7 +2395,7 @@ FileBufferEnd (
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
Dispatch input to different handler
|
||||
@param[in] Key The input key. One of:
|
||||
ASCII KEY
|
||||
@@ -2610,7 +2610,7 @@ RightCurrentScreen (
|
||||
|
||||
/**
|
||||
Advance/Retreat lines and set CurrentLine in FileBuffer to it
|
||||
|
||||
|
||||
@param[in] Count The line number to advance/retreat
|
||||
>0 : advance
|
||||
<0: retreat
|
||||
@@ -2756,7 +2756,7 @@ FileBufferMovePosition (
|
||||
/**
|
||||
Cut current line out and return a pointer to it.
|
||||
|
||||
@param[out] CutLine Upon a successful return pointer to the pointer to
|
||||
@param[out] CutLine Upon a successful return pointer to the pointer to
|
||||
the allocated cut line.
|
||||
|
||||
@retval EFI_SUCCESS The cut was successful.
|
||||
@@ -2930,7 +2930,7 @@ FileBufferSearch (
|
||||
|
||||
Column = 0;
|
||||
Position = 0;
|
||||
|
||||
|
||||
//
|
||||
// search if in current line
|
||||
//
|
||||
@@ -2949,7 +2949,7 @@ FileBufferSearch (
|
||||
if (CharPos != NULL) {
|
||||
Position = CharPos - Current + 1;
|
||||
Found = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// found
|
||||
@@ -2971,8 +2971,8 @@ FileBufferSearch (
|
||||
if (CharPos != NULL) {
|
||||
Position = CharPos - Line->Buffer + 1;
|
||||
Found = TRUE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (Found) {
|
||||
//
|
||||
// found
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Declares filebuffer interface functions.
|
||||
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2005 - 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
|
||||
@@ -50,7 +50,7 @@ FileBufferRefresh (
|
||||
VOID
|
||||
);
|
||||
|
||||
/**
|
||||
/**
|
||||
Dispatch input to different handler
|
||||
@param[in] Key The input key. One of:
|
||||
ASCII KEY
|
||||
@@ -98,7 +98,7 @@ FileBufferRestorePosition (
|
||||
Set FileName field in FileBuffer.
|
||||
|
||||
@param Str The file name to set.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The filename was successfully set.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@retval EFI_INVALID_PARAMETER Str is not a valid filename.
|
||||
@@ -110,10 +110,10 @@ FileBufferSetFileName (
|
||||
|
||||
/**
|
||||
Read a file from disk into the FileBuffer.
|
||||
|
||||
|
||||
@param[in] FileName The filename to read.
|
||||
@param[in] Recover TRUE if is for recover mode, no information printouts.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The load was successful.
|
||||
@retval EFI_LOAD_ERROR The load failed.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@@ -131,7 +131,7 @@ FileBufferRead (
|
||||
@param[in] FileName The file name for writing.
|
||||
|
||||
@retval EFI_SUCCESS Data was written.
|
||||
@retval EFI_LOAD_ERROR
|
||||
@retval EFI_LOAD_ERROR
|
||||
@retval EFI_OUT_OF_RESOURCES There were not enough resources to write the file.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -154,7 +154,7 @@ FileBufferMovePosition (
|
||||
/**
|
||||
Cut current line out and return a pointer to it.
|
||||
|
||||
@param[out] CutLine Upon a successful return pointer to the pointer to
|
||||
@param[out] CutLine Upon a successful return pointer to the pointer to
|
||||
the allocated cut line.
|
||||
|
||||
@retval EFI_SUCCESS The cut was successful.
|
||||
|
@@ -77,7 +77,7 @@ MainCommandGotoLine (
|
||||
/**
|
||||
Save current file to disk, you can save to current file name or
|
||||
save to another file name.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The file was saved correctly.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@retval EFI_LOAD_ERROR A file access error occured.
|
||||
@@ -1136,7 +1136,7 @@ MainCommandGotoLine (
|
||||
/**
|
||||
Save current file to disk, you can save to current file name or
|
||||
save to another file name.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The file was saved correctly.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@retval EFI_LOAD_ERROR A file access error occured.
|
||||
@@ -1150,7 +1150,7 @@ MainCommandSaveFile (
|
||||
CHAR16 *FileName;
|
||||
BOOLEAN OldFile;
|
||||
CHAR16 *Str;
|
||||
SHELL_FILE_HANDLE FileHandle;
|
||||
SHELL_FILE_HANDLE FileHandle;
|
||||
EFI_FILE_INFO *Info;
|
||||
|
||||
//
|
||||
@@ -1280,15 +1280,15 @@ MainCommandSaveFile (
|
||||
StatusBarSetStatusString (L"Open Failed");
|
||||
FreePool (FileName);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
Info = ShellGetFileInfo(FileHandle);
|
||||
if (Info == NULL) {
|
||||
StatusBarSetStatusString (L"Access Denied");
|
||||
FreePool (FileName);
|
||||
return (EFI_SUCCESS);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (Info->Attribute & EFI_FILE_READ_ONLY) {
|
||||
StatusBarSetStatusString (L"Access Denied - Read Only");
|
||||
FreePool (Info);
|
||||
@@ -1365,13 +1365,13 @@ MainCommandDisplayHelp (
|
||||
EFI_KEY_DATA KeyData;
|
||||
EFI_STATUS Status;
|
||||
UINTN EventIndex;
|
||||
|
||||
|
||||
//
|
||||
// print helpInfo
|
||||
// print helpInfo
|
||||
//
|
||||
for (CurrentLine = 0; 0 != MainMenuHelpInfo[CurrentLine]; CurrentLine++) {
|
||||
InfoString = HiiGetString(gShellDebug1HiiHandle, MainMenuHelpInfo[CurrentLine], NULL);
|
||||
ShellPrintEx (0, CurrentLine+1, L"%E%s%N", InfoString);
|
||||
ShellPrintEx (0, CurrentLine+1, L"%E%s%N", InfoString);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -1414,7 +1414,7 @@ MainCommandDisplayHelp (
|
||||
FileBufferRestorePosition ();
|
||||
FileBufferNeedRefresh = TRUE;
|
||||
FileBufferOnlyLineNeedRefresh = FALSE;
|
||||
FileBufferRefresh ();
|
||||
FileBufferRefresh ();
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
@@ -1649,10 +1649,10 @@ MainEditorRefresh (
|
||||
//
|
||||
// call the components refresh function
|
||||
//
|
||||
if (EditorFirst
|
||||
|| StrCmp (FileBufferBackupVar.FileName, FileBuffer.FileName) != 0
|
||||
|| FileBufferBackupVar.FileType != FileBuffer.FileType
|
||||
|| FileBufferBackupVar.FileModified != FileBuffer.FileModified
|
||||
if (EditorFirst
|
||||
|| StrCmp (FileBufferBackupVar.FileName, FileBuffer.FileName) != 0
|
||||
|| FileBufferBackupVar.FileType != FileBuffer.FileType
|
||||
|| FileBufferBackupVar.FileModified != FileBuffer.FileModified
|
||||
|| FileBufferBackupVar.ReadOnly != FileBuffer.ReadOnly) {
|
||||
|
||||
MainTitleBarRefresh (MainEditor.FileBuffer->FileName, MainEditor.FileBuffer->FileType, MainEditor.FileBuffer->ReadOnly, MainEditor.FileBuffer->FileModified, MainEditor.ScreenSize.Column, MainEditor.ScreenSize.Row, 0, 0);
|
||||
@@ -1660,8 +1660,8 @@ MainEditorRefresh (
|
||||
}
|
||||
|
||||
if (EditorFirst
|
||||
|| FileBufferBackupVar.FilePosition.Row != FileBuffer.FilePosition.Row
|
||||
|| FileBufferBackupVar.FilePosition.Column != FileBuffer.FilePosition.Column
|
||||
|| FileBufferBackupVar.FilePosition.Row != FileBuffer.FilePosition.Row
|
||||
|| FileBufferBackupVar.FilePosition.Column != FileBuffer.FilePosition.Column
|
||||
|| FileBufferBackupVar.ModeInsert != FileBuffer.ModeInsert
|
||||
|| StatusBarGetRefresh()) {
|
||||
|
||||
@@ -1906,9 +1906,9 @@ MainEditorKeyInput (
|
||||
Status = MenuBarDispatchFunctionKey (&KeyData.Key);
|
||||
} else {
|
||||
StatusBarSetStatusString (L"Unknown Command");
|
||||
FileBufferMouseNeedRefresh = FALSE;
|
||||
FileBufferMouseNeedRefresh = FALSE;
|
||||
}
|
||||
|
||||
|
||||
if (Status != EFI_SUCCESS && Status != EFI_OUT_OF_RESOURCES) {
|
||||
//
|
||||
// not already has some error status
|
||||
@@ -1975,6 +1975,6 @@ MainEditorBackup (
|
||||
)
|
||||
{
|
||||
FileBufferBackup ();
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
// /**
|
||||
//
|
||||
// Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2005 - 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
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
#langdef en-US "english"
|
||||
|
||||
#string STR_EDIT_LIBEDITOR_TITLEBAR #language en-US "%EMainEditor init failed on TitleBar init\r\n%N"
|
||||
#string STR_EDIT_LIBEDITOR_TITLEBAR #language en-US "%EMainEditor init failed on TitleBar init\r\n%N"
|
||||
#string STR_EDIT_LIBEDITOR_MAINMENU #language en-US "%EMainEditor init was not successful on MainMenu init\r\n%N"
|
||||
#string STR_EDIT_LIBEDITOR_STATUSBAR #language en-US "%EMainEditor init was not successful on StatusBar init\r\n%N"
|
||||
#string STR_EDIT_LIBEDITOR_INPUTBAR #language en-US "%EMainEditor init was not successful on InputBar init\r\n%N"
|
||||
@@ -28,33 +28,33 @@
|
||||
#string STR_EDIT_LIBEDITOR_TITLEBAR_CLEANUP #language en-US "TitleBar cleanup was not successful\r\n"
|
||||
#string STR_EDIT_LIBEDITOR_MENUBAR_CLEANUP #language en-US "MenuBar cleanup was not successful\r\n"
|
||||
#string STR_EDIT_LIBEDITOR_STATUSBAR_CLEANUP #language en-US "StatusBar cleanup was not successful\r\n"
|
||||
#string STR_EDIT_LIBEDITOR_INPUTBAR_CLEANUP #language en-US "InputBar cleanup was not successful\r\n"
|
||||
#string STR_EDIT_LIBEDITOR_FILEBUFFER_CLEANUP #language en-US "FileBuffer cleanup was not successful\r\n"
|
||||
#string STR_EDIT_LIBEDITOR_INPUTBAR_CLEANUP #language en-US "InputBar cleanup was not successful\r\n"
|
||||
#string STR_EDIT_LIBEDITOR_FILEBUFFER_CLEANUP #language en-US "FileBuffer cleanup was not successful\r\n"
|
||||
#string STR_EDIT_LIBEDITOR_MAINEDITOR_INIT #language en-US "%EMainEditor init was not succesful on TitleBar init\r\n%N"
|
||||
#string STR_EDIT_LIBINPUTBAR_MAININPUTBAR #language en-US "%s"
|
||||
#string STR_EDIT_LIBMENUBAR_OPEN_FILE #language en-US "Open File"
|
||||
#string STR_EDIT_LIBMENUBAR_SAVE_FILE #language en-US "Save File"
|
||||
#string STR_EDIT_LIBMENUBAR_OPEN_FILE #language en-US "Open File"
|
||||
#string STR_EDIT_LIBMENUBAR_SAVE_FILE #language en-US "Save File"
|
||||
#string STR_EDIT_LIBMENUBAR_EXIT #language en-US "Exit"
|
||||
#string STR_EDIT_LIBMENUBAR_CUT_LINE #language en-US "Cut Line"
|
||||
#string STR_EDIT_LIBMENUBAR_PASTE_LINE #language en-US "Paste Line"
|
||||
#string STR_EDIT_LIBMENUBAR_GO_TO_LINE #language en-US "Go To Line"
|
||||
#string STR_EDIT_LIBMENUBAR_SEARCH #language en-US "Search"
|
||||
#string STR_EDIT_LIBMENUBAR_SEARCH_REPLACE #language en-US "Search/Replace"
|
||||
#string STR_EDIT_LIBMENUBAR_FILE_TYPE #language en-US "File Type"
|
||||
#string STR_EDIT_LIBMENUBAR_F1 #language en-US "F1"
|
||||
#string STR_EDIT_LIBMENUBAR_F2 #language en-US "F2"
|
||||
#string STR_EDIT_LIBMENUBAR_F3 #language en-US "F3"
|
||||
#string STR_EDIT_LIBMENUBAR_F4 #language en-US "F4"
|
||||
#string STR_EDIT_LIBMENUBAR_F5 #language en-US "F5"
|
||||
#string STR_EDIT_LIBMENUBAR_F6 #language en-US "F6"
|
||||
#string STR_EDIT_LIBMENUBAR_F7 #language en-US "F7"
|
||||
#string STR_EDIT_LIBMENUBAR_F8 #language en-US "F8"
|
||||
#string STR_EDIT_LIBMENUBAR_F9 #language en-US "F9"
|
||||
#string STR_EDIT_LIBMENUBAR_F10 #language en-US "F10"
|
||||
#string STR_EDIT_LIBMENUBAR_F11 #language en-US "F11"
|
||||
#string STR_EDIT_LIBMENUBAR_F12 #language en-US "F12"
|
||||
#string STR_EDIT_LIBMENUBAR_CTRL_E #language en-US "Ctrl+E"
|
||||
#string STR_EDIT_LIBMENUBAR_CTRL_W #language en-US "Ctrl+W"
|
||||
#string STR_EDIT_LIBMENUBAR_CUT_LINE #language en-US "Cut Line"
|
||||
#string STR_EDIT_LIBMENUBAR_PASTE_LINE #language en-US "Paste Line"
|
||||
#string STR_EDIT_LIBMENUBAR_GO_TO_LINE #language en-US "Go To Line"
|
||||
#string STR_EDIT_LIBMENUBAR_SEARCH #language en-US "Search"
|
||||
#string STR_EDIT_LIBMENUBAR_SEARCH_REPLACE #language en-US "Search/Replace"
|
||||
#string STR_EDIT_LIBMENUBAR_FILE_TYPE #language en-US "File Type"
|
||||
#string STR_EDIT_LIBMENUBAR_F1 #language en-US "F1"
|
||||
#string STR_EDIT_LIBMENUBAR_F2 #language en-US "F2"
|
||||
#string STR_EDIT_LIBMENUBAR_F3 #language en-US "F3"
|
||||
#string STR_EDIT_LIBMENUBAR_F4 #language en-US "F4"
|
||||
#string STR_EDIT_LIBMENUBAR_F5 #language en-US "F5"
|
||||
#string STR_EDIT_LIBMENUBAR_F6 #language en-US "F6"
|
||||
#string STR_EDIT_LIBMENUBAR_F7 #language en-US "F7"
|
||||
#string STR_EDIT_LIBMENUBAR_F8 #language en-US "F8"
|
||||
#string STR_EDIT_LIBMENUBAR_F9 #language en-US "F9"
|
||||
#string STR_EDIT_LIBMENUBAR_F10 #language en-US "F10"
|
||||
#string STR_EDIT_LIBMENUBAR_F11 #language en-US "F11"
|
||||
#string STR_EDIT_LIBMENUBAR_F12 #language en-US "F12"
|
||||
#string STR_EDIT_LIBMENUBAR_CTRL_E #language en-US "Ctrl+E"
|
||||
#string STR_EDIT_LIBMENUBAR_CTRL_W #language en-US "Ctrl+W"
|
||||
#string STR_EDIT_HELP_TITLE #language en-US "Help \n"
|
||||
#string STR_EDIT_HELP_BLANK #language en-US " \n"
|
||||
#string STR_EDIT_HELP_LIST_TITLE #language en-US "Control Key Function Key Command \n"
|
||||
@@ -69,7 +69,7 @@
|
||||
#string STR_EDIT_HELP_OPEN_FILE #language en-US "Ctrl-O F8 Open File \n"
|
||||
#string STR_EDIT_HELP_FILE_TYPE #language en-US "Ctrl-T F9 File Type \n"
|
||||
#string STR_EDIT_HELP_EXIT_HELP #language en-US "Use Ctrl-W to exit this help \n"
|
||||
#string STR_EDIT_MAIN_INVALID_FILE_NAME #language en-US "%Hedit%N: Invalid File Name\r\n"
|
||||
#string STR_EDIT_MAIN_INIT_FAILED #language en-US "%Hedit%N: Initialization was not successful\r\n"
|
||||
#string STR_EDIT_MAIN_BUFFER #language en-US "%Hedit%N: %s\r\n"
|
||||
#string STR_EDIT_MAIN_UNKNOWN_EDITOR_ERR #language en-US "%Hedit%N: Unknown Editor Error\r\n"
|
||||
#string STR_EDIT_MAIN_INVALID_FILE_NAME #language en-US "%Hedit%N: Invalid File Name\r\n"
|
||||
#string STR_EDIT_MAIN_INIT_FAILED #language en-US "%Hedit%N: Initialization was not successful\r\n"
|
||||
#string STR_EDIT_MAIN_BUFFER #language en-US "%Hedit%N: %s\r\n"
|
||||
#string STR_EDIT_MAIN_UNKNOWN_EDITOR_ERR #language en-US "%Hedit%N: Unknown Editor Error\r\n"
|
||||
|
@@ -251,7 +251,7 @@ InputBarRefresh (
|
||||
}
|
||||
|
||||
mReturnString[Size] = CHAR_NULL;
|
||||
|
||||
|
||||
|
||||
//
|
||||
// restore screen attributes
|
||||
|
@@ -47,7 +47,7 @@ MenuBarInit (
|
||||
CONST EDITOR_MENU_ITEM *ItemsWalker;
|
||||
|
||||
for (NumItems = 0, ItemsWalker = Items ; ItemsWalker != NULL && ItemsWalker->Function != NULL ; ItemsWalker++,NumItems++);
|
||||
|
||||
|
||||
MenuItems = AllocateZeroPool((NumItems+1) * sizeof(EDITOR_MENU_ITEM));
|
||||
if (MenuItems == NULL) {
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
@@ -69,7 +69,7 @@ ControlHotKeyInit (
|
||||
)
|
||||
{
|
||||
ControlBasedMenuFunctions = Items;
|
||||
return EFI_SUCCESS;
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
/**
|
||||
Refresh function for the menu bar.
|
||||
@@ -138,7 +138,7 @@ MenuBarRefresh (
|
||||
|
||||
@param[in] Key The pressed key.
|
||||
|
||||
@retval EFI_NOT_FOUND The key was not a valid function key
|
||||
@retval EFI_NOT_FOUND The key was not a valid function key
|
||||
(an error was sent to the status bar).
|
||||
@return The return value from the called dispatch function.
|
||||
**/
|
||||
@@ -167,7 +167,7 @@ MenuBarDispatchFunctionKey (
|
||||
|
||||
@param[in] KeyData The pressed key.
|
||||
|
||||
@retval EFI_NOT_FOUND The key was not a valid control-based key
|
||||
@retval EFI_NOT_FOUND The key was not a valid control-based key
|
||||
(an error was sent to the status bar).
|
||||
@return EFI_SUCCESS.
|
||||
**/
|
||||
|
@@ -93,7 +93,7 @@ MenuBarRefresh (
|
||||
|
||||
@param[in] Key The pressed key.
|
||||
|
||||
@retval EFI_NOT_FOUND The key was not a valid function key
|
||||
@retval EFI_NOT_FOUND The key was not a valid function key
|
||||
(an error was sent to the status bar).
|
||||
@return The return value from the called dispatch function.
|
||||
**/
|
||||
@@ -107,7 +107,7 @@ MenuBarDispatchFunctionKey (
|
||||
|
||||
@param[in] KeyData The pressed key.
|
||||
|
||||
@retval EFI_NOT_FOUND The key was not a valid control-based key
|
||||
@retval EFI_NOT_FOUND The key was not a valid control-based key
|
||||
(an error was sent to the status bar).
|
||||
@return EFI_SUCCESS.
|
||||
**/
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Implements statusbar interface functions.
|
||||
|
||||
Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2005 - 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
|
||||
@@ -71,7 +71,7 @@ typedef union {
|
||||
/**
|
||||
Cause the status bar to refresh it's printing on the screen.
|
||||
|
||||
@param[in] EditorFirst TRUE to indicate the first launch of the editor.
|
||||
@param[in] EditorFirst TRUE to indicate the first launch of the editor.
|
||||
FALSE otherwise.
|
||||
@param[in] LastRow LastPrintable row.
|
||||
@param[in] LastCol Last printable column.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Declares statusbar interface functions.
|
||||
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2005 - 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
|
||||
@@ -38,7 +38,7 @@ StatusBarCleanup (
|
||||
/**
|
||||
Cause the status bar to refresh it's printing on the screen.
|
||||
|
||||
@param[in] EditorFirst TRUE to indicate the first launch of the editor.
|
||||
@param[in] EditorFirst TRUE to indicate the first launch of the editor.
|
||||
FALSE otherwise.
|
||||
@param[in] LastRow LastPrintable row.
|
||||
@param[in] LastCol Last printable column.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for EfiCompress shell Debug1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 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
|
||||
@@ -70,7 +70,7 @@ ShellCommandRunEfiCompress (
|
||||
Status = ShellCommandLineParse (EmptyParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"eficompress", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"eficompress", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -78,10 +78,10 @@ ShellCommandRunEfiCompress (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 3) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"eficompress");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"eficompress");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) < 3) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"eficompress");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"eficompress");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
TempParam = ShellCommandLineGetRawValue(Package, 1);
|
||||
@@ -89,26 +89,26 @@ ShellCommandRunEfiCompress (
|
||||
InFileName = ShellFindFilePath(TempParam);
|
||||
OutFileName = ShellCommandLineGetRawValue(Package, 2);
|
||||
if (InFileName == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_FIND_FAIL), gShellDebug1HiiHandle, L"eficompress", TempParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_FIND_FAIL), gShellDebug1HiiHandle, L"eficompress", TempParam);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
} else {
|
||||
if (ShellIsDirectory(InFileName) == EFI_SUCCESS){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_DIR), gShellDebug1HiiHandle, L"eficompress", InFileName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_DIR), gShellDebug1HiiHandle, L"eficompress", InFileName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
if (ShellIsDirectory(OutFileName) == EFI_SUCCESS){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_DIR), gShellDebug1HiiHandle, L"eficompress", OutFileName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_DIR), gShellDebug1HiiHandle, L"eficompress", OutFileName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
if (ShellStatus == SHELL_SUCCESS) {
|
||||
Status = ShellOpenFileByName(InFileName, &InShellFileHandle, EFI_FILE_MODE_READ, 0);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"eficompress", ShellCommandLineGetRawValue(Package, 1));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"eficompress", ShellCommandLineGetRawValue(Package, 1));
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
}
|
||||
Status = ShellOpenFileByName(OutFileName, &OutShellFileHandle, EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE|EFI_FILE_MODE_CREATE, 0);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"eficompress", ShellCommandLineGetRawValue(Package, 2));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"eficompress", ShellCommandLineGetRawValue(Package, 2));
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
@@ -140,7 +140,7 @@ ShellCommandRunEfiCompress (
|
||||
OutSize2 = (UINTN)OutSize;
|
||||
Status = gEfiShellProtocol->WriteFile(OutShellFileHandle, &OutSize2, OutBuffer);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_WRITE_FAIL), gShellDebug1HiiHandle, L"eficompress", OutFileName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_WRITE_FAIL), gShellDebug1HiiHandle, L"eficompress", OutFileName);
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for EfiDecompress shell Debug1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 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
|
||||
@@ -77,7 +77,7 @@ ShellCommandRunEfiDecompress (
|
||||
Status = ShellCommandLineParse (EmptyParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"efidecompress", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"efidecompress", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -85,10 +85,10 @@ ShellCommandRunEfiDecompress (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 3) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"efidecompress");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"efidecompress");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) < 3) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"efidecompress");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"efidecompress");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
TempParam = ShellCommandLineGetRawValue(Package, 1);
|
||||
@@ -96,21 +96,21 @@ ShellCommandRunEfiDecompress (
|
||||
InFileName = ShellFindFilePath(TempParam);
|
||||
OutFileName = ShellCommandLineGetRawValue(Package, 2);
|
||||
if (InFileName == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_FIND_FAIL), gShellDebug1HiiHandle, L"efidecompress", TempParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_FIND_FAIL), gShellDebug1HiiHandle, L"efidecompress", TempParam);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
} else {
|
||||
if (ShellIsDirectory(InFileName) == EFI_SUCCESS){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_DIR), gShellDebug1HiiHandle, L"efidecompress", InFileName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_DIR), gShellDebug1HiiHandle, L"efidecompress", InFileName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
if (ShellIsDirectory(OutFileName) == EFI_SUCCESS){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_DIR), gShellDebug1HiiHandle, L"efidecompress", OutFileName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_DIR), gShellDebug1HiiHandle, L"efidecompress", OutFileName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
if (ShellStatus == SHELL_SUCCESS) {
|
||||
Status = ShellOpenFileByName(InFileName, &InFileHandle, EFI_FILE_MODE_READ, 0);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"efidecompress", ShellCommandLineGetRawValue(Package, 1));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"efidecompress", ShellCommandLineGetRawValue(Package, 1));
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
Defines HBufferImage - the view of the file that is visible at any point,
|
||||
as well as the event handlers for editing the file
|
||||
|
||||
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved. <BR>
|
||||
|
||||
Copyright (c) 2005 - 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
|
||||
@@ -138,7 +138,7 @@ HBufferImageInit (
|
||||
}
|
||||
|
||||
/**
|
||||
Backup function for HBufferImage. Only a few fields need to be backup.
|
||||
Backup function for HBufferImage. Only a few fields need to be backup.
|
||||
This is for making the file buffer refresh as few as possible.
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@@ -190,7 +190,7 @@ HBufferImageBackup (
|
||||
Lines
|
||||
CurrentLine
|
||||
NumLines
|
||||
ListHead
|
||||
ListHead
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
**/
|
||||
@@ -946,7 +946,7 @@ HBufferImageRead (
|
||||
case FileTypeMemBuffer:
|
||||
Status = HMemImageRead (MemOffset, MemSize, Recover);
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
Status = EFI_NOT_FOUND;
|
||||
break;
|
||||
@@ -1013,7 +1013,7 @@ HBufferImageSave (
|
||||
case FileTypeMemBuffer:
|
||||
Status = HMemImageSave (MemOffset, MemSize);
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
Status = EFI_NOT_FOUND;
|
||||
break;
|
||||
@@ -1030,7 +1030,7 @@ HBufferImageSave (
|
||||
Create a new line and append it to the line list.
|
||||
Fields affected:
|
||||
NumLines
|
||||
Lines
|
||||
Lines
|
||||
|
||||
@retval NULL create line failed.
|
||||
@return the line created.
|
||||
@@ -1368,7 +1368,7 @@ HBufferImageDoCharInput (
|
||||
Check user specified FileRow is above current screen.
|
||||
|
||||
@param[in] FileRow Row of file position ( start from 1 ).
|
||||
|
||||
|
||||
@retval TRUE It is above the current screen.
|
||||
@retval FALSE It is not above the current screen.
|
||||
|
||||
@@ -1880,12 +1880,12 @@ HBufferImageGetTotalSize (
|
||||
|
||||
/**
|
||||
Delete character from buffer.
|
||||
|
||||
|
||||
@param[in] Pos Position, Pos starting from 0.
|
||||
@param[in] Count The Count of characters to delete.
|
||||
@param[out] DeleteBuffer The DeleteBuffer.
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_SUCCESS Success
|
||||
**/
|
||||
EFI_STATUS
|
||||
HBufferImageDeleteCharacterFromBuffer (
|
||||
@@ -2014,7 +2014,7 @@ HBufferImageDeleteCharacterFromBuffer (
|
||||
@param[in] Count Count of characters to add.
|
||||
@param[in] AddBuffer Add buffer.
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_SUCCESS Success.
|
||||
**/
|
||||
EFI_STATUS
|
||||
HBufferImageAddCharacterToBuffer (
|
||||
@@ -2166,7 +2166,7 @@ HBufferImageDoDelete (
|
||||
|
||||
/**
|
||||
Change the raw buffer to a list of lines for the UI.
|
||||
|
||||
|
||||
@param[in] Buffer The pointer to the buffer to fill.
|
||||
@param[in] Bytes The size of the buffer in bytes.
|
||||
|
||||
@@ -2231,7 +2231,7 @@ HBufferImageBufferToList (
|
||||
|
||||
/**
|
||||
Change the list of lines from the UI to a raw buffer.
|
||||
|
||||
|
||||
@param[in] Buffer The pointer to the buffer to fill.
|
||||
@param[in] Bytes The size of the buffer in bytes.
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
Defines BufferImage - the view of the file that is visible at any point,
|
||||
Defines BufferImage - the view of the file that is visible at any point,
|
||||
as well as the event handlers for editing the file
|
||||
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
|
||||
Copyright (c) 2005 - 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
|
||||
@@ -72,7 +72,7 @@ HBufferImageHandleInput (
|
||||
);
|
||||
|
||||
/**
|
||||
Backup function for HBufferImage. Only a few fields need to be backup.
|
||||
Backup function for HBufferImage. Only a few fields need to be backup.
|
||||
This is for making the file buffer refresh as few as possible.
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@@ -151,7 +151,7 @@ HBufferImageMovePosition (
|
||||
Create a new line and append it to the line list.
|
||||
Fields affected:
|
||||
NumLines
|
||||
Lines
|
||||
Lines
|
||||
|
||||
@retval NULL create line failed.
|
||||
@return the line created.
|
||||
@@ -174,12 +174,12 @@ HBufferImageFree (
|
||||
|
||||
/**
|
||||
Delete character from buffer.
|
||||
|
||||
|
||||
@param[in] Pos Position, Pos starting from 0.
|
||||
@param[in] Count The Count of characters to delete.
|
||||
@param[out] DeleteBuffer The DeleteBuffer.
|
||||
|
||||
@retval EFI_SUCCESS Success
|
||||
@retval EFI_SUCCESS Success
|
||||
**/
|
||||
EFI_STATUS
|
||||
HBufferImageDeleteCharacterFromBuffer (
|
||||
@@ -195,7 +195,7 @@ HBufferImageDeleteCharacterFromBuffer (
|
||||
@param[in] Count Count of characters to add.
|
||||
@param[in] AddBuffer Add buffer.
|
||||
|
||||
@retval EFI_SUCCESS Success.
|
||||
@retval EFI_SUCCESS Success.
|
||||
**/
|
||||
EFI_STATUS
|
||||
HBufferImageAddCharacterToBuffer (
|
||||
@@ -206,7 +206,7 @@ HBufferImageAddCharacterToBuffer (
|
||||
|
||||
/**
|
||||
Change the raw buffer to a list of lines for the UI.
|
||||
|
||||
|
||||
@param[in] Buffer The pointer to the buffer to fill.
|
||||
@param[in] Bytes The size of the buffer in bytes.
|
||||
|
||||
@@ -221,7 +221,7 @@ HBufferImageBufferToList (
|
||||
|
||||
/**
|
||||
Change the list of lines from the UI to a raw buffer.
|
||||
|
||||
|
||||
@param[in] Buffer The pointer to the buffer to fill.
|
||||
@param[in] Bytes The size of the buffer in bytes.
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Functions to deal with Clip Board
|
||||
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
|
||||
Copyright (c) 2005 - 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
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
Defines DiskImage - the view of the file that is visible at any point,
|
||||
Defines DiskImage - the view of the file that is visible at any point,
|
||||
as well as the event handlers for editing the file
|
||||
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
|
||||
Copyright (c) 2005 - 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
|
||||
|
@@ -39,7 +39,7 @@ HEFI_EDITOR_DISK_IMAGE HDiskImageConst = {
|
||||
|
||||
/**
|
||||
Initialization function for HDiskImage.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@retval EFI_LOAD_ERROR A load error occured.
|
||||
**/
|
||||
@@ -59,7 +59,7 @@ HDiskImageInit (
|
||||
}
|
||||
|
||||
/**
|
||||
Backup function for HDiskImage. Only a few fields need to be backup.
|
||||
Backup function for HDiskImage. Only a few fields need to be backup.
|
||||
This is for making the Disk buffer refresh as few as possible.
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@@ -154,7 +154,7 @@ HDiskImageSetDiskNameOffsetSize (
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@retval EFI_LOAD_ERROR A load error occured.
|
||||
@retval EFI_INVALID_PARAMETER A parameter was invalid.
|
||||
@retval EFI_INVALID_PARAMETER A parameter was invalid.
|
||||
**/
|
||||
EFI_STATUS
|
||||
HDiskImageRead (
|
||||
@@ -326,7 +326,7 @@ HDiskImageRead (
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@retval EFI_LOAD_ERROR A load error occured.
|
||||
@retval EFI_INVALID_PARAMETER A parameter was invalid.
|
||||
@retval EFI_INVALID_PARAMETER A parameter was invalid.
|
||||
**/
|
||||
EFI_STATUS
|
||||
HDiskImageSave (
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
Defines DiskImage - the view of the file that is visible at any point,
|
||||
Defines DiskImage - the view of the file that is visible at any point,
|
||||
as well as the event handlers for editing the file
|
||||
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
|
||||
Copyright (c) 2005 - 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
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
/**
|
||||
Initialization function for HDiskImage.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@retval EFI_LOAD_ERROR A load error occured.
|
||||
**/
|
||||
@@ -40,7 +40,7 @@ HDiskImageCleanup (
|
||||
);
|
||||
|
||||
/**
|
||||
Backup function for HDiskImage. Only a few fields need to be backup.
|
||||
Backup function for HDiskImage. Only a few fields need to be backup.
|
||||
This is for making the Disk buffer refresh as few as possible.
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@@ -62,7 +62,7 @@ HDiskImageBackup (
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@retval EFI_LOAD_ERROR A load error occured.
|
||||
@retval EFI_INVALID_PARAMETER A parameter was invalid.
|
||||
@retval EFI_INVALID_PARAMETER A parameter was invalid.
|
||||
**/
|
||||
EFI_STATUS
|
||||
HDiskImageRead (
|
||||
@@ -83,7 +83,7 @@ HDiskImageRead (
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@retval EFI_LOAD_ERROR A load error occured.
|
||||
@retval EFI_INVALID_PARAMETER A parameter was invalid.
|
||||
@retval EFI_INVALID_PARAMETER A parameter was invalid.
|
||||
**/
|
||||
EFI_STATUS
|
||||
HDiskImageSave (
|
||||
|
@@ -37,7 +37,7 @@ HEFI_EDITOR_BUFFER_IMAGE HFileImageConst = {
|
||||
|
||||
/**
|
||||
Initialization function for HFileImage
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -60,7 +60,7 @@ HFileImageInit (
|
||||
}
|
||||
|
||||
/**
|
||||
Backup function for HFileImage. Only a few fields need to be backup.
|
||||
Backup function for HFileImage. Only a few fields need to be backup.
|
||||
This is for making the file buffer refresh as few as possible.
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
Defines FileImage - the view of the file that is visible at any point,
|
||||
Defines FileImage - the view of the file that is visible at any point,
|
||||
as well as the event handlers for editing the file
|
||||
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
|
||||
Copyright (c) 2005 - 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
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
/**
|
||||
Initialization function for HFileImage
|
||||
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
**/
|
||||
EFI_STATUS
|
||||
@@ -39,7 +39,7 @@ HFileImageCleanup (
|
||||
);
|
||||
|
||||
/**
|
||||
Backup function for HFileImage. Only a few fields need to be backup.
|
||||
Backup function for HFileImage. Only a few fields need to be backup.
|
||||
This is for making the file buffer refresh as few as possible.
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
Main entry point of editor
|
||||
|
||||
|
||||
(C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2005 - 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
|
||||
@@ -74,7 +74,7 @@ ShellCommandRunHexEdit (
|
||||
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), gShellDebug1HiiHandle, L"hexedit", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"hexedit", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -86,10 +86,10 @@ ShellCommandRunHexEdit (
|
||||
//
|
||||
if (ShellCommandLineGetFlag(Package, L"-d")){
|
||||
if (ShellCommandLineGetCount(Package) < 4) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) > 4) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
WhatToDo = FileTypeDiskBuffer;
|
||||
@@ -98,7 +98,7 @@ ShellCommandRunHexEdit (
|
||||
Size = ShellStrToUintn(ShellCommandLineGetRawValue(Package, 3));
|
||||
}
|
||||
if (Offset == (UINTN)-1 || Size == (UINTN)-1) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"hexedit", L"-d");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"hexedit", L"-d");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
@@ -108,15 +108,15 @@ ShellCommandRunHexEdit (
|
||||
//
|
||||
if (ShellCommandLineGetFlag(Package, L"-f") && (WhatToDo == FileTypeNone)){
|
||||
if (ShellCommandLineGetCount(Package) < 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) > 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Name = ShellCommandLineGetRawValue(Package, 1);
|
||||
if (Name == NULL || !IsValidFileName(Name)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"hexedit", Name);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"hexedit", Name);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
WhatToDo = FileTypeFileBuffer;
|
||||
@@ -129,10 +129,10 @@ ShellCommandRunHexEdit (
|
||||
//
|
||||
if (ShellCommandLineGetFlag(Package, L"-m") && (WhatToDo == FileTypeNone)){
|
||||
if (ShellCommandLineGetCount(Package) < 3) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) > 3) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
WhatToDo = FileTypeMemBuffer;
|
||||
@@ -143,10 +143,10 @@ ShellCommandRunHexEdit (
|
||||
Name = ShellCommandLineGetRawValue(Package, 1);
|
||||
if (WhatToDo == FileTypeNone && Name != NULL) {
|
||||
if (ShellCommandLineGetCount(Package) > 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (!IsValidFileName(Name)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"hexedit", Name);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"hexedit", Name);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
WhatToDo = FileTypeFileBuffer;
|
||||
@@ -154,7 +154,7 @@ ShellCommandRunHexEdit (
|
||||
} else if (WhatToDo == FileTypeNone) {
|
||||
if (gEfiShellProtocol->GetCurDir(NULL) == NULL) {
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_CWD), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_CWD), gShellDebug1HiiHandle, L"hexedit");
|
||||
} else {
|
||||
NewName = EditGetDefaultFileName(L"bin");
|
||||
Name = NewName;
|
||||
@@ -163,10 +163,10 @@ ShellCommandRunHexEdit (
|
||||
}
|
||||
|
||||
if (ShellStatus == SHELL_SUCCESS && WhatToDo == FileTypeNone) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (WhatToDo == FileTypeFileBuffer && ShellGetCurrentDir(NULL) == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_CWD), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_CWD), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ ShellCommandRunHexEdit (
|
||||
// print editor exit code on screen
|
||||
//
|
||||
if (Status == EFI_OUT_OF_RESOURCES) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellDebug1HiiHandle, L"hexedit");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellDebug1HiiHandle, L"hexedit");
|
||||
} else if (EFI_ERROR(Status)){
|
||||
if (Buffer != NULL) {
|
||||
if (StrCmp (Buffer, L"") != 0) {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Main include file for hex editor
|
||||
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
|
||||
Copyright (c) 2005 - 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
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/** @file
|
||||
data types that are used by editor
|
||||
|
||||
|
||||
Copyright (c) 2005 - 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
|
||||
|
@@ -1,6 +1,6 @@
|
||||
// /**
|
||||
//
|
||||
// Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
// (C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
|
||||
// This program and the accompanying materials
|
||||
// are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -27,7 +27,7 @@
|
||||
#string STR_HEXEDIT_DISKNAME #language en-US " %H-d DiskName FirstBlockNo. BlockNumber%N Open Disk Block For Editing\n"
|
||||
#string STR_HEXEDIT_OFFSET_SIZE #language en-US " %H-m Offset Size%N Open Memory Region For Editing\n"
|
||||
#string STR_HEXEDIT_FILE_NAME #language en-US "%Hhexedit%N: Invalid File Name\n"
|
||||
#string STR_HEXEDIT_LIBEDITOR_MAINEDITOR_TITLE #language en-US "%EMainEditor init failed on TitleBar init\n%N"
|
||||
#string STR_HEXEDIT_LIBEDITOR_MAINEDITOR_TITLE #language en-US "%EMainEditor init failed on TitleBar init\n%N"
|
||||
#string STR_HEXEDIT_LIBEDITOR_MAINEDITOR_MAINMENU #language en-US "%EMainEditor init failed on MainMenu init\n%N"
|
||||
#string STR_HEXEDIT_LIBEDITOR_MAINEDITOR_STATUS #language en-US "%EMainEditor init failed on StatusBar init\n%N"
|
||||
#string STR_HEXEDIT_LIBEDITOR_MAINEDITOR_INPUTBAR #language en-US "%EMainEditor init failed on InputBar init\n%N"
|
||||
|
@@ -1,9 +1,9 @@
|
||||
/** @file
|
||||
Defines the Main Editor data type -
|
||||
- Global variables
|
||||
Defines the Main Editor data type -
|
||||
- Global variables
|
||||
- Instances of the other objects of the editor
|
||||
- Main Interfaces
|
||||
|
||||
|
||||
Copyright (c) 2005 - 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
|
||||
@@ -111,14 +111,14 @@ HMainCommandDisplayHelp (
|
||||
EFI_KEY_DATA KeyData;
|
||||
EFI_STATUS Status;
|
||||
UINTN EventIndex;
|
||||
|
||||
|
||||
//
|
||||
// print helpInfo
|
||||
// print helpInfo
|
||||
//
|
||||
for (CurrentLine = 0; 0 != HexMainMenuHelpInfo[CurrentLine]; CurrentLine++) {
|
||||
InfoString = HiiGetString(gShellDebug1HiiHandle, HexMainMenuHelpInfo[CurrentLine]
|
||||
, NULL);
|
||||
ShellPrintEx (0,CurrentLine+1,L"%E%s%N",InfoString);
|
||||
ShellPrintEx (0,CurrentLine+1,L"%E%s%N",InfoString);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -245,7 +245,7 @@ HMainCommandGoToOffset (
|
||||
|
||||
/**
|
||||
Save current opened buffer.
|
||||
If is file buffer, you can save to current file name or
|
||||
If is file buffer, you can save to current file name or
|
||||
save to another file name.
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@@ -375,7 +375,7 @@ HMainCommandSaveBuffer (
|
||||
// 7. Update File Name field in Title Bar to B
|
||||
// and remove the Modified flag in Title Bar.
|
||||
//
|
||||
Str = CatSPrint(NULL,
|
||||
Str = CatSPrint(NULL,
|
||||
L"File to Save: [%s]",
|
||||
HMainEditor.BufferImage->FileImage->FileName
|
||||
);
|
||||
@@ -422,7 +422,7 @@ HMainCommandSaveBuffer (
|
||||
// if just enter pressed, so think save to current file name
|
||||
//
|
||||
if (StrLen (InputBarGetString()) == 0) {
|
||||
FileName = CatSPrint(NULL,
|
||||
FileName = CatSPrint(NULL,
|
||||
L"%s",
|
||||
HMainEditor.BufferImage->FileImage->FileName
|
||||
);
|
||||
@@ -476,7 +476,7 @@ HMainCommandSaveBuffer (
|
||||
StatusBarSetStatusString (L"Access Denied");
|
||||
SHELL_FREE_NON_NULL (FileName);
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
SHELL_FREE_NON_NULL(Info);
|
||||
//
|
||||
@@ -520,7 +520,7 @@ HMainCommandSaveBuffer (
|
||||
} // while
|
||||
} // if opened existing file
|
||||
} // if OldFile
|
||||
|
||||
|
||||
//
|
||||
// save file back to disk
|
||||
//
|
||||
@@ -1803,9 +1803,9 @@ HMainEditorCleanup (
|
||||
MenuBarCleanup ();
|
||||
|
||||
StatusBarCleanup ();
|
||||
|
||||
|
||||
InputBarCleanup ();
|
||||
|
||||
|
||||
Status = HBufferImageCleanup ();
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_HEXEDIT_LIBEDITOR_BUFFERIMAGE_CLEAN), gShellDebug1HiiHandle);
|
||||
@@ -1850,28 +1850,28 @@ HMainEditorRefresh (
|
||||
if (HMainEditor.BufferImage->BufferType == FileTypeDiskBuffer) {
|
||||
if (HMainEditor.BufferImage->DiskImage != NULL &&
|
||||
HBufferImageBackupVar.DiskImage != NULL &&
|
||||
(HMainEditor.BufferImage->DiskImage->Offset != HBufferImageBackupVar.DiskImage->Offset ||
|
||||
(HMainEditor.BufferImage->DiskImage->Offset != HBufferImageBackupVar.DiskImage->Offset ||
|
||||
HMainEditor.BufferImage->DiskImage->Size != HBufferImageBackupVar.DiskImage->Size) ){
|
||||
NameChange = TRUE;
|
||||
}
|
||||
} else if (HMainEditor.BufferImage->BufferType == FileTypeMemBuffer) {
|
||||
if (HMainEditor.BufferImage->MemImage != NULL &&
|
||||
HBufferImageBackupVar.MemImage != NULL &&
|
||||
(HMainEditor.BufferImage->MemImage->Offset != HBufferImageBackupVar.MemImage->Offset ||
|
||||
(HMainEditor.BufferImage->MemImage->Offset != HBufferImageBackupVar.MemImage->Offset ||
|
||||
HMainEditor.BufferImage->MemImage->Size != HBufferImageBackupVar.MemImage->Size) ){
|
||||
NameChange = TRUE;
|
||||
}
|
||||
} else if (HMainEditor.BufferImage->BufferType == FileTypeFileBuffer) {
|
||||
if ( HMainEditor.BufferImage->FileImage != NULL &&
|
||||
HMainEditor.BufferImage->FileImage->FileName != NULL &&
|
||||
HBufferImageBackupVar.FileImage != NULL &&
|
||||
HBufferImageBackupVar.FileImage->FileName != NULL &&
|
||||
if ( HMainEditor.BufferImage->FileImage != NULL &&
|
||||
HMainEditor.BufferImage->FileImage->FileName != NULL &&
|
||||
HBufferImageBackupVar.FileImage != NULL &&
|
||||
HBufferImageBackupVar.FileImage->FileName != NULL &&
|
||||
StrCmp (HMainEditor.BufferImage->FileImage->FileName, HBufferImageBackupVar.FileImage->FileName) != 0 ) {
|
||||
NameChange = TRUE;
|
||||
}
|
||||
}
|
||||
if ( HMainEditor.BufferImage->FileImage != NULL &&
|
||||
HBufferImageBackupVar.FileImage != NULL &&
|
||||
if ( HMainEditor.BufferImage->FileImage != NULL &&
|
||||
HBufferImageBackupVar.FileImage != NULL &&
|
||||
HMainEditor.BufferImage->FileImage->ReadOnly != HBufferImageBackupVar.FileImage->ReadOnly ) {
|
||||
ReadChange = TRUE;
|
||||
}
|
||||
@@ -1885,10 +1885,10 @@ HMainEditorRefresh (
|
||||
//
|
||||
// call the components refresh function
|
||||
//
|
||||
if (HEditorFirst
|
||||
if (HEditorFirst
|
||||
|| NameChange
|
||||
|| HMainEditor.BufferImage->BufferType != HBufferImageBackupVar.BufferType
|
||||
|| HBufferImageBackupVar.Modified != HMainEditor.BufferImage->Modified
|
||||
|| HMainEditor.BufferImage->BufferType != HBufferImageBackupVar.BufferType
|
||||
|| HBufferImageBackupVar.Modified != HMainEditor.BufferImage->Modified
|
||||
|| ReadChange ) {
|
||||
|
||||
MainTitleBarRefresh (
|
||||
@@ -1904,8 +1904,8 @@ HMainEditorRefresh (
|
||||
HBufferImageRefresh ();
|
||||
}
|
||||
if (HEditorFirst
|
||||
|| HBufferImageBackupVar.DisplayPosition.Row != HMainEditor.BufferImage->DisplayPosition.Row
|
||||
|| HBufferImageBackupVar.DisplayPosition.Column != HMainEditor.BufferImage->DisplayPosition.Column
|
||||
|| HBufferImageBackupVar.DisplayPosition.Row != HMainEditor.BufferImage->DisplayPosition.Row
|
||||
|| HBufferImageBackupVar.DisplayPosition.Column != HMainEditor.BufferImage->DisplayPosition.Column
|
||||
|| StatusBarGetRefresh()) {
|
||||
|
||||
StatusBarRefresh (
|
||||
@@ -2334,7 +2334,7 @@ HMainEditorKeyInput (
|
||||
case FileTypeMemBuffer:
|
||||
OldSize = HBufferImage.MemImage->Size;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
OldSize = 0;
|
||||
break;
|
||||
|
@@ -1,10 +1,10 @@
|
||||
/** @file
|
||||
Defines the Main Editor data type -
|
||||
- Global variables
|
||||
Defines the Main Editor data type -
|
||||
- Global variables
|
||||
- Instances of the other objects of the editor
|
||||
- Main Interfaces
|
||||
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
|
||||
Copyright (c) 2005 - 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
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Functions to deal with Mem buffer
|
||||
|
||||
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved. <BR>
|
||||
|
||||
Copyright (c) 2005 - 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
|
||||
@@ -67,7 +67,7 @@ HMemImageInit (
|
||||
}
|
||||
|
||||
/**
|
||||
Backup function for HDiskImage. Only a few fields need to be backup.
|
||||
Backup function for HDiskImage. Only a few fields need to be backup.
|
||||
This is for making the Disk buffer refresh as few as possible.
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
Defines MemImage - the view of the file that is visible at any point,
|
||||
Defines MemImage - the view of the file that is visible at any point,
|
||||
as well as the event handlers for editing the file
|
||||
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
|
||||
Copyright (c) 2005 - 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
|
||||
@@ -30,7 +30,7 @@ HMemImageInit (
|
||||
);
|
||||
|
||||
/**
|
||||
Backup function for HDiskImage. Only a few fields need to be backup.
|
||||
Backup function for HDiskImage. Only a few fields need to be backup.
|
||||
This is for making the Disk buffer refresh as few as possible.
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Implementation of various string and line routines
|
||||
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
|
||||
Copyright (c) 2005 - 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
|
||||
@@ -18,7 +18,7 @@ extern BOOLEAN HEditorMouseAction;
|
||||
|
||||
/**
|
||||
Free a line and it's internal buffer.
|
||||
|
||||
|
||||
@param[in] Src The line to be freed.
|
||||
**/
|
||||
VOID
|
||||
@@ -109,7 +109,7 @@ HLineRetreat (
|
||||
|
||||
@param[in] Count The line number to advance/retreat.
|
||||
>0 : advance
|
||||
<0: retreat
|
||||
<0: retreat
|
||||
|
||||
@retval NULL An error occured.
|
||||
@return A pointer to the line after move.
|
||||
@@ -182,7 +182,7 @@ HMoveCurrentLine (
|
||||
Lines
|
||||
CurrentLine
|
||||
NumLines
|
||||
ListHead
|
||||
ListHead
|
||||
|
||||
@param[in] ListHead The list head.
|
||||
@param[in] Lines The lines.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Definitions for various line and string routines
|
||||
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2005 - 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
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
@param[in] Count The line number to advance/retreat.
|
||||
>0 : advance
|
||||
<0: retreat
|
||||
<0: retreat
|
||||
|
||||
@retval NULL An error occured.
|
||||
@return A pointer to the line after move.
|
||||
@@ -53,7 +53,7 @@ HMoveCurrentLine (
|
||||
Lines
|
||||
CurrentLine
|
||||
NumLines
|
||||
ListHead
|
||||
ListHead
|
||||
|
||||
@param[in] ListHead The list head.
|
||||
@param[in] Lines The lines.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for LoadPciRom shell Debug1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 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
|
||||
@@ -93,7 +93,7 @@ ShellCommandRunLoadPciRom (
|
||||
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), gShellDebug1HiiHandle, L"loadpcirom", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"loadpcirom", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -101,7 +101,7 @@ ShellCommandRunLoadPciRom (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) < 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"loadpcirom");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"loadpcirom");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
if (ShellCommandLineGetFlag(Package, L"-nc")) {
|
||||
@@ -120,7 +120,7 @@ ShellCommandRunLoadPciRom (
|
||||
){
|
||||
Status = ShellOpenFileMetaArg((CHAR16*)Param, EFI_FILE_MODE_WRITE|EFI_FILE_MODE_READ, &FileList);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"loadpcirom", Param);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"loadpcirom", Param);
|
||||
ShellStatus = SHELL_ACCESS_DENIED;
|
||||
break;
|
||||
}
|
||||
@@ -134,12 +134,12 @@ ShellCommandRunLoadPciRom (
|
||||
; Node = (EFI_SHELL_FILE_INFO*)GetNextNode(&FileList->Link, &Node->Link)
|
||||
){
|
||||
if (EFI_ERROR(Node->Status)){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"loadpcirom", Node->FullName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"loadpcirom", Node->FullName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
continue;
|
||||
}
|
||||
if (FileHandleIsDirectory(Node->Handle) == EFI_SUCCESS) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_DIR), gShellDebug1HiiHandle, L"loadpcirom", Node->FullName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_DIR), gShellDebug1HiiHandle, L"loadpcirom", Node->FullName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
continue;
|
||||
}
|
||||
@@ -152,7 +152,7 @@ ShellCommandRunLoadPciRom (
|
||||
}
|
||||
Status = gEfiShellProtocol->ReadFile(Node->Handle, &SourceSize, File1Buffer);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_READ_FAIL), gShellDebug1HiiHandle, L"loadpcirom", Node->FullName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_READ_FAIL), gShellDebug1HiiHandle, L"loadpcirom", Node->FullName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = LoadEfiDriversFromRomImage (
|
||||
@@ -166,7 +166,7 @@ ShellCommandRunLoadPciRom (
|
||||
FreePool(File1Buffer);
|
||||
}
|
||||
} else if (ShellStatus == SHELL_SUCCESS) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_SPEC), gShellDebug1HiiHandle, "loadpcirom");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_SPEC), gShellDebug1HiiHandle, "loadpcirom");
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
}
|
||||
if (FileList != NULL && !IsListEmpty(&FileList->Link)) {
|
||||
@@ -234,14 +234,14 @@ LoadEfiDriversFromRomImage (
|
||||
EfiRomHeader = (EFI_PCI_EXPANSION_ROM_HEADER *) (UINTN) RomBarOffset;
|
||||
|
||||
if (EfiRomHeader->Signature != PCI_EXPANSION_ROM_HEADER_SIGNATURE) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_LOADPCIROM_CORRUPT), gShellDebug1HiiHandle, L"loadpcirom", FileName, ImageIndex);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_LOADPCIROM_CORRUPT), gShellDebug1HiiHandle, L"loadpcirom", FileName, ImageIndex);
|
||||
// PrintToken (STRING_TOKEN (STR_LOADPCIROM_IMAGE_CORRUPT), HiiHandle, ImageIndex);
|
||||
return ReturnStatus;
|
||||
}
|
||||
|
||||
//
|
||||
// If the pointer to the PCI Data Structure is invalid, no further images can be located.
|
||||
// The PCI Data Structure must be DWORD aligned.
|
||||
// If the pointer to the PCI Data Structure is invalid, no further images can be located.
|
||||
// The PCI Data Structure must be DWORD aligned.
|
||||
//
|
||||
if (EfiRomHeader->PcirOffset == 0 ||
|
||||
(EfiRomHeader->PcirOffset & 3) != 0 ||
|
||||
@@ -340,12 +340,12 @@ LoadEfiDriversFromRomImage (
|
||||
&ImageHandle
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_LOADPCIROM_LOAD_FAIL), gShellDebug1HiiHandle, L"loadpcirom", FileName, ImageIndex);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_LOADPCIROM_LOAD_FAIL), gShellDebug1HiiHandle, L"loadpcirom", FileName, ImageIndex);
|
||||
// PrintToken (STRING_TOKEN (STR_LOADPCIROM_LOAD_IMAGE_ERROR), HiiHandle, ImageIndex, Status);
|
||||
} else {
|
||||
Status = gBS->StartImage (ImageHandle, NULL, NULL);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_LOADPCIROM_START_FAIL), gShellDebug1HiiHandle, L"loadpcirom", FileName, ImageIndex);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_LOADPCIROM_START_FAIL), gShellDebug1HiiHandle, L"loadpcirom", FileName, ImageIndex);
|
||||
// PrintToken (STRING_TOKEN (STR_LOADPCIROM_START_IMAGE), HiiHandle, ImageIndex, Status);
|
||||
} else {
|
||||
ReturnStatus = Status;
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
(C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 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 acModeanies this distribution. The full text of the license may be found at
|
||||
@@ -200,7 +200,7 @@ ShellCommandRunMemMap (
|
||||
Status = ShellCommandLineParse (SfoParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"memmap", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"memmap", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -208,7 +208,7 @@ ShellCommandRunMemMap (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 1) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"memmap");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"memmap");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = gBS->GetMemoryMap(&Size, Descriptors, &MapKey, &ItemSize, &Version);
|
||||
@@ -218,7 +218,7 @@ ShellCommandRunMemMap (
|
||||
Status = gBS->GetMemoryMap(&Size, Descriptors, &MapKey, &ItemSize, &Version);
|
||||
}
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MEMMAP_GET_FAILED), gShellDebug1HiiHandle, L"memmap");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MEMMAP_GET_FAILED), gShellDebug1HiiHandle, L"memmap");
|
||||
ShellStatus = SHELL_ACCESS_DENIED;
|
||||
} else {
|
||||
ASSERT(Version == EFI_MEMORY_DESCRIPTOR_VERSION);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for Mode shell Debug1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 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 acModeanies this distribution. The full text of the license may be found at
|
||||
@@ -58,7 +58,7 @@ ShellCommandRunMode (
|
||||
Status = ShellCommandLineParse (EmptyParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"mode", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"mode", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -66,21 +66,21 @@ ShellCommandRunMode (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 3) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"mode");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"mode");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) == 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"mode");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"mode");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) == 3) {
|
||||
Temp = ShellCommandLineGetRawValue(Package, 1);
|
||||
if (!ShellIsHexOrDecimalNumber(Temp, FALSE, FALSE)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"mode", Temp);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"mode", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
NewCol = ShellStrToUintn(Temp);
|
||||
Temp = ShellCommandLineGetRawValue(Package, 2);
|
||||
if (!ShellIsHexOrDecimalNumber(Temp, FALSE, FALSE)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"mode", Temp);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"mode", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
NewRow = ShellStrToUintn(Temp);
|
||||
@@ -93,7 +93,7 @@ ShellCommandRunMode (
|
||||
if (Col == NewCol && Row == NewRow) {
|
||||
Status = gST->ConOut->SetMode(gST->ConOut, LoopVar);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MODE_SET_FAIL), gShellDebug1HiiHandle, L"mode");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MODE_SET_FAIL), gShellDebug1HiiHandle, L"mode");
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
} else {
|
||||
// worked fine...
|
||||
@@ -104,7 +104,7 @@ ShellCommandRunMode (
|
||||
}
|
||||
|
||||
if (!Done) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MODE_NO_MATCH), gShellDebug1HiiHandle, L"mode");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MODE_NO_MATCH), gShellDebug1HiiHandle, L"mode");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
@@ -1,9 +1,9 @@
|
||||
/** @file
|
||||
Main file for Pci shell Debug1 function.
|
||||
|
||||
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<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
|
||||
@@ -2487,7 +2487,7 @@ ShellCommandRunPci (
|
||||
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), gShellDebug1HiiHandle, L"pci", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"pci", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -2496,23 +2496,23 @@ ShellCommandRunPci (
|
||||
} else {
|
||||
|
||||
if (ShellCommandLineGetCount(Package) == 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"pci");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"pci");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
if (ShellCommandLineGetCount(Package) > 4) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"pci");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"pci");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
if (ShellCommandLineGetFlag(Package, L"-ec") && ShellCommandLineGetValue(Package, L"-ec") == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"pci", L"-ec");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"pci", L"-ec");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
if (ShellCommandLineGetFlag(Package, L"-s") && ShellCommandLineGetValue(Package, L"-s") == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"pci", L"-s");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"pci", L"-s");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@@ -2524,7 +2524,7 @@ ShellCommandRunPci (
|
||||
HandleBufSize = sizeof (EFI_HANDLE);
|
||||
HandleBuf = (EFI_HANDLE *) AllocateZeroPool (HandleBufSize);
|
||||
if (HandleBuf == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellDebug1HiiHandle, L"pci");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellDebug1HiiHandle, L"pci");
|
||||
ShellStatus = SHELL_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
@@ -2540,7 +2540,7 @@ ShellCommandRunPci (
|
||||
if (Status == EFI_BUFFER_TOO_SMALL) {
|
||||
HandleBuf = ReallocatePool (sizeof (EFI_HANDLE), HandleBufSize, HandleBuf);
|
||||
if (HandleBuf == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellDebug1HiiHandle, L"pci");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_OUT_MEM), gShellDebug1HiiHandle, L"pci");
|
||||
ShellStatus = SHELL_OUT_OF_RESOURCES;
|
||||
goto Done;
|
||||
}
|
||||
@@ -2555,7 +2555,7 @@ ShellCommandRunPci (
|
||||
}
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PCIRBIO_NF), gShellDebug1HiiHandle, L"pci");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PCIRBIO_NF), gShellDebug1HiiHandle, L"pci");
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
goto Done;
|
||||
}
|
||||
@@ -2591,7 +2591,7 @@ ShellCommandRunPci (
|
||||
&Descriptors
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_PCI_HANDLE_CFG_ERR), gShellDebug1HiiHandle, L"pci");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_PCI_HANDLE_CFG_ERR), gShellDebug1HiiHandle, L"pci");
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
goto Done;
|
||||
}
|
||||
@@ -2604,7 +2604,7 @@ ShellCommandRunPci (
|
||||
Status = PciGetNextBusRange (&Descriptors, &MinBus, &MaxBus, &IsEnd);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_PCI_BUS_RANGE_ERR), gShellDebug1HiiHandle, L"pci");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_PCI_BUS_RANGE_ERR), gShellDebug1HiiHandle, L"pci");
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
goto Done;
|
||||
}
|
||||
@@ -2729,7 +2729,7 @@ ShellCommandRunPci (
|
||||
if (!EFI_ERROR (ShellConvertStringToUint64 (Temp, &RetVal, TRUE, TRUE))) {
|
||||
Segment = (UINT16) RetVal;
|
||||
} else {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV_HEX), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV_HEX), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@@ -2747,13 +2747,13 @@ ShellCommandRunPci (
|
||||
if (!EFI_ERROR (ShellConvertStringToUint64 (Temp, &RetVal, TRUE, TRUE))) {
|
||||
Bus = (UINT16) RetVal;
|
||||
} else {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV_HEX), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV_HEX), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
if (Bus > PCI_MAX_BUS) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@@ -2766,13 +2766,13 @@ ShellCommandRunPci (
|
||||
if (!EFI_ERROR (ShellConvertStringToUint64 (Temp, &RetVal, TRUE, TRUE))) {
|
||||
Device = (UINT16) RetVal;
|
||||
} else {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV_HEX), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV_HEX), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
if (Device > PCI_MAX_DEVICE){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@@ -2786,13 +2786,13 @@ ShellCommandRunPci (
|
||||
if (!EFI_ERROR (ShellConvertStringToUint64 (Temp, &RetVal, TRUE, TRUE))) {
|
||||
Func = (UINT16) RetVal;
|
||||
} else {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV_HEX), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV_HEX), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
if (Func > PCI_MAX_FUNC){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@@ -2806,7 +2806,7 @@ ShellCommandRunPci (
|
||||
if (!EFI_ERROR (ShellConvertStringToUint64 (Temp, &RetVal, TRUE, TRUE))) {
|
||||
ExtendedCapability = (UINT16) RetVal;
|
||||
} else {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV_HEX), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV_HEX), gShellDebug1HiiHandle, L"pci", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@@ -2826,7 +2826,7 @@ ShellCommandRunPci (
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL, STRING_TOKEN (STR_PCI_NO_FIND), gShellDebug1HiiHandle, L"pci",
|
||||
-1, -1, NULL, STRING_TOKEN (STR_PCI_NO_FIND), gShellDebug1HiiHandle, L"pci",
|
||||
Segment,
|
||||
Bus
|
||||
);
|
||||
@@ -2844,7 +2844,7 @@ ShellCommandRunPci (
|
||||
);
|
||||
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_PCI_NO_CFG), gShellDebug1HiiHandle, L"pci");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_PCI_NO_CFG), gShellDebug1HiiHandle, L"pci");
|
||||
ShellStatus = SHELL_ACCESS_DENIED;
|
||||
goto Done;
|
||||
}
|
||||
@@ -4999,13 +4999,13 @@ PrintInterpretedExtendedCompatibilityLinkControl (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_INTERNAL_LINK_CONTROL*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_LINK_CONTROL),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_LINK_CONTROL),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->RootComplexLinkCapabilities,
|
||||
Header->RootComplexLinkControl,
|
||||
Header->RootComplexLinkStatus
|
||||
);
|
||||
);
|
||||
DumpHex (
|
||||
4,
|
||||
EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8*)HeaderAddress - (UINT8*)HeadersBaseAddress),
|
||||
@@ -5031,13 +5031,13 @@ PrintInterpretedExtendedCompatibilityPowerBudgeting (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_POWER_BUDGETING*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_POWER),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_POWER),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->DataSelect,
|
||||
Header->Data,
|
||||
Header->PowerBudgetCapability
|
||||
);
|
||||
);
|
||||
DumpHex (
|
||||
4,
|
||||
EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8*)HeaderAddress - (UINT8*)HeadersBaseAddress),
|
||||
@@ -5067,12 +5067,12 @@ PrintInterpretedExtendedCompatibilityAcs (
|
||||
VectorSize = 0;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_ACS),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_ACS),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->AcsCapability,
|
||||
Header->AcsControl
|
||||
);
|
||||
);
|
||||
if (PCI_EXPRESS_EXTENDED_CAPABILITY_ACS_EXTENDED_GET_EGRES_CONTROL(Header)) {
|
||||
VectorSize = PCI_EXPRESS_EXTENDED_CAPABILITY_ACS_EXTENDED_GET_EGRES_VECTOR_SIZE(Header);
|
||||
if (VectorSize == 0) {
|
||||
@@ -5080,12 +5080,12 @@ PrintInterpretedExtendedCompatibilityAcs (
|
||||
}
|
||||
for (LoopCounter = 0 ; LoopCounter * 8 < VectorSize ; LoopCounter++) {
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_ACS2),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_ACS2),
|
||||
gShellDebug1HiiHandle,
|
||||
LoopCounter + 1,
|
||||
Header->EgressControlVectorArray[LoopCounter]
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
DumpHex (
|
||||
@@ -5113,12 +5113,12 @@ PrintInterpretedExtendedCompatibilityLatencyToleranceReporting (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_LATENCE_TOLERANCE_REPORTING*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_LAT),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_LAT),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->MaxSnoopLatency,
|
||||
Header->MaxNoSnoopLatency
|
||||
);
|
||||
);
|
||||
DumpHex (
|
||||
4,
|
||||
EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8*)HeaderAddress - (UINT8*)HeadersBaseAddress),
|
||||
@@ -5144,11 +5144,11 @@ PrintInterpretedExtendedCompatibilitySerialNumber (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_SERIAL_NUMBER*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_SN),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_SN),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->SerialNumber
|
||||
);
|
||||
);
|
||||
DumpHex (
|
||||
4,
|
||||
EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8*)HeaderAddress - (UINT8*)HeadersBaseAddress),
|
||||
@@ -5174,14 +5174,14 @@ PrintInterpretedExtendedCompatibilityRcrb (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_RCRB_HEADER*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_RCRB),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_RCRB),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->VendorId,
|
||||
Header->DeviceId,
|
||||
Header->RcrbCapabilities,
|
||||
Header->RcrbControl
|
||||
);
|
||||
);
|
||||
DumpHex (
|
||||
4,
|
||||
EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8*)HeaderAddress - (UINT8*)HeadersBaseAddress),
|
||||
@@ -5207,11 +5207,11 @@ PrintInterpretedExtendedCompatibilityVendorSpecific (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_VENDOR_SPECIFIC*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_VEN),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_VEN),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->VendorSpecificHeader
|
||||
);
|
||||
);
|
||||
DumpHex (
|
||||
4,
|
||||
EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8*)HeaderAddress - (UINT8*)HeadersBaseAddress),
|
||||
@@ -5237,11 +5237,11 @@ PrintInterpretedExtendedCompatibilityECEA (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_EVENT_COLLECTOR_ENDPOINT_ASSOCIATION*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_ECEA),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_ECEA),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->AssociationBitmap
|
||||
);
|
||||
);
|
||||
DumpHex (
|
||||
4,
|
||||
EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8*)HeaderAddress - (UINT8*)HeadersBaseAddress),
|
||||
@@ -5267,12 +5267,12 @@ PrintInterpretedExtendedCompatibilityAri (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_ARI_CAPABILITY*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_ARI),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_ARI),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->AriCapability,
|
||||
Header->AriControl
|
||||
);
|
||||
);
|
||||
DumpHex (
|
||||
4,
|
||||
EFI_PCIE_CAPABILITY_BASE_OFFSET + ((UINT8*)HeaderAddress - (UINT8*)HeadersBaseAddress),
|
||||
@@ -5299,19 +5299,19 @@ PrintInterpretedExtendedCompatibilityDynamicPowerAllocation (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_DYNAMIC_POWER_ALLOCATION*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_DPA),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_DPA),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->DpaCapability,
|
||||
Header->DpaLatencyIndicator,
|
||||
Header->DpaStatus,
|
||||
Header->DpaControl
|
||||
);
|
||||
);
|
||||
for (LinkCount = 0 ; LinkCount < PCI_EXPRESS_EXTENDED_CAPABILITY_DYNAMIC_POWER_ALLOCATION_GET_SUBSTATE_MAX(Header) + 1 ; LinkCount++) {
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_DPA2),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_DPA2),
|
||||
gShellDebug1HiiHandle,
|
||||
LinkCount+1,
|
||||
Header->DpaPowerAllocationArray[LinkCount]
|
||||
);
|
||||
@@ -5342,17 +5342,17 @@ PrintInterpretedExtendedCompatibilityLinkDeclaration (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_LINK_DECLARATION*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_LINK_DECLAR),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_LINK_DECLAR),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->ElementSelfDescription
|
||||
);
|
||||
|
||||
for (LinkCount = 0 ; LinkCount < PCI_EXPRESS_EXTENDED_CAPABILITY_LINK_DECLARATION_GET_LINK_COUNT(Header) ; LinkCount++) {
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_LINK_DECLAR2),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_LINK_DECLAR2),
|
||||
gShellDebug1HiiHandle,
|
||||
LinkCount+1,
|
||||
Header->LinkEntry[LinkCount]
|
||||
);
|
||||
@@ -5382,9 +5382,9 @@ PrintInterpretedExtendedCompatibilityAer (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_ADVANCED_ERROR_REPORTING*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_AER),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_AER),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->UncorrectableErrorStatus,
|
||||
Header->UncorrectableErrorMask,
|
||||
Header->UncorrectableErrorSeverity,
|
||||
@@ -5431,9 +5431,9 @@ PrintInterpretedExtendedCompatibilityMulticast (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_MULTICAST*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_MULTICAST),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_MULTICAST),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->MultiCastCapability,
|
||||
Header->MulticastControl,
|
||||
Header->McBaseAddress,
|
||||
@@ -5471,9 +5471,9 @@ PrintInterpretedExtendedCompatibilityVirtualChannel (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_VIRTUAL_CHANNEL_CAPABILITY*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_VC_BASE),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_VC_BASE),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->ExtendedVcCount,
|
||||
Header->PortVcCapability1,
|
||||
Header->PortVcCapability2,
|
||||
@@ -5484,9 +5484,9 @@ PrintInterpretedExtendedCompatibilityVirtualChannel (
|
||||
for (ItemCount = 0 ; ItemCount < Header->ExtendedVcCount ; ItemCount++) {
|
||||
CapabilityItem = &Header->Capability[ItemCount];
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_VC_ITEM),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_VC_ITEM),
|
||||
gShellDebug1HiiHandle,
|
||||
ItemCount+1,
|
||||
CapabilityItem->VcResourceCapability,
|
||||
CapabilityItem->PortArbTableOffset,
|
||||
@@ -5524,9 +5524,9 @@ PrintInterpretedExtendedCompatibilityResizeableBar (
|
||||
|
||||
for (ItemCount = 0 ; ItemCount < (UINT32)GET_NUMBER_RESIZABLE_BARS(Header) ; ItemCount++) {
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_RESIZE_BAR),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_RESIZE_BAR),
|
||||
gShellDebug1HiiHandle,
|
||||
ItemCount+1,
|
||||
Header->Capability[ItemCount].ResizableBarCapability,
|
||||
Header->Capability[ItemCount].ResizableBarControl
|
||||
@@ -5559,9 +5559,9 @@ PrintInterpretedExtendedCompatibilityTph (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_TPH*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_TPH),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_TPH),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->TphRequesterCapability,
|
||||
Header->TphRequesterControl
|
||||
);
|
||||
@@ -5600,9 +5600,9 @@ PrintInterpretedExtendedCompatibilitySecondary (
|
||||
Header = (PCI_EXPRESS_EXTENDED_CAPABILITIES_SECONDARY_PCIE*)HeaderAddress;
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_SECONDARY),
|
||||
gShellDebug1HiiHandle,
|
||||
-1, -1, NULL,
|
||||
STRING_TOKEN (STR_PCI_EXT_CAP_SECONDARY),
|
||||
gShellDebug1HiiHandle,
|
||||
Header->LinkControl3.Uint32,
|
||||
Header->LaneErrorStatus
|
||||
);
|
||||
@@ -5633,7 +5633,7 @@ PrintInterpretedExtendedCompatibilitySecondary (
|
||||
**/
|
||||
EFI_STATUS
|
||||
PrintPciExtendedCapabilityDetails(
|
||||
IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress,
|
||||
IN CONST PCI_EXP_EXT_HDR *HeadersBaseAddress,
|
||||
IN CONST PCI_EXP_EXT_HDR *HeaderAddress,
|
||||
IN CONST PCI_CAPABILITY_PCIEXP *PciExpressCapPtr
|
||||
)
|
||||
@@ -5666,7 +5666,7 @@ PrintPciExtendedCapabilityDetails(
|
||||
case PCI_EXPRESS_EXTENDED_CAPABILITY_VIRTUAL_CHANNEL_ID:
|
||||
case PCI_EXPRESS_EXTENDED_CAPABILITY_MULTI_FUNCTION_VIRTUAL_CHANNEL_ID:
|
||||
return PrintInterpretedExtendedCompatibilityVirtualChannel(HeaderAddress, HeadersBaseAddress);
|
||||
case PCI_EXPRESS_EXTENDED_CAPABILITY_MULTICAST_ID:
|
||||
case PCI_EXPRESS_EXTENDED_CAPABILITY_MULTICAST_ID:
|
||||
//
|
||||
// should only be present if PCIE_CAP_DEVICEPORT_TYPE(PciExpressCapPtr->PcieCapReg) == 0100b, 0101b, or 0110b
|
||||
//
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for SerMode shell Debug1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 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
|
||||
@@ -50,7 +50,7 @@ DisplaySettings (
|
||||
|
||||
Status = gBS->LocateHandleBuffer (ByProtocol, &gEfiSerialIoProtocolGuid, NULL, &NoHandles, &Handles);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_NO_FOUND), gShellDebug1HiiHandle, L"sermode");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_NO_FOUND), gShellDebug1HiiHandle, L"sermode");
|
||||
return SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ DisplaySettings (
|
||||
StopBits
|
||||
);
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_NO_FOUND), gShellDebug1HiiHandle, L"sermode");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_NO_FOUND), gShellDebug1HiiHandle, L"sermode");
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
break;
|
||||
}
|
||||
@@ -150,7 +150,7 @@ DisplaySettings (
|
||||
|
||||
if (Index == NoHandles) {
|
||||
if ((NoHandles != 0 && HandleValid) || 0 == NoHandles) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_NOT_FOUND), gShellDebug1HiiHandle, L"sermode");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_NOT_FOUND), gShellDebug1HiiHandle, L"sermode");
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
@@ -199,7 +199,7 @@ ShellCommandRunSerMode (
|
||||
Status = ShellCommandLineParse (EmptyParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"sermode", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"sermode", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -207,10 +207,10 @@ ShellCommandRunSerMode (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) < 6 && ShellCommandLineGetCount(Package) > 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"sermode");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"sermode");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) > 6) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"sermode");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"sermode");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Temp = ShellCommandLineGetRawValue(Package, 1);
|
||||
@@ -235,7 +235,7 @@ ShellCommandRunSerMode (
|
||||
}
|
||||
Temp = ShellCommandLineGetRawValue(Package, 3);
|
||||
if (Temp == NULL || StrLen(Temp)>1) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"sermode", Temp);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"sermode", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
switch(Temp[0]){
|
||||
@@ -264,7 +264,7 @@ ShellCommandRunSerMode (
|
||||
Parity = SpaceParity;
|
||||
break;
|
||||
default:
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"sermode", Temp);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"sermode", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@@ -284,7 +284,7 @@ ShellCommandRunSerMode (
|
||||
case 8:
|
||||
break;
|
||||
default:
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"sermode", Temp);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"sermode", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@@ -308,13 +308,13 @@ ShellCommandRunSerMode (
|
||||
break;
|
||||
|
||||
default:
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"sermode", Temp);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"sermode", Temp);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
Status = gBS->LocateHandleBuffer(ByProtocol, &gEfiSerialIoProtocolGuid, NULL, &NoHandles, &Handles);
|
||||
if (EFI_ERROR (Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_NO_FOUND), gShellDebug1HiiHandle, L"sermode");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_NO_FOUND), gShellDebug1HiiHandle, L"sermode");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@@ -337,13 +337,13 @@ ShellCommandRunSerMode (
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (Status == EFI_INVALID_PARAMETER) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_SET_UNSUPPORTED), gShellDebug1HiiHandle, L"sermode", ConvertHandleToHandleIndex(Handles[Index]));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_SET_UNSUPPORTED), gShellDebug1HiiHandle, L"sermode", ConvertHandleToHandleIndex(Handles[Index]));
|
||||
ShellStatus = SHELL_UNSUPPORTED;
|
||||
} else if (Status == EFI_DEVICE_ERROR) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_SET_DEV_ERROR), gShellDebug1HiiHandle, L"sermode", ConvertHandleToHandleIndex(Handles[Index]));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_SET_DEV_ERROR), gShellDebug1HiiHandle, L"sermode", ConvertHandleToHandleIndex(Handles[Index]));
|
||||
ShellStatus = SHELL_ACCESS_DENIED;
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_SET_FAIL), gShellDebug1HiiHandle, L"sermode", ConvertHandleToHandleIndex(Handles[Index]));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_SET_FAIL), gShellDebug1HiiHandle, L"sermode", ConvertHandleToHandleIndex(Handles[Index]));
|
||||
ShellStatus = SHELL_ACCESS_DENIED;
|
||||
}
|
||||
} else {
|
||||
@@ -356,7 +356,7 @@ ShellCommandRunSerMode (
|
||||
}
|
||||
|
||||
if (ShellStatus == SHELL_SUCCESS && Index == NoHandles) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_BAD_HANDLE), gShellDebug1HiiHandle, L"sermode", HandleIdx);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SERMODE_BAD_HANDLE), gShellDebug1HiiHandle, L"sermode", HandleIdx);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for SetSize shell Debug1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 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
|
||||
@@ -55,7 +55,7 @@ ShellCommandRunSetSize (
|
||||
Status = ShellCommandLineParse (EmptyParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"setsize", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"setsize", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -63,13 +63,13 @@ ShellCommandRunSetSize (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) < 3) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"setsize");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"setsize");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
NewSize = 0;
|
||||
} else {
|
||||
Temp1 = ShellCommandLineGetRawValue(Package, 1);
|
||||
if (!ShellIsHexOrDecimalNumber(Temp1, FALSE, FALSE)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SIZE_NOT_SPEC), gShellDebug1HiiHandle, L"setsize");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SIZE_NOT_SPEC), gShellDebug1HiiHandle, L"setsize");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
NewSize = 0;
|
||||
} else {
|
||||
@@ -82,19 +82,19 @@ ShellCommandRunSetSize (
|
||||
Status = ShellOpenFileByName(ShellCommandLineGetRawValue(Package, LoopVar), &FileHandle, EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE|EFI_FILE_MODE_CREATE, 0);
|
||||
}
|
||||
if (EFI_ERROR(Status) && LoopVar == 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_SPEC), gShellDebug1HiiHandle, L"setsize");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_NOT_SPEC), gShellDebug1HiiHandle, L"setsize");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"setsize", ShellCommandLineGetRawValue(Package, LoopVar));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellDebug1HiiHandle, L"setsize", ShellCommandLineGetRawValue(Package, LoopVar));
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
break;
|
||||
} else {
|
||||
Status = FileHandleSetSize(FileHandle, NewSize);
|
||||
if (Status == EFI_VOLUME_FULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_VOLUME_FULL), gShellDebug1HiiHandle, L"setsize");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_VOLUME_FULL), gShellDebug1HiiHandle, L"setsize");
|
||||
ShellStatus = SHELL_VOLUME_FULL;
|
||||
} else if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SET_SIZE_FAIL), gShellDebug1HiiHandle, L"setsize", ShellCommandLineGetRawValue(Package, LoopVar));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SET_SIZE_FAIL), gShellDebug1HiiHandle, L"setsize", ShellCommandLineGetRawValue(Package, LoopVar));
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SET_SIZE_DONE), gShellDebug1HiiHandle, ShellCommandLineGetRawValue(Package, LoopVar));
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for SetVar shell Debug1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 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
|
||||
@@ -378,19 +378,19 @@ ShellCommandRunSetVar (
|
||||
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), gShellDebug1HiiHandle, L"setvar", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"setvar", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
ASSERT(FALSE);
|
||||
}
|
||||
} else if (ShellCommandLineCheckDuplicate (Package,&ProblemParam) != EFI_SUCCESS) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_DUPLICATE), gShellDebug1HiiHandle, L"setvar", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_DUPLICATE), gShellDebug1HiiHandle, L"setvar", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) < 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"setvar");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle, L"setvar");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
VariableName = ShellCommandLineGetRawValue(Package, 1);
|
||||
@@ -400,7 +400,7 @@ ShellCommandRunSetVar (
|
||||
StringGuid = ShellCommandLineGetValue(Package, L"-guid");
|
||||
RStatus = StrToGuid (StringGuid, &Guid);
|
||||
if (RETURN_ERROR (RStatus) || (StringGuid[GUID_STRING_LENGTH] != L'\0')) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"setvar", StringGuid);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDebug1HiiHandle, L"setvar", StringGuid);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
API for SMBIOS table.
|
||||
|
||||
Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 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
|
||||
@@ -11,7 +11,7 @@
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
**/
|
||||
|
||||
|
||||
|
||||
#include "UefiShellDebug1CommandsLib.h"
|
||||
#include <Guid/SmBios.h>
|
||||
|
@@ -1,8 +1,8 @@
|
||||
/** @file
|
||||
Module for clarifying the content of the smbios structure element information.
|
||||
|
||||
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>
|
||||
(C) Copyright 2015-2017 Hewlett Packard Enterprise Development LP<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -2892,7 +2892,7 @@ DisplaySBDSManufactureDate (
|
||||
/**
|
||||
Display System Reset (Type 23) information.
|
||||
|
||||
|
||||
|
||||
Identifies the system-reset capabilities for the system.
|
||||
Bits 7:6 Reserved for future assignment via this specification, set to 00b.
|
||||
Bit 5 System contains a watchdog timer, either True (1) or False (0).
|
||||
@@ -2996,7 +2996,7 @@ DisplaySystemResetCapabilities (
|
||||
/**
|
||||
Display Hardware Security (Type 24) information.
|
||||
|
||||
|
||||
|
||||
Identifies the password and reset status for the system:
|
||||
|
||||
Bits 7:6 Power-on Password Status, one of:
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Build a table, each item is (Key, Info) pair.
|
||||
And give a interface of query a string out of a table.
|
||||
|
||||
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2016-2017 Hewlett Packard Enterprise Development LP<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -3412,7 +3412,7 @@ QueryTable (
|
||||
// Check if Key is in the range
|
||||
// or if Key == Value in the table
|
||||
//
|
||||
if ((High > Low && Key >= Low && Key <= High)
|
||||
if ((High > Low && Key >= Low && Key <= High)
|
||||
|| (Table[Index].Key == Key)) {
|
||||
StrnCpyS (Info, InfoLen, Table[Index].Info, InfoLen - 1);
|
||||
StrnCatS (Info, InfoLen, L"\n", InfoLen - 1 - StrLen(Info));
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Tools of clarify the content of the smbios table.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 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
|
||||
@@ -69,7 +69,7 @@ ShellCommandRunSmbiosView (
|
||||
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), gShellDebug1HiiHandle, L"smbiosview", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDebug1HiiHandle, L"smbiosview", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -77,13 +77,13 @@ ShellCommandRunSmbiosView (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 1) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"smbiosview");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"smbiosview");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetFlag(Package, L"-t") && ShellCommandLineGetValue(Package, L"-t") == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"smbiosview", L"-t");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"smbiosview", L"-t");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetFlag(Package, L"-h") && ShellCommandLineGetValue(Package, L"-h") == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"smbiosview", L"-h");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDebug1HiiHandle, L"smbiosview", L"-h");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (
|
||||
(ShellCommandLineGetFlag(Package, L"-t") && ShellCommandLineGetFlag(Package, L"-h")) ||
|
||||
@@ -93,7 +93,7 @@ ShellCommandRunSmbiosView (
|
||||
(ShellCommandLineGetFlag(Package, L"-h") && ShellCommandLineGetFlag(Package, L"-a")) ||
|
||||
(ShellCommandLineGetFlag(Package, L"-s") && ShellCommandLineGetFlag(Package, L"-a"))
|
||||
) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"smbiosview");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDebug1HiiHandle, L"smbiosview");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
|
||||
@@ -103,30 +103,30 @@ ShellCommandRunSmbiosView (
|
||||
Status1 = LibSmbiosInit ();
|
||||
Status2 = LibSmbios64BitInit ();
|
||||
if (EFI_ERROR (Status1) && EFI_ERROR (Status2)) {
|
||||
ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_LIBSMBIOSVIEW_CANNOT_GET_TABLE), gShellDebug1HiiHandle);
|
||||
ShellPrintHiiEx(-1,-1,NULL,STRING_TOKEN (STR_SMBIOSVIEW_LIBSMBIOSVIEW_CANNOT_GET_TABLE), gShellDebug1HiiHandle);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
||||
StructType = STRUCTURE_TYPE_RANDOM;
|
||||
RandomView = TRUE;
|
||||
|
||||
|
||||
Temp = ShellCommandLineGetValue(Package, L"-t");
|
||||
if (Temp != NULL) {
|
||||
StructType = (UINT8) ShellStrToUintn (Temp);
|
||||
}
|
||||
|
||||
|
||||
if (ShellCommandLineGetFlag(Package, L"-a")) {
|
||||
gShowType = SHOW_ALL;
|
||||
}
|
||||
|
||||
|
||||
if (!EFI_ERROR (Status1)) {
|
||||
//
|
||||
// Initialize the StructHandle to be the first handle
|
||||
//
|
||||
StructHandle = INVALID_HANDLE;
|
||||
LibGetSmbiosStructure (&StructHandle, NULL, NULL);
|
||||
|
||||
|
||||
Temp = ShellCommandLineGetValue(Package, L"-h");
|
||||
if (Temp != NULL) {
|
||||
RandomView = FALSE;
|
||||
@@ -140,7 +140,7 @@ ShellCommandRunSmbiosView (
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
||||
if (ShellCommandLineGetFlag(Package, L"-s")) {
|
||||
Status = DisplayStatisticsTable (SHOW_DETAIL);
|
||||
if (EFI_ERROR(Status)) {
|
||||
@@ -148,7 +148,7 @@ ShellCommandRunSmbiosView (
|
||||
}
|
||||
goto Show64Bit;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Show SMBIOS structure information
|
||||
//
|
||||
@@ -174,13 +174,13 @@ Show64Bit:
|
||||
//
|
||||
StructHandle = INVALID_HANDLE;
|
||||
LibGetSmbios64BitStructure (&StructHandle, NULL, NULL);
|
||||
|
||||
|
||||
Temp = ShellCommandLineGetValue(Package, L"-h");
|
||||
if (Temp != NULL) {
|
||||
RandomView = FALSE;
|
||||
StructHandle = (UINT16) ShellStrToUintn(Temp);
|
||||
}
|
||||
|
||||
|
||||
if (ShellCommandLineGetFlag(Package, L"-s")) {
|
||||
Status = DisplaySmbios64BitStatisticsTable (SHOW_DETAIL);
|
||||
if (EFI_ERROR(Status)) {
|
||||
@@ -188,7 +188,7 @@ Show64Bit:
|
||||
}
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Show SMBIOS structure information
|
||||
//
|
||||
@@ -666,7 +666,7 @@ InitSmbiosTableStatistics (
|
||||
@param[out] NumberOfSmbios64Structures The number of structures in 64-bit SMBIOS table.
|
||||
@param[out] Smbios64TableLength The total length of 64-bit SMBIOS table.
|
||||
|
||||
@retval EFI_SUCCESS Calculation was successful.
|
||||
@retval EFI_SUCCESS Calculation was successful.
|
||||
**/
|
||||
EFI_STATUS
|
||||
CalculateSmbios64BitStructureCountAndLength (
|
||||
@@ -677,10 +677,10 @@ CalculateSmbios64BitStructureCountAndLength (
|
||||
{
|
||||
SMBIOS_STRUCTURE_POINTER Smbios;
|
||||
UINT8 *Raw;
|
||||
|
||||
|
||||
*Smbios64TableLength = 0;
|
||||
*NumberOfSmbios64Structures = 0;
|
||||
|
||||
|
||||
Smbios.Raw = (UINT8 *)(UINTN)(Smbios64EntryPoint->TableAddress);
|
||||
while (TRUE) {
|
||||
if (Smbios.Hdr->Type == 127) {
|
||||
@@ -702,11 +702,11 @@ CalculateSmbios64BitStructureCountAndLength (
|
||||
//
|
||||
(*Smbios64TableLength) += ((UINTN) Smbios.Raw - (UINTN) Raw);
|
||||
if ((*Smbios64TableLength) > Smbios64EntryPoint->TableMaximumSize) {
|
||||
//
|
||||
// The actual table length exceeds maximum table size,
|
||||
// There should be something wrong with SMBIOS table.
|
||||
//
|
||||
return EFI_INVALID_PARAMETER;
|
||||
//
|
||||
// The actual table length exceeds maximum table size,
|
||||
// There should be something wrong with SMBIOS table.
|
||||
//
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
(*NumberOfSmbios64Structures)++;
|
||||
}
|
||||
@@ -727,7 +727,7 @@ InitSmbios64BitTableStatistics (
|
||||
UINT16 Length;
|
||||
UINT16 Offset;
|
||||
UINT16 Index;
|
||||
EFI_STATUS Status;
|
||||
EFI_STATUS Status;
|
||||
SMBIOS_STRUCTURE_POINTER SmbiosStruct;
|
||||
SMBIOS_TABLE_3_0_ENTRY_POINT *SMBiosTable;
|
||||
STRUCTURE_STATISTICS *StatisticsPointer;
|
||||
@@ -755,9 +755,9 @@ InitSmbios64BitTableStatistics (
|
||||
//
|
||||
Status = CalculateSmbios64BitStructureCountAndLength (SMBiosTable, &mNumberOfSmbios64BitStructures, &mSmbios64BitTableLength);
|
||||
if ((EFI_ERROR (Status)) || (mSmbios64BitTableLength > SMBiosTable->TableMaximumSize)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
mSmbios64BitStatisticsTable = (STRUCTURE_STATISTICS *) AllocateZeroPool (mNumberOfSmbios64BitStructures * sizeof (STRUCTURE_STATISTICS));
|
||||
|
||||
if (mSmbios64BitStatisticsTable == NULL) {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Main file for NULL named library for debug1 profile shell command functions.
|
||||
|
||||
Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 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
|
||||
@@ -173,7 +173,7 @@ GetSystemConfigurationTable (
|
||||
|
||||
/**
|
||||
Clear the line at the specified Row.
|
||||
|
||||
|
||||
@param[in] Row The row number to be cleared ( start from 1 )
|
||||
@param[in] LastCol The last printable column.
|
||||
@param[in] LastRow The last printable row.
|
||||
@@ -210,7 +210,7 @@ EditorClearLine (
|
||||
Line[LastCol % (ARRAY_SIZE (Line) - 1)] = CHAR_NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// print out the blank line
|
||||
//
|
||||
@@ -243,7 +243,7 @@ IsValidFileNameChar (
|
||||
|
||||
/**
|
||||
Check if file name has illegal characters.
|
||||
|
||||
|
||||
@param Name The filename to check.
|
||||
|
||||
@retval TRUE The filename is ok.
|
||||
@@ -323,18 +323,18 @@ EditGetDefaultFileName (
|
||||
}
|
||||
|
||||
/**
|
||||
Read a file into an allocated buffer. The buffer is the responsibility
|
||||
Read a file into an allocated buffer. The buffer is the responsibility
|
||||
of the caller to free.
|
||||
|
||||
@param[in] FileName The filename of the file to open.
|
||||
@param[out] Buffer Upon successful return, the pointer to the
|
||||
address of the allocated buffer.
|
||||
@param[out] Buffer Upon successful return, the pointer to the
|
||||
address of the allocated buffer.
|
||||
@param[out] BufferSize If not NULL, then the pointer to the size
|
||||
of the allocated buffer.
|
||||
@param[out] ReadOnly Upon successful return TRUE if the file is
|
||||
read only. FALSE otherwise.
|
||||
|
||||
@retval EFI_NOT_FOUND The filename did not represent a file in the
|
||||
@retval EFI_NOT_FOUND The filename did not represent a file in the
|
||||
file system.
|
||||
@retval EFI_SUCCESS The file was read into the buffer.
|
||||
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.
|
||||
@@ -381,7 +381,7 @@ ReadFileIntoBuffer (
|
||||
}
|
||||
|
||||
Info = ShellGetFileInfo(FileHandle);
|
||||
|
||||
|
||||
if (Info->Attribute & EFI_FILE_DIRECTORY) {
|
||||
FreePool (Info);
|
||||
return EFI_INVALID_PARAMETER;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Main file for NULL named library for Profile1 shell command functions.
|
||||
|
||||
Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 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
|
||||
@@ -312,7 +312,7 @@ ShellCommandRunHexEdit (
|
||||
|
||||
/**
|
||||
Clear the line at the specified Row.
|
||||
|
||||
|
||||
@param[in] Row The row number to be cleared ( start from 1 )
|
||||
@param[in] LastCol The last printable column.
|
||||
@param[in] LastRow The last printable row.
|
||||
@@ -326,7 +326,7 @@ EditorClearLine (
|
||||
|
||||
/**
|
||||
Check if file name has illegal characters.
|
||||
|
||||
|
||||
@param Name The filename to check.
|
||||
|
||||
@retval TRUE The filename is ok.
|
||||
@@ -351,18 +351,18 @@ EditGetDefaultFileName (
|
||||
);
|
||||
|
||||
/**
|
||||
Read a file into an allocated buffer. The buffer is the responsibility
|
||||
Read a file into an allocated buffer. The buffer is the responsibility
|
||||
of the caller to free.
|
||||
|
||||
@param[in] FileName The filename of the file to open.
|
||||
@param[out] Buffer Upon successful return, the pointer to the
|
||||
address of the allocated buffer.
|
||||
@param[out] Buffer Upon successful return, the pointer to the
|
||||
address of the allocated buffer.
|
||||
@param[out] BufferSize If not NULL, then the pointer to the size
|
||||
of the allocated buffer.
|
||||
@param[out] ReadOnly Upon successful return TRUE if the file is
|
||||
read only. FALSE otherwise.
|
||||
|
||||
@retval EFI_NOT_FOUND The filename did not represent a file in the
|
||||
@retval EFI_NOT_FOUND The filename did not represent a file in the
|
||||
file system. Directories cannot be read with
|
||||
this method.
|
||||
@retval EFI_SUCCESS The file was read into the buffer.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# Provides shell Debug1 profile functions
|
||||
#
|
||||
# Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2010 - 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
|
||||
@@ -64,8 +64,8 @@
|
||||
EditStatusBar.c
|
||||
EditMenuBar.h
|
||||
EditMenuBar.c
|
||||
|
||||
## Files specific to the text editor
|
||||
|
||||
## Files specific to the text editor
|
||||
Edit/Edit.c
|
||||
Edit/TextEditor.h
|
||||
Edit/TextEditorTypes.h
|
||||
@@ -76,7 +76,7 @@
|
||||
Edit/Misc.h
|
||||
Edit/Misc.c
|
||||
Edit/TextEditStrings.uni
|
||||
|
||||
|
||||
## Files specific to the HEX editor
|
||||
HexEdit/BufferImage.h
|
||||
HexEdit/BufferImage.c
|
||||
|
@@ -1,6 +1,6 @@
|
||||
// /**
|
||||
//
|
||||
// Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
// (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
// (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
// This program and the accompanying materials
|
||||
@@ -1041,7 +1041,7 @@
|
||||
" 2. The variable value is printed as a hexadecimal dump.\r\n"
|
||||
" 3. Option -d is used to delete variables. Option -s and -l are used to save\r\n"
|
||||
" and load variables to and from a file. The variable name can be specified\r\n"
|
||||
" when using these flags so that the operation only takes effect on\r\n"
|
||||
" when using these flags so that the operation only takes effect on\r\n"
|
||||
" that variable.\r\n"
|
||||
".SH EXAMPLES\r\n"
|
||||
" \r\n"
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for connect shell Driver1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 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
|
||||
@@ -36,16 +36,16 @@ ShellConnectDevicePath (
|
||||
EFI_STATUS Status;
|
||||
EFI_HANDLE Handle;
|
||||
EFI_HANDLE PreviousHandle;
|
||||
|
||||
|
||||
if (DevicePathToConnect == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
PreviousHandle = NULL;
|
||||
do{
|
||||
do{
|
||||
RemainingDevicePath = DevicePathToConnect;
|
||||
Status = gBS->LocateDevicePath (&gEfiDevicePathProtocolGuid, &RemainingDevicePath, &Handle);
|
||||
|
||||
|
||||
if (!EFI_ERROR (Status) && (Handle != NULL)) {
|
||||
if (PreviousHandle == Handle) {
|
||||
Status = EFI_NOT_FOUND;
|
||||
@@ -54,16 +54,16 @@ ShellConnectDevicePath (
|
||||
Status = gBS->ConnectController (Handle, NULL, RemainingDevicePath, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} while (!EFI_ERROR (Status) && !IsDevicePathEnd (RemainingDevicePath) );
|
||||
|
||||
|
||||
return Status;
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
Connect drivers for PCI root bridge.
|
||||
|
||||
|
||||
@retval EFI_SUCCESS Connect drivers successfully.
|
||||
@retval EFI_NOT_FOUND Cannot find PCI root bridge device.
|
||||
|
||||
@@ -72,31 +72,31 @@ EFI_STATUS
|
||||
ShellConnectPciRootBridge (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
{
|
||||
UINTN RootBridgeHandleCount;
|
||||
EFI_HANDLE *RootBridgeHandleBuffer;
|
||||
UINTN RootBridgeIndex;
|
||||
EFI_STATUS Status;
|
||||
|
||||
|
||||
RootBridgeHandleCount = 0;
|
||||
|
||||
Status = gBS->LocateHandleBuffer (
|
||||
ByProtocol,
|
||||
&gEfiPciRootBridgeIoProtocolGuid,
|
||||
NULL,
|
||||
&RootBridgeHandleCount,
|
||||
&RootBridgeHandleBuffer
|
||||
|
||||
Status = gBS->LocateHandleBuffer (
|
||||
ByProtocol,
|
||||
&gEfiPciRootBridgeIoProtocolGuid,
|
||||
NULL,
|
||||
&RootBridgeHandleCount,
|
||||
&RootBridgeHandleBuffer
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
for (RootBridgeIndex = 0; RootBridgeIndex < RootBridgeHandleCount; RootBridgeIndex++) {
|
||||
gBS->ConnectController (RootBridgeHandleBuffer[RootBridgeIndex], NULL, NULL, FALSE);
|
||||
}
|
||||
|
||||
for (RootBridgeIndex = 0; RootBridgeIndex < RootBridgeHandleCount; RootBridgeIndex++) {
|
||||
gBS->ConnectController (RootBridgeHandleBuffer[RootBridgeIndex], NULL, NULL, FALSE);
|
||||
}
|
||||
|
||||
FreePool (RootBridgeHandleBuffer);
|
||||
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -199,7 +199,7 @@ ShellConnectFromDevPaths (
|
||||
{
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevPath;
|
||||
EFI_DEVICE_PATH_PROTOCOL *CopyOfDevPath;
|
||||
EFI_DEVICE_PATH_PROTOCOL *Instance;
|
||||
EFI_DEVICE_PATH_PROTOCOL *Instance;
|
||||
EFI_DEVICE_PATH_PROTOCOL *Next;
|
||||
UINTN Length;
|
||||
UINTN Index;
|
||||
@@ -210,7 +210,7 @@ ShellConnectFromDevPaths (
|
||||
BOOLEAN AtLeastOneConnected;
|
||||
EFI_PCI_IO_PROTOCOL *PciIo;
|
||||
UINT8 Class[3];
|
||||
|
||||
|
||||
DevPath = NULL;
|
||||
Length = 0;
|
||||
AtLeastOneConnected = FALSE;
|
||||
@@ -266,14 +266,14 @@ ShellConnectFromDevPaths (
|
||||
((DevicePathSubType (Instance) == MSG_USB_CLASS_DP)
|
||||
|| (DevicePathSubType (Instance) == MSG_USB_WWID_DP)
|
||||
)) {
|
||||
|
||||
|
||||
Status = ShellConnectPciRootBridge ();
|
||||
if (EFI_ERROR(Status)) {
|
||||
FreePool(Instance);
|
||||
FreePool(DevPath);
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
Status = gBS->LocateHandleBuffer (
|
||||
ByProtocol,
|
||||
&gEfiPciIoProtocolGuid,
|
||||
@@ -281,7 +281,7 @@ ShellConnectFromDevPaths (
|
||||
&HandleArrayCount,
|
||||
&HandleArray
|
||||
);
|
||||
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
for (Index = 0; Index < HandleArrayCount; Index++) {
|
||||
Status = gBS->HandleProtocol (
|
||||
@@ -289,7 +289,7 @@ ShellConnectFromDevPaths (
|
||||
&gEfiPciIoProtocolGuid,
|
||||
(VOID **)&PciIo
|
||||
);
|
||||
|
||||
|
||||
if (!EFI_ERROR (Status)) {
|
||||
Status = PciIo->Pci.Read (PciIo, EfiPciIoWidthUint8, 0x09, 3, &Class);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
@@ -313,7 +313,7 @@ ShellConnectFromDevPaths (
|
||||
if (HandleArray != NULL) {
|
||||
FreePool (HandleArray);
|
||||
}
|
||||
} else {
|
||||
} else {
|
||||
//
|
||||
// connect the entire device path
|
||||
//
|
||||
@@ -323,9 +323,9 @@ ShellConnectFromDevPaths (
|
||||
}
|
||||
}
|
||||
FreePool (Instance);
|
||||
|
||||
|
||||
} while (CopyOfDevPath != NULL);
|
||||
|
||||
|
||||
if (DevPath != NULL) {
|
||||
FreePool(DevPath);
|
||||
}
|
||||
@@ -335,7 +335,7 @@ ShellConnectFromDevPaths (
|
||||
} else {
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -437,7 +437,7 @@ ShellCommandRunConnect (
|
||||
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), gShellDriver1HiiHandle, L"connect", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"connect", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -456,7 +456,7 @@ ShellCommandRunConnect (
|
||||
//
|
||||
// error for too many parameters
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"connect");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"connect");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetFlag(Package, L"-c")) {
|
||||
//
|
||||
@@ -504,7 +504,7 @@ ShellCommandRunConnect (
|
||||
Status = ShellConvertStringToUint64(Param1, &Intermediate, TRUE, FALSE);
|
||||
Handle1 = ConvertHandleIndexToHandle((UINTN)Intermediate);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"connect", Param1);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"connect", Param1);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
} else {
|
||||
@@ -515,22 +515,22 @@ ShellCommandRunConnect (
|
||||
Status = ShellConvertStringToUint64(Param2, &Intermediate, TRUE, FALSE);
|
||||
Handle2 = ConvertHandleIndexToHandle((UINTN)Intermediate);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"connect", Param2);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"connect", Param2);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
} else {
|
||||
Handle2 = NULL;
|
||||
}
|
||||
|
||||
|
||||
if (ShellStatus == SHELL_SUCCESS) {
|
||||
if (Param1 != NULL && Handle1 == NULL){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"connect", Param1);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"connect", Param1);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (Param2 != NULL && Handle2 == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"connect", Param2);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"connect", Param2);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (Handle2 != NULL && Handle1 != NULL && EFI_ERROR(gBS->OpenProtocol(Handle2, &gEfiDriverBindingProtocolGuid, NULL, gImageHandle, NULL, EFI_OPEN_PROTOCOL_TEST_PROTOCOL))) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"connect", Param2);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"connect", Param2);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ConvertAndConnectControllers(Handle1, Handle2, ShellCommandLineGetFlag(Package, L"-r"), (BOOLEAN)(Count!=0));
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for DevTree shell Driver1 function.
|
||||
|
||||
(C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 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
|
||||
@@ -58,12 +58,12 @@ DoDevTreeForHandle(
|
||||
|
||||
ASSERT (TheHandle != NULL);
|
||||
ASSERT (HiiString != NULL);
|
||||
|
||||
|
||||
if (ShellGetExecutionBreakFlag()) {
|
||||
ShellStatus = SHELL_ABORTED;
|
||||
return ShellStatus;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// We want controller handles. they will not have LoadedImage or DriverBinding (or others...)
|
||||
//
|
||||
@@ -184,7 +184,7 @@ ShellCommandRunDevTree (
|
||||
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), gShellDriver1HiiHandle, L"devtree", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"devtree", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -192,7 +192,7 @@ ShellCommandRunDevTree (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"devtree");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"devtree");
|
||||
ShellCommandLineFreeVarList (Package);
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
@@ -206,7 +206,7 @@ ShellCommandRunDevTree (
|
||||
// AsciiSPrint(Language, 10, "en-us");
|
||||
} else {
|
||||
ASSERT(Language == NULL);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"devtree", L"-l");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"devtree", L"-l");
|
||||
ShellCommandLineFreeVarList (Package);
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
@@ -259,7 +259,7 @@ ShellCommandRunDevTree (
|
||||
} else {
|
||||
Status = ShellConvertStringToUint64(Lang, &Intermediate, TRUE, FALSE);
|
||||
if (EFI_ERROR(Status) || ConvertHandleIndexToHandle((UINTN)Intermediate) == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"devtree", Lang);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"devtree", Lang);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
ShellStatus = DoDevTreeForHandle(ConvertHandleIndexToHandle((UINTN)Intermediate), Language, FlagD, 0, HiiString);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for devices shell Driver1 function.
|
||||
|
||||
(C) Copyright 2012-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 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
|
||||
@@ -19,19 +19,19 @@
|
||||
Get lots of info about a device from its handle.
|
||||
|
||||
@param[in] TheHandle The device handle to get info on.
|
||||
@param[in, out] Type On successful return R, B, or D (root, bus, or
|
||||
@param[in, out] Type On successful return R, B, or D (root, bus, or
|
||||
device) will be placed in this buffer.
|
||||
@param[in, out] Cfg On successful return this buffer will be
|
||||
@param[in, out] Cfg On successful return this buffer will be
|
||||
TRUE if the handle has configuration, FALSE
|
||||
otherwise.
|
||||
@param[in, out] Diag On successful return this buffer will be
|
||||
@param[in, out] Diag On successful return this buffer will be
|
||||
TRUE if the handle has disgnostics, FALSE
|
||||
otherwise.
|
||||
@param[in, out] Parents On successful return this buffer will be
|
||||
@param[in, out] Parents On successful return this buffer will be
|
||||
contain the number of parent handles.
|
||||
@param[in, out] Devices On successful return this buffer will be
|
||||
@param[in, out] Devices On successful return this buffer will be
|
||||
contain the number of devices controlled.
|
||||
@param[in, out] Children On successful return this buffer will be
|
||||
@param[in, out] Children On successful return this buffer will be
|
||||
contain the number of child handles.
|
||||
@param[out] Name The pointer to a buffer that will be allocated
|
||||
and contain the string name of the handle.
|
||||
@@ -58,7 +58,7 @@ GetDeviceHandleInfo (
|
||||
EFI_HANDLE *HandleBuffer;
|
||||
UINTN Count;
|
||||
|
||||
if (TheHandle == NULL
|
||||
if (TheHandle == NULL
|
||||
|| Type == NULL
|
||||
|| Cfg == NULL
|
||||
|| Diag == NULL
|
||||
@@ -168,7 +168,7 @@ ShellCommandRunDevices (
|
||||
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), gShellDriver1HiiHandle, L"devices", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"devices", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -182,7 +182,7 @@ ShellCommandRunDevices (
|
||||
//
|
||||
// error for too many parameters
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"devices");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"devices");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@@ -198,7 +198,7 @@ ShellCommandRunDevices (
|
||||
// AsciiSPrint(Language, 10, "en-us");
|
||||
} else {
|
||||
ASSERT(Language == NULL);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"devices", L"-l");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"devices", L"-l");
|
||||
ShellCommandLineFreeVarList (Package);
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
@@ -253,13 +253,13 @@ ShellCommandRunDevices (
|
||||
ShellStatus = SHELL_ABORTED;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (HandleList != NULL) {
|
||||
FreePool(HandleList);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
SHELL_FREE_NON_NULL(Language);
|
||||
ShellCommandLineFreeVarList (Package);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for Dh shell Driver1 function.
|
||||
|
||||
(C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2017 Hewlett Packard Enterprise Development LP<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -342,7 +342,7 @@ GetProtocolInfoString(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
SHELL_FREE_NON_NULL(ProtocolGuidArray);
|
||||
|
||||
if (RetVal == NULL) {
|
||||
@@ -395,7 +395,7 @@ GetDriverImageName (
|
||||
|
||||
/**
|
||||
Display driver model information for a given handle.
|
||||
|
||||
|
||||
@param[in] Handle The handle to display info on.
|
||||
@param[in] BestName Use the best name?
|
||||
@param[in] Language The language to output in.
|
||||
@@ -483,14 +483,14 @@ DisplayDriverModelHandle (
|
||||
Status = gEfiShellProtocol->GetDeviceName(Handle, EFI_DEVICE_NAME_USE_COMPONENT_NAME|EFI_DEVICE_NAME_USE_DEVICE_PATH, (CHAR8*)Language, &TempStringPointer);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DH_OUTPUT_DRIVER1), gShellDriver1HiiHandle, TempStringPointer!=NULL?TempStringPointer:L"<Unknown>");
|
||||
SHELL_FREE_NON_NULL(TempStringPointer);
|
||||
|
||||
|
||||
TempStringPointer = ConvertDevicePathToText(DevicePath, TRUE, FALSE);
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER2),
|
||||
gShellDriver1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER2),
|
||||
gShellDriver1HiiHandle,
|
||||
TempStringPointer!=NULL?TempStringPointer:L"<None>",
|
||||
ParentControllerHandleCount == 0?L"ROOT":(ChildControllerHandleCount > 0)?L"BUS":L"DEVICE",
|
||||
ConfigurationStatus?L"YES":L"NO",
|
||||
@@ -501,20 +501,20 @@ DisplayDriverModelHandle (
|
||||
|
||||
if (DriverBindingHandleCount == 0) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER3),
|
||||
gShellDriver1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER3),
|
||||
gShellDriver1HiiHandle,
|
||||
L"<None>"
|
||||
);
|
||||
} else {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER3),
|
||||
gShellDriver1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER3),
|
||||
gShellDriver1HiiHandle,
|
||||
L""
|
||||
);
|
||||
for (Index = 0; Index < DriverBindingHandleCount; Index++) {
|
||||
@@ -536,9 +536,9 @@ DisplayDriverModelHandle (
|
||||
|
||||
if (Image) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER4A),
|
||||
gShellDriver1HiiHandle,
|
||||
ConvertHandleToHandleIndex (DriverBindingHandleBuffer[Index]),
|
||||
@@ -546,9 +546,9 @@ DisplayDriverModelHandle (
|
||||
);
|
||||
} else {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER4B),
|
||||
gShellDriver1HiiHandle,
|
||||
ConvertHandleToHandleIndex (DriverBindingHandleBuffer[Index]),
|
||||
@@ -561,28 +561,28 @@ DisplayDriverModelHandle (
|
||||
|
||||
if (ParentControllerHandleCount == 0) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER5),
|
||||
gShellDriver1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER5),
|
||||
gShellDriver1HiiHandle,
|
||||
L"<None>"
|
||||
);
|
||||
} else {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER5),
|
||||
gShellDriver1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER5),
|
||||
gShellDriver1HiiHandle,
|
||||
L""
|
||||
);
|
||||
for (Index = 0; Index < ParentControllerHandleCount; Index++) {
|
||||
Status = gEfiShellProtocol->GetDeviceName(ParentControllerHandleBuffer[Index], EFI_DEVICE_NAME_USE_COMPONENT_NAME|EFI_DEVICE_NAME_USE_DEVICE_PATH, (CHAR8*)Language, &TempStringPointer);
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER5B),
|
||||
gShellDriver1HiiHandle,
|
||||
ConvertHandleToHandleIndex (ParentControllerHandleBuffer[Index]),
|
||||
@@ -594,28 +594,28 @@ DisplayDriverModelHandle (
|
||||
|
||||
if (ChildControllerHandleCount == 0) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER6),
|
||||
gShellDriver1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER6),
|
||||
gShellDriver1HiiHandle,
|
||||
L"<None>"
|
||||
);
|
||||
} else {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER6),
|
||||
gShellDriver1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER6),
|
||||
gShellDriver1HiiHandle,
|
||||
L""
|
||||
);
|
||||
for (Index = 0; Index < ChildControllerHandleCount; Index++) {
|
||||
Status = gEfiShellProtocol->GetDeviceName(ChildControllerHandleBuffer[Index], EFI_DEVICE_NAME_USE_COMPONENT_NAME|EFI_DEVICE_NAME_USE_DEVICE_PATH, (CHAR8*)Language, &TempStringPointer);
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER6B),
|
||||
gShellDriver1HiiHandle,
|
||||
ConvertHandleToHandleIndex (ChildControllerHandleBuffer[Index]),
|
||||
@@ -675,9 +675,9 @@ DisplayDriverModelHandle (
|
||||
}
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER7),
|
||||
gShellDriver1HiiHandle,
|
||||
ConvertHandleToHandleIndex(Handle),
|
||||
@@ -692,9 +692,9 @@ DisplayDriverModelHandle (
|
||||
DriverName = NULL;
|
||||
}
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER7B),
|
||||
gShellDriver1HiiHandle,
|
||||
DriverName!=NULL?DriverName:L"<Unknown>"
|
||||
@@ -702,11 +702,11 @@ DisplayDriverModelHandle (
|
||||
SHELL_FREE_NON_NULL(DriverName);
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER8),
|
||||
gShellDriver1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER8),
|
||||
gShellDriver1HiiHandle,
|
||||
DriverBinding->Version,
|
||||
NumberOfChildren > 0?L"Bus":ControllerHandleCount > 0?L"Device":L"<Unknown>",
|
||||
ConfigurationStatus?L"YES":L"NO",
|
||||
@@ -715,29 +715,29 @@ DisplayDriverModelHandle (
|
||||
|
||||
if (ControllerHandleCount == 0) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER9),
|
||||
gShellDriver1HiiHandle,
|
||||
gShellDriver1HiiHandle,
|
||||
L"None"
|
||||
);
|
||||
} else {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER9),
|
||||
gShellDriver1HiiHandle,
|
||||
gShellDriver1HiiHandle,
|
||||
L""
|
||||
);
|
||||
for (HandleIndex = 0; HandleIndex < ControllerHandleCount; HandleIndex++) {
|
||||
Status = gEfiShellProtocol->GetDeviceName(ControllerHandleBuffer[HandleIndex], EFI_DEVICE_NAME_USE_COMPONENT_NAME|EFI_DEVICE_NAME_USE_DEVICE_PATH, (CHAR8*)Language, &TempStringPointer);
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER9B),
|
||||
gShellDriver1HiiHandle,
|
||||
ConvertHandleToHandleIndex(ControllerHandleBuffer[HandleIndex]),
|
||||
@@ -756,9 +756,9 @@ DisplayDriverModelHandle (
|
||||
Status = gEfiShellProtocol->GetDeviceName(ChildControllerHandleBuffer[ChildIndex], EFI_DEVICE_NAME_USE_COMPONENT_NAME|EFI_DEVICE_NAME_USE_DEVICE_PATH, (CHAR8*)Language, &TempStringPointer);
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DH_OUTPUT_DRIVER6C),
|
||||
gShellDriver1HiiHandle,
|
||||
ConvertHandleToHandleIndex(ChildControllerHandleBuffer[ChildIndex]),
|
||||
@@ -1109,7 +1109,7 @@ ShellCommandRunDh (
|
||||
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), gShellDriver1HiiHandle, L"dh", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"dh", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -1117,7 +1117,7 @@ ShellCommandRunDh (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"dh");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"dh");
|
||||
ShellCommandLineFreeVarList (Package);
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 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
|
||||
@@ -118,7 +118,7 @@ ShellCommandRunDisconnect (
|
||||
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), gShellDriver1HiiHandle, L"disconnect", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"disconnect", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -127,10 +127,10 @@ ShellCommandRunDisconnect (
|
||||
} else {
|
||||
if (ShellCommandLineGetFlag(Package, L"-r")){
|
||||
if (ShellCommandLineGetCount(Package) > 1){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"disconnect");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"disconnect");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) < 1) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDriver1HiiHandle, L"disconnect");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDriver1HiiHandle, L"disconnect");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = DisconnectAll ();
|
||||
@@ -151,10 +151,10 @@ ShellCommandRunDisconnect (
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 4){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"disconnect");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"disconnect");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) < 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDriver1HiiHandle, L"disconnect");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDriver1HiiHandle, L"disconnect");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@@ -171,17 +171,17 @@ ShellCommandRunDisconnect (
|
||||
Handle3 = Param3!=NULL?ConvertHandleIndexToHandle((UINTN)Intermediate3):NULL;
|
||||
|
||||
if (Param1 != NULL && Handle1 == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"disconnect", Param1);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"disconnect", Param1);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (Param2 != NULL && Handle2 == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"disconnect", Param2);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"disconnect", Param2);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (Param3 != NULL && Handle3 == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"disconnect", Param3);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"disconnect", Param3);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (Handle2 != NULL && EFI_ERROR(gBS->OpenProtocol(Handle2, &gEfiDriverBindingProtocolGuid, NULL, gImageHandle, NULL, EFI_OPEN_PROTOCOL_TEST_PROTOCOL))) {
|
||||
ASSERT(Param2 != NULL);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_HANDLE_NOT), gShellDriver1HiiHandle, L"disconnect", ShellStrToUintn(Param2), L"driver handle");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_HANDLE_NOT), gShellDriver1HiiHandle, L"disconnect", ShellStrToUintn(Param2), L"driver handle");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
ASSERT(Param1 != NULL);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for Drivers shell Driver1 function.
|
||||
|
||||
(C) Copyright 2012-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 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
|
||||
@@ -29,7 +29,7 @@ STATIC CONST SHELL_PARAM_ITEM ParamList[] = {
|
||||
@param[in] TheHandle The handle to get the device path for.
|
||||
|
||||
@retval NULL An error occured.
|
||||
@return A pointer to the driver path as a string. The callee must
|
||||
@return A pointer to the driver path as a string. The callee must
|
||||
free this memory.
|
||||
**/
|
||||
CHAR16*
|
||||
@@ -302,7 +302,7 @@ ShellCommandRunDrivers (
|
||||
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), gShellDriver1HiiHandle, L"drivers", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"drivers", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -310,7 +310,7 @@ ShellCommandRunDrivers (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetCount(Package) > 1) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"drivers");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"drivers");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
if (ShellCommandLineGetFlag(Package, L"-l")){
|
||||
@@ -320,7 +320,7 @@ ShellCommandRunDrivers (
|
||||
AsciiSPrint(Language, StrSize(Lang), "%S", Lang);
|
||||
} else {
|
||||
ASSERT(Language == NULL);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"drivers", L"-l");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"drivers", L"-l");
|
||||
ShellCommandLineFreeVarList (Package);
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for DrvCfg shell Driver1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 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
|
||||
@@ -183,7 +183,7 @@ ConfigToFile(
|
||||
STRING_TOKEN(STR_GEN_FILE_OPEN_FAIL),
|
||||
gShellDriver1HiiHandle,
|
||||
L"drvcfg",
|
||||
FileName,
|
||||
FileName,
|
||||
Status);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
@@ -199,13 +199,13 @@ ConfigToFile(
|
||||
|
||||
if (EFI_ERROR(Status) || HiiDatabase == NULL) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_GEN_PROTOCOL_NF),
|
||||
STRING_TOKEN(STR_GEN_PROTOCOL_NF),
|
||||
gShellDriver1HiiHandle,
|
||||
L"drvcfg",
|
||||
L"EfiHiiDatabaseProtocol",
|
||||
L"EfiHiiDatabaseProtocol",
|
||||
&gEfiHiiDatabaseProtocolGuid);
|
||||
ShellCloseFile(&FileHandle);
|
||||
return (SHELL_NOT_FOUND);
|
||||
@@ -215,16 +215,16 @@ ConfigToFile(
|
||||
Status = ConvertHandleToHiiHandle(Handle, &HiiHandle, HiiDatabase);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_GEN_HANDLE_NOT),
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_GEN_HANDLE_NOT),
|
||||
gShellDriver1HiiHandle,
|
||||
L"drvcfg",
|
||||
ConvertHandleToHandleIndex(Handle),
|
||||
ConvertHandleToHandleIndex(Handle),
|
||||
L"Device");
|
||||
ShellCloseFile(&FileHandle);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
|
||||
Status = HiiDatabase->ExportPackageLists(HiiDatabase, HiiHandle, &MainBufferSize, MainBuffer);
|
||||
@@ -240,20 +240,20 @@ ConfigToFile(
|
||||
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_FILE_WRITE_FAIL),
|
||||
STRING_TOKEN(STR_FILE_WRITE_FAIL),
|
||||
gShellDriver1HiiHandle,
|
||||
L"drvcfg",
|
||||
FileName);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_DRVCFG_COMP),
|
||||
STRING_TOKEN(STR_DRVCFG_COMP),
|
||||
gShellDriver1HiiHandle);
|
||||
|
||||
return (SHELL_SUCCESS);
|
||||
@@ -296,9 +296,9 @@ ConfigFromFile(
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_GEN_FILE_OPEN_FAIL),
|
||||
gShellDriver1HiiHandle,
|
||||
gShellDriver1HiiHandle,
|
||||
L"drvcfg",
|
||||
FileName,
|
||||
FileName,
|
||||
Status);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
@@ -314,13 +314,13 @@ ConfigFromFile(
|
||||
|
||||
if (EFI_ERROR(Status) || HiiDatabase == NULL) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_GEN_PROTOCOL_NF),
|
||||
gShellDriver1HiiHandle,
|
||||
STRING_TOKEN(STR_GEN_PROTOCOL_NF),
|
||||
gShellDriver1HiiHandle,
|
||||
L"drvcfg",
|
||||
L"EfiHiiDatabaseProtocol",
|
||||
L"EfiHiiDatabaseProtocol",
|
||||
&gEfiHiiDatabaseProtocolGuid);
|
||||
ShellCloseFile(&FileHandle);
|
||||
return (SHELL_NOT_FOUND);
|
||||
@@ -330,42 +330,42 @@ ConfigFromFile(
|
||||
MainBufferSize = (UINTN)Temp;
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_FILE_READ_FAIL),
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_FILE_READ_FAIL),
|
||||
gShellDriver1HiiHandle,
|
||||
L"drvcfg",
|
||||
FileName);
|
||||
|
||||
ShellCloseFile(&FileHandle);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
MainBuffer = AllocateZeroPool((UINTN)MainBufferSize);
|
||||
MainBuffer = AllocateZeroPool((UINTN)MainBufferSize);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_GEN_OUT_MEM),
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_GEN_OUT_MEM),
|
||||
gShellDriver1HiiHandle, L"drvcfg");
|
||||
ShellCloseFile(&FileHandle);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
Status = ShellReadFile(FileHandle, &MainBufferSize, MainBuffer);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_FILE_READ_FAIL),
|
||||
gShellDriver1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_FILE_READ_FAIL),
|
||||
gShellDriver1HiiHandle,
|
||||
L"drvcfg",
|
||||
FileName);
|
||||
|
||||
ShellCloseFile(&FileHandle);
|
||||
SHELL_FREE_NON_NULL(MainBuffer);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
|
||||
ShellCloseFile(&FileHandle);
|
||||
@@ -378,28 +378,28 @@ ConfigFromFile(
|
||||
Status = ConvertHandleToHiiHandle(Handle, &HiiHandle, HiiDatabase);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_GEN_HANDLE_NOT),
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_GEN_HANDLE_NOT),
|
||||
gShellDriver1HiiHandle, L"drvcfg",
|
||||
ConvertHandleToHandleIndex(Handle),
|
||||
ConvertHandleToHandleIndex(Handle),
|
||||
L"Device");
|
||||
ShellCloseFile(&FileHandle);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
Status = HiiDatabase->UpdatePackageList(HiiDatabase, HiiHandle, MainBuffer);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_GEN_UEFI_FUNC_WARN),
|
||||
gShellDriver1HiiHandle,
|
||||
L"drvcfg",
|
||||
L"HiiDatabase->UpdatePackageList",
|
||||
L"HiiDatabase->UpdatePackageList",
|
||||
Status);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
} else {
|
||||
//
|
||||
@@ -421,24 +421,24 @@ ConfigFromFile(
|
||||
//
|
||||
TempDevPathString = ConvertDevicePathToText((EFI_DEVICE_PATH_PROTOCOL*)(((CHAR8*)PackageHeader) + sizeof(EFI_HII_PACKAGE_HEADER)), TRUE, TRUE);
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_DRVCFG_IN_FILE_NF),
|
||||
gShellDriver1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_DRVCFG_IN_FILE_NF),
|
||||
gShellDriver1HiiHandle,
|
||||
TempDevPathString);
|
||||
SHELL_FREE_NON_NULL(TempDevPathString);
|
||||
} else {
|
||||
Status = HiiDatabase->UpdatePackageList(HiiDatabase, HiiHandle, PackageListHeader);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_GEN_UEFI_FUNC_WARN),
|
||||
gShellDriver1HiiHandle,
|
||||
gShellDriver1HiiHandle,
|
||||
L"drvcfg",
|
||||
L"HiiDatabase->UpdatePackageList",
|
||||
L"HiiDatabase->UpdatePackageList",
|
||||
Status);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
} else {
|
||||
@@ -446,14 +446,14 @@ ConfigFromFile(
|
||||
gBS->LocateDevicePath(&gEfiHiiConfigAccessProtocolGuid, &DevPath, &Handle);
|
||||
HandleIndex = ConvertHandleToHandleIndex(Handle);
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_DRVCFG_DONE_HII),
|
||||
gShellDriver1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_DRVCFG_DONE_HII),
|
||||
gShellDriver1HiiHandle,
|
||||
HandleIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -463,10 +463,10 @@ ConfigFromFile(
|
||||
|
||||
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN(STR_DRVCFG_COMP),
|
||||
STRING_TOKEN(STR_DRVCFG_COMP),
|
||||
gShellDriver1HiiHandle);
|
||||
return (SHELL_SUCCESS);
|
||||
}
|
||||
@@ -593,22 +593,22 @@ PreHiiDrvCfg (
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_FORCE_D),
|
||||
gShellDriver1HiiHandle,
|
||||
STRING_TOKEN (STR_DRVCFG_FORCE_D),
|
||||
gShellDriver1HiiHandle,
|
||||
DefaultType);
|
||||
} else if (ValidateOptions) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_VALIDATE),
|
||||
STRING_TOKEN (STR_DRVCFG_VALIDATE),
|
||||
gShellDriver1HiiHandle);
|
||||
} else if (SetOptions) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_SET),
|
||||
STRING_TOKEN (STR_DRVCFG_SET),
|
||||
gShellDriver1HiiHandle);
|
||||
}
|
||||
|
||||
@@ -619,8 +619,8 @@ PreHiiDrvCfg (
|
||||
goto Done;
|
||||
}
|
||||
for (
|
||||
HandleBuffer = DriverImageHandleBuffer, DriverImageHandleCount = 0
|
||||
; HandleBuffer != NULL && *HandleBuffer != NULL
|
||||
HandleBuffer = DriverImageHandleBuffer, DriverImageHandleCount = 0
|
||||
; HandleBuffer != NULL && *HandleBuffer != NULL
|
||||
; HandleBuffer++,DriverImageHandleCount++);
|
||||
} else {
|
||||
DriverImageHandleCount = 1;
|
||||
@@ -666,7 +666,7 @@ PreHiiDrvCfg (
|
||||
ShellStatus = SHELL_UNSUPPORTED;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
BestLanguage = GetBestLanguage (
|
||||
DriverConfiguration->SupportedLanguages,
|
||||
Iso639Language,
|
||||
@@ -725,7 +725,7 @@ PreHiiDrvCfg (
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_SET),
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_SET),
|
||||
gShellDriver1HiiHandle);
|
||||
for (LoopCounter = 0; LoopCounter < HandleCount; LoopCounter++) {
|
||||
if ((HandleType[LoopCounter] & HR_CONTROLLER_HANDLE) == HR_CONTROLLER_HANDLE) {
|
||||
@@ -742,8 +742,8 @@ PreHiiDrvCfg (
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_NOT_SET),
|
||||
gShellDriver1HiiHandle,
|
||||
STRING_TOKEN (STR_DRVCFG_NOT_SET),
|
||||
gShellDriver1HiiHandle,
|
||||
Status);
|
||||
}
|
||||
continue;
|
||||
@@ -784,7 +784,7 @@ PreHiiDrvCfg (
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_DEF_FORCED),
|
||||
STRING_TOKEN (STR_DRVCFG_DEF_FORCED),
|
||||
gShellDriver1HiiHandle);
|
||||
ShellCmdDriverConfigurationProcessActionRequired (
|
||||
DriverImageHandleBuffer[OuterLoopCounter],
|
||||
@@ -797,8 +797,8 @@ PreHiiDrvCfg (
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_FORCE_FAILED),
|
||||
gShellDriver1HiiHandle,
|
||||
STRING_TOKEN (STR_DRVCFG_FORCE_FAILED),
|
||||
gShellDriver1HiiHandle,
|
||||
Status);
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
}
|
||||
@@ -814,15 +814,15 @@ PreHiiDrvCfg (
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_VALID),
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_VALID),
|
||||
gShellDriver1HiiHandle);
|
||||
} else {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_INV),
|
||||
gShellDriver1HiiHandle,
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_INV),
|
||||
gShellDriver1HiiHandle,
|
||||
Status);
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
}
|
||||
@@ -853,7 +853,7 @@ PreHiiDrvCfg (
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_SET),
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_SET),
|
||||
gShellDriver1HiiHandle);
|
||||
|
||||
ShellCmdDriverConfigurationProcessActionRequired (
|
||||
@@ -868,8 +868,8 @@ PreHiiDrvCfg (
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_NOT_SET),
|
||||
gShellDriver1HiiHandle,
|
||||
STRING_TOKEN (STR_DRVCFG_NOT_SET),
|
||||
gShellDriver1HiiHandle,
|
||||
Status);
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
}
|
||||
@@ -931,7 +931,7 @@ PreHiiDrvCfg (
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_DEF_FORCED),
|
||||
STRING_TOKEN (STR_DRVCFG_DEF_FORCED),
|
||||
gShellDriver1HiiHandle);
|
||||
|
||||
ShellCmdDriverConfigurationProcessActionRequired (
|
||||
@@ -946,8 +946,8 @@ PreHiiDrvCfg (
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_FORCE_FAILED),
|
||||
gShellDriver1HiiHandle,
|
||||
STRING_TOKEN (STR_DRVCFG_FORCE_FAILED),
|
||||
gShellDriver1HiiHandle,
|
||||
Status);
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
}
|
||||
@@ -963,15 +963,15 @@ PreHiiDrvCfg (
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_VALID),
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_VALID),
|
||||
gShellDriver1HiiHandle);
|
||||
} else {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_INV),
|
||||
gShellDriver1HiiHandle,
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_INV),
|
||||
gShellDriver1HiiHandle,
|
||||
Status);
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
}
|
||||
@@ -1004,7 +1004,7 @@ PreHiiDrvCfg (
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_SET),
|
||||
STRING_TOKEN (STR_DRVCFG_OPTIONS_SET),
|
||||
gShellDriver1HiiHandle);
|
||||
|
||||
ShellCmdDriverConfigurationProcessActionRequired (
|
||||
@@ -1019,8 +1019,8 @@ PreHiiDrvCfg (
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_NOT_SET),
|
||||
gShellDriver1HiiHandle,
|
||||
STRING_TOKEN (STR_DRVCFG_NOT_SET),
|
||||
gShellDriver1HiiHandle,
|
||||
Status);
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
}
|
||||
@@ -1081,11 +1081,11 @@ PrintConfigInfoOnAll(
|
||||
Found = TRUE;
|
||||
Index2 = *CurrentHandle == NULL ? 0 : ConvertHandleToHandleIndex(*CurrentHandle);
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_LINE_HII),
|
||||
gShellDriver1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_LINE_HII),
|
||||
gShellDriver1HiiHandle,
|
||||
Index2
|
||||
);
|
||||
}
|
||||
@@ -1203,7 +1203,7 @@ ShellCommandRunDrvCfg (
|
||||
ASSERT(FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (ShellStatus == SHELL_SUCCESS) {
|
||||
if (ShellCommandLineGetCount(Package) > 4) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"drvcfg");
|
||||
@@ -1236,24 +1236,24 @@ ShellCommandRunDrvCfg (
|
||||
}
|
||||
|
||||
if (InFromFile && EFI_ERROR(ShellFileExists(FileName))) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FIND_FAIL), gShellDriver1HiiHandle, L"drvcfg", FileName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
if (OutToFile && !EFI_ERROR(ShellFileExists(FileName))) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_EXIST), gShellDriver1HiiHandle, L"drvcfg", FileName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
if (Force && ForceTypeString == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"drvcfg", L"-f");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FIND_FAIL), gShellDriver1HiiHandle, L"drvcfg", FileName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
}
|
||||
if (OutToFile && !EFI_ERROR(ShellFileExists(FileName))) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_EXIST), gShellDriver1HiiHandle, L"drvcfg", FileName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
if (Force && ForceTypeString == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"drvcfg", L"-f");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
if (Force) {
|
||||
Status = ShellConvertStringToUint64(ForceTypeString, &Intermediate, FALSE, FALSE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM_VAL), gShellDriver1HiiHandle, L"drvcfg", ForceTypeString, L"-f");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM_VAL), gShellDriver1HiiHandle, L"drvcfg", ForceTypeString, L"-f");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@@ -1266,7 +1266,7 @@ ShellCommandRunDrvCfg (
|
||||
if (HandleIndex1 != NULL && !EFI_ERROR(ShellConvertStringToUint64(HandleIndex1, &Intermediate, TRUE, FALSE))) {
|
||||
Handle1 = ConvertHandleIndexToHandle((UINTN)Intermediate);
|
||||
if (Handle1 == NULL || (UINT64)(UINTN)Intermediate != Intermediate) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"drvcfg", HandleIndex1);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"drvcfg", HandleIndex1);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@@ -1276,7 +1276,7 @@ ShellCommandRunDrvCfg (
|
||||
if (HandleIndex2 != NULL && !EFI_ERROR(ShellConvertStringToUint64(HandleIndex2, &Intermediate, TRUE, FALSE))) {
|
||||
Handle2 = ConvertHandleIndexToHandle((UINTN)Intermediate);
|
||||
if (Handle2 == NULL || (UINT64)(UINTN)Intermediate != Intermediate) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"drvcfg", HandleIndex2);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"drvcfg", HandleIndex2);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@@ -1286,7 +1286,7 @@ ShellCommandRunDrvCfg (
|
||||
if (HandleIndex3 != NULL && !EFI_ERROR(ShellConvertStringToUint64(HandleIndex3, &Intermediate, TRUE, FALSE))) {
|
||||
Handle3 = ConvertHandleIndexToHandle((UINTN)Intermediate);
|
||||
if (Handle3 == NULL || (UINT64)(UINTN)Intermediate != Intermediate) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"drvcfg", HandleIndex3);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"drvcfg", HandleIndex3);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@@ -1294,42 +1294,42 @@ ShellCommandRunDrvCfg (
|
||||
|
||||
if ((InFromFile || OutToFile) && (FileName == NULL)) {
|
||||
if (FileName == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"drvcfg", InFromFile?L"-i":L"-o");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"drvcfg", InFromFile?L"-i":L"-o");
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_HANDLE_REQ), gShellDriver1HiiHandle, L"drvcfg");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_HANDLE_REQ), gShellDriver1HiiHandle, L"drvcfg");
|
||||
}
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
if (!UseHii && (InFromFile || OutToFile)) {
|
||||
if (InFromFile) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDriver1HiiHandle, L"drvcfg", L"-i");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDriver1HiiHandle, L"drvcfg", L"-i");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
}
|
||||
if (OutToFile) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDriver1HiiHandle, L"drvcfg", L"-o");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellDriver1HiiHandle, L"drvcfg", L"-o");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
}
|
||||
if (Validate && Force) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDriver1HiiHandle, L"drvcfg", L"-v", L"-f");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDriver1HiiHandle, L"drvcfg", L"-v", L"-f");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
}
|
||||
if (Validate && Set) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDriver1HiiHandle, L"drvcfg", L"-v", L"-s");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDriver1HiiHandle, L"drvcfg", L"-v", L"-s");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
}
|
||||
if (Set && Force) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDriver1HiiHandle, L"drvcfg", L"-s", L"-f");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDriver1HiiHandle, L"drvcfg", L"-s", L"-f");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
if (OutToFile && InFromFile) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDriver1HiiHandle, L"drvcfg", L"-i", L"-o");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CONFLICT), gShellDriver1HiiHandle, L"drvcfg", L"-i", L"-o");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
goto Done;
|
||||
}
|
||||
@@ -1365,11 +1365,11 @@ ShellCommandRunDrvCfg (
|
||||
} else {
|
||||
if (!EFI_ERROR(gBS->OpenProtocol(Handle1, &gEfiHiiConfigAccessProtocolGuid, NULL, gImageHandle, NULL, EFI_OPEN_PROTOCOL_TEST_PROTOCOL))) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_LINE_HII),
|
||||
gShellDriver1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_LINE_HII),
|
||||
gShellDriver1HiiHandle,
|
||||
ConvertHandleToHandleIndex(Handle1)
|
||||
);
|
||||
goto Done;
|
||||
@@ -1399,7 +1399,7 @@ ShellCommandRunDrvCfg (
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_DRVCFG_NOT_SUPPORT),
|
||||
gShellDriver1HiiHandle,
|
||||
gShellDriver1HiiHandle,
|
||||
ConvertHandleToHandleIndex(Handle1)
|
||||
);
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for DrvDiag shell Driver1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 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
|
||||
@@ -101,10 +101,10 @@ DoDiagnostics (
|
||||
} else {
|
||||
DriverHandleList = GetHandleListByProtocolList(DiagGuidList);
|
||||
if (DriverHandleList == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROTOCOL_NF), gShellDriver1HiiHandle, L"drvdiag", L"gEfiDriverDiagnosticsProtocolGuid", &gEfiDriverDiagnosticsProtocolGuid);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROTOCOL_NF), gShellDriver1HiiHandle, L"drvdiag", L"gEfiDriverDiagnostics2ProtocolGuid", &gEfiDriverDiagnostics2ProtocolGuid);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROTOCOL_NF), gShellDriver1HiiHandle, L"drvdiag", L"gEfiDriverDiagnosticsProtocolGuid", &gEfiDriverDiagnosticsProtocolGuid);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROTOCOL_NF), gShellDriver1HiiHandle, L"drvdiag", L"gEfiDriverDiagnostics2ProtocolGuid", &gEfiDriverDiagnostics2ProtocolGuid);
|
||||
return (EFI_NOT_FOUND);
|
||||
}
|
||||
}
|
||||
for (Walker = DriverHandleList ; Walker != NULL && *Walker != NULL ; DriverHandleListCount++, Walker++);
|
||||
}
|
||||
|
||||
@@ -150,7 +150,7 @@ DoDiagnostics (
|
||||
}
|
||||
if (ControllerHandle == NULL) {
|
||||
PARSE_HANDLE_DATABASE_DEVICES(DriverHandleList[DriverHandleListLoop], &ControllerHandleListCount, &ControllerHandleList);
|
||||
}
|
||||
}
|
||||
if (ControllerHandleListCount == 0) {
|
||||
if (Mode == TestModeList) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_DRVDIAG_DRIVER_NO_HANDLES), gShellDriver1HiiHandle);
|
||||
@@ -166,7 +166,7 @@ DoDiagnostics (
|
||||
if (AllChilds) {
|
||||
ASSERT(ChildHandleList == NULL);
|
||||
PARSE_HANDLE_DATABASE_MANAGED_CHILDREN(
|
||||
DriverHandleList[DriverHandleListLoop],
|
||||
DriverHandleList[DriverHandleListLoop],
|
||||
ControllerHandleList[ControllerHandleListLoop],
|
||||
&ChildHandleListCount,
|
||||
&ChildHandleList);
|
||||
@@ -202,7 +202,7 @@ DoDiagnostics (
|
||||
&OutBuffer);
|
||||
FreePool(Language);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!Found && (Lang == NULL||(Lang!=NULL&&(Lang[2]!='-')))){
|
||||
Status = gBS->OpenProtocol(
|
||||
DriverHandleList[DriverHandleListLoop],
|
||||
@@ -357,7 +357,7 @@ ShellCommandRunDrvDiag (
|
||||
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), gShellDriver1HiiHandle, L"drvdiag", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"drvdiag", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -375,7 +375,7 @@ ShellCommandRunDrvDiag (
|
||||
//
|
||||
// error for too many parameters
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"drvdiag");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"drvdiag");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if ((ShellCommandLineGetFlag(Package, L"-s"))
|
||||
|| (ShellCommandLineGetFlag(Package, L"-e"))
|
||||
@@ -403,7 +403,7 @@ ShellCommandRunDrvDiag (
|
||||
Lang = ShellCommandLineGetValue(Package, L"-l");
|
||||
if (ShellCommandLineGetFlag(Package, L"-l") && Lang == NULL) {
|
||||
ASSERT(Language == NULL);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"drvdiag", L"-l");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellDriver1HiiHandle, L"drvdiag", L"-l");
|
||||
ShellCommandLineFreeVarList (Package);
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
} else if (Lang != NULL) {
|
||||
@@ -438,8 +438,8 @@ ShellCommandRunDrvDiag (
|
||||
Mode,
|
||||
Language,
|
||||
ShellCommandLineGetFlag(Package, L"-c"),
|
||||
Handle1,
|
||||
Handle2,
|
||||
Handle1,
|
||||
Handle2,
|
||||
Handle3
|
||||
);
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for OpenInfo shell Driver1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 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
|
||||
@@ -126,7 +126,7 @@ TraverseHandleDatabase (
|
||||
OpenInfo[OpenInfoIndex].OpenCount,
|
||||
OpenTypeString,
|
||||
Name
|
||||
);
|
||||
);
|
||||
}
|
||||
}
|
||||
FreePool (OpenInfo);
|
||||
@@ -176,7 +176,7 @@ ShellCommandRunOpenInfo (
|
||||
Status = ShellCommandLineParse (EmptyParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"openinfo", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle, L"openinfo", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -187,16 +187,16 @@ ShellCommandRunOpenInfo (
|
||||
//
|
||||
// error for too many parameters
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"openinfo");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"openinfo");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) == 0) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDriver1HiiHandle, L"openinfo");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDriver1HiiHandle, L"openinfo");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Param1 = ShellCommandLineGetRawValue(Package, 1);
|
||||
Status = ShellConvertStringToUint64(Param1, &Intermediate, TRUE, FALSE);
|
||||
if (EFI_ERROR(Status) || Param1 == NULL || ConvertHandleIndexToHandle((UINTN)Intermediate) == NULL){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"openinfo", Param1);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"openinfo", Param1);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
TheHandle = ConvertHandleIndexToHandle((UINTN)Intermediate);
|
||||
@@ -206,7 +206,7 @@ ShellCommandRunOpenInfo (
|
||||
Status = TraverseHandleDatabase (TheHandle);
|
||||
if (!EFI_ERROR(Status)) {
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"openinfo", Param1);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"openinfo", Param1);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
|
@@ -1,9 +1,9 @@
|
||||
/** @file
|
||||
Main file for Reconnect shell Driver1 function.
|
||||
|
||||
Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<BR>
|
||||
(C) Copyright 2015 Hewlett Packard Enterprise Development LP<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
|
||||
@@ -29,11 +29,11 @@ VOID
|
||||
ConnectAllConsoles (
|
||||
VOID
|
||||
)
|
||||
{
|
||||
{
|
||||
ShellConnectFromDevPaths(L"ConInDev");
|
||||
ShellConnectFromDevPaths(L"ConOutDev");
|
||||
ShellConnectFromDevPaths(L"ErrOutDev");
|
||||
|
||||
|
||||
ShellConnectFromDevPaths(L"ErrOut");
|
||||
ShellConnectFromDevPaths(L"ConIn");
|
||||
ShellConnectFromDevPaths(L"ConOut");
|
||||
@@ -60,7 +60,7 @@ ShellCommandRunReconnect (
|
||||
|
||||
gInReconnect = TRUE;
|
||||
ShellStatus = SHELL_SUCCESS;
|
||||
|
||||
|
||||
//
|
||||
// initialize the shell lib (we must be in non-auto-init...)
|
||||
//
|
||||
@@ -90,7 +90,7 @@ ShellCommandRunReconnect (
|
||||
}
|
||||
ShellStatus = ShellCommandRunConnect(ImageHandle, SystemTable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
gInReconnect = FALSE;
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
//
|
||||
// (C) Copyright 2016-2017 Hewlett Packard Enterprise Development LP<BR>
|
||||
// (C) Copyright 2012-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
// Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
// Copyright (c) 2010 - 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
|
||||
@@ -469,7 +469,7 @@
|
||||
" CTRL - The handle number of the UEFI device\r\n"
|
||||
" TYPE - The device type:\r\n"
|
||||
" [R] - Root Controller\r\n"
|
||||
" [B] - Bus Controller\r\n"
|
||||
" [B] - Bus Controller\r\n"
|
||||
" [D] - Device Controller\r\n"
|
||||
" CFG - A managing driver supports the Driver Configuration\r\n"
|
||||
" Protocol. Yes if 'Y' or 'X'; No if 'N' or '-'.\r\n"
|
||||
@@ -522,7 +522,7 @@
|
||||
" 6. If only a single handle is specified and the handle has an\r\n"
|
||||
" EFI_DRIVER_BINDING_PROTOCOL on it, then the handle is assumed to be a\r\n"
|
||||
" driver handle. Otherwise, it is assumed to be a device handle.\r\n"
|
||||
" 7. If no parameters are specified, then the command will attempt to bind\r\n"
|
||||
" 7. If no parameters are specified, then the command will attempt to bind\r\n"
|
||||
" all proper drivers to all devices without recursion. Each connection\r\n"
|
||||
" status will be displayed.\r\n"
|
||||
" 8. Output redirection is not supported for 'connect -r' usage.\r\n"
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for Unload shell Driver1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2010 - 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
|
||||
@@ -31,11 +31,11 @@ DumpLoadedImageProtocolInfo (
|
||||
CHAR16 *TheString;
|
||||
|
||||
TheString = GetProtocolInformationDump(TheHandle, &gEfiLoadedImageProtocolGuid, TRUE);
|
||||
|
||||
|
||||
ShellPrintEx(-1, -1, L"%s", TheString);
|
||||
|
||||
SHELL_FREE_NON_NULL(TheString);
|
||||
|
||||
|
||||
return (EFI_SUCCESS);
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ ShellCommandRunUnload (
|
||||
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), gShellDriver1HiiHandle,L"unload", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellDriver1HiiHandle,L"unload", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -97,10 +97,10 @@ ShellCommandRunUnload (
|
||||
//
|
||||
// error for too many parameters
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"unload");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellDriver1HiiHandle, L"unload");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetCount(Package) < 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDriver1HiiHandle, L"unload");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDriver1HiiHandle, L"unload");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Param1 = ShellCommandLineGetRawValue(Package, 1);
|
||||
@@ -110,14 +110,14 @@ ShellCommandRunUnload (
|
||||
}
|
||||
|
||||
if (EFI_ERROR(Status) || Param1 == NULL || TheHandle == NULL){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"unload", Param1);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_INV_HANDLE), gShellDriver1HiiHandle, L"unload", Param1);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
ASSERT(TheHandle != NULL);
|
||||
if (ShellCommandLineGetFlag(Package, L"-v") || ShellCommandLineGetFlag(Package, L"-verbose")) {
|
||||
DumpLoadedImageProtocolInfo(TheHandle);
|
||||
}
|
||||
|
||||
|
||||
if (!ShellCommandLineGetFlag(Package, L"-n")) {
|
||||
Status = ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN(STR_UNLOAD_CONF), gShellDriver1HiiHandle, (UINTN)TheHandle);
|
||||
Status = ShellPromptForResponse(ShellPromptResponseTypeYesNo, NULL, (VOID**)&Resp);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# Provides shell install1 functions
|
||||
#
|
||||
# Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved. <BR>
|
||||
# Copyright (c) 2010 - 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
|
||||
@@ -48,4 +48,4 @@
|
||||
gEfiShellPkgTokenSpaceGuid.PcdShellProfileMask ## CONSUMES
|
||||
|
||||
[Guids]
|
||||
gShellInstall1HiiGuid ## UNDEFINED
|
||||
gShellInstall1HiiGuid ## UNDEFINED
|
||||
|
@@ -89,13 +89,13 @@ ShellCommandRunEndFor (
|
||||
if (!Found) {
|
||||
CurrentScriptFile = ShellCommandGetCurrentScriptFile();
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"For",
|
||||
L"EndFor",
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"For",
|
||||
L"EndFor",
|
||||
CurrentScriptFile!=NULL
|
||||
&& CurrentScriptFile->CurrentCommand!=NULL
|
||||
? CurrentScriptFile->CurrentCommand->Line:0);
|
||||
@@ -339,13 +339,13 @@ ShellCommandRunFor (
|
||||
//
|
||||
if (!MoveToTag(GetNextNode, L"endfor", L"for", NULL, CurrentScriptFile, TRUE, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"EndFor",
|
||||
L"For",
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"EndFor",
|
||||
L"For",
|
||||
CurrentScriptFile->CurrentCommand->Line);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
@@ -467,12 +467,12 @@ ShellCommandRunFor (
|
||||
ArgSetWalker = ArgSet;
|
||||
if (ArgSetWalker[0] != L'(') {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
ArgSet,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
ArgSet,
|
||||
CurrentScriptFile->CurrentCommand->Line);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -490,11 +490,11 @@ ShellCommandRunFor (
|
||||
}
|
||||
if (TempSpot == NULL) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
CurrentScriptFile->CurrentCommand->Line);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -505,12 +505,12 @@ ShellCommandRunFor (
|
||||
}
|
||||
if (!ShellIsValidForNumber(ArgSetWalker)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
ArgSet,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
ArgSet,
|
||||
CurrentScriptFile->CurrentCommand->Line);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -525,12 +525,12 @@ ShellCommandRunFor (
|
||||
}
|
||||
if (ArgSetWalker == NULL || *ArgSetWalker == CHAR_NULL || !ShellIsValidForNumber(ArgSetWalker)){
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
ArgSet,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
ArgSet,
|
||||
CurrentScriptFile->CurrentCommand->Line);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -552,12 +552,12 @@ ShellCommandRunFor (
|
||||
if (ArgSetWalker != NULL && *ArgSetWalker != CHAR_NULL) {
|
||||
if (ArgSetWalker == NULL || *ArgSetWalker == CHAR_NULL || !ShellIsValidForNumber(ArgSetWalker)){
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
ArgSet,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
ArgSet,
|
||||
CurrentScriptFile->CurrentCommand->Line);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -572,18 +572,18 @@ ShellCommandRunFor (
|
||||
|
||||
if (StrStr(ArgSetWalker, L" ") != NULL) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
ArgSet,
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
ArgSet,
|
||||
CurrentScriptFile->CurrentCommand->Line);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -602,13 +602,13 @@ ShellCommandRunFor (
|
||||
}
|
||||
} else {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
ArgSet,
|
||||
CurrentScriptFile!=NULL
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT),
|
||||
gShellLevel1HiiHandle,
|
||||
ArgSet,
|
||||
CurrentScriptFile!=NULL
|
||||
&& CurrentScriptFile->CurrentCommand!=NULL
|
||||
? CurrentScriptFile->CurrentCommand->Line:0);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
@@ -659,14 +659,14 @@ ShellCommandRunFor (
|
||||
//
|
||||
if (!MoveToTag(GetNextNode, L"endfor", L"for", NULL, CurrentScriptFile, TRUE, FALSE, FALSE)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"EndFor",
|
||||
L"For",
|
||||
CurrentScriptFile!=NULL
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"EndFor",
|
||||
L"For",
|
||||
CurrentScriptFile!=NULL
|
||||
&& CurrentScriptFile->CurrentCommand!=NULL
|
||||
? CurrentScriptFile->CurrentCommand->Line:0);
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
@@ -721,14 +721,14 @@ ShellCommandRunFor (
|
||||
//
|
||||
if (!MoveToTag(GetNextNode, L"endfor", L"for", NULL, CurrentScriptFile, TRUE, FALSE, FALSE)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"EndFor",
|
||||
L"For",
|
||||
CurrentScriptFile!=NULL
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"EndFor",
|
||||
L"For",
|
||||
CurrentScriptFile!=NULL
|
||||
&& CurrentScriptFile->CurrentCommand!=NULL
|
||||
? CurrentScriptFile->CurrentCommand->Line:0);
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for goto shell level 1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2010, 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
|
||||
@@ -83,14 +83,14 @@ ShellCommandRunGoto (
|
||||
if (!MoveToTag(GetNextNode, L"endfor", L"for", CompareString, ShellCommandGetCurrentScriptFile(), FALSE, FALSE, TRUE)) {
|
||||
CurrentScriptFile = ShellCommandGetCurrentScriptFile();
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
CompareString,
|
||||
L"Goto",
|
||||
CurrentScriptFile!=NULL
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
CompareString,
|
||||
L"Goto",
|
||||
CurrentScriptFile!=NULL
|
||||
&& CurrentScriptFile->CurrentCommand!=NULL
|
||||
? CurrentScriptFile->CurrentCommand->Line:0);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for If and else shell level 1 function.
|
||||
|
||||
(C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
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
|
||||
@@ -335,7 +335,7 @@ TestOperation (
|
||||
/**
|
||||
Process an if statement and determine if its is valid or not.
|
||||
|
||||
@param[in, out] PassingState Opon entry, the current state. Upon exit,
|
||||
@param[in, out] PassingState Opon entry, the current state. Upon exit,
|
||||
the new state.
|
||||
@param[in] StartParameterNumber The number of the first parameter of
|
||||
this statement.
|
||||
@@ -346,7 +346,7 @@ TestOperation (
|
||||
@param[in] ForceStringCompare TRUE for all string based, FALSE otherwise.
|
||||
|
||||
@retval EFI_INVALID_PARAMETER A parameter was invalid.
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
**/
|
||||
EFI_STATUS
|
||||
ProcessStatement (
|
||||
@@ -649,9 +649,9 @@ ProcessStatement (
|
||||
Break up the next part of the if statement (until the next 'and', 'or', or 'then').
|
||||
|
||||
@param[in] ParameterNumber The current parameter number.
|
||||
@param[out] EndParameter Upon successful return, will point to the
|
||||
@param[out] EndParameter Upon successful return, will point to the
|
||||
parameter to start the next iteration with.
|
||||
@param[out] EndTag Upon successful return, will point to the
|
||||
@param[out] EndTag Upon successful return, will point to the
|
||||
type that was found at the end of this statement.
|
||||
|
||||
@retval TRUE A valid statement was found.
|
||||
@@ -837,12 +837,12 @@ ShellCommandRunIf (
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
if (!gEfiShellProtocol->BatchIsActive()) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_NO_SCRIPT), gShellLevel1HiiHandle, L"if");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_NO_SCRIPT), gShellLevel1HiiHandle, L"if");
|
||||
return (SHELL_UNSUPPORTED);
|
||||
}
|
||||
|
||||
if (gEfiShellParametersProtocol->Argc < 3) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel1HiiHandle, L"if");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel1HiiHandle, L"if");
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
|
||||
@@ -852,14 +852,14 @@ ShellCommandRunIf (
|
||||
CurrentScriptFile = ShellCommandGetCurrentScriptFile();
|
||||
if (!MoveToTag(GetNextNode, L"endif", L"if", NULL, CurrentScriptFile, TRUE, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"EndIf",
|
||||
L"If",
|
||||
CurrentScriptFile!=NULL
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"EndIf",
|
||||
L"If",
|
||||
CurrentScriptFile!=NULL
|
||||
&& CurrentScriptFile->CurrentCommand!=NULL
|
||||
? CurrentScriptFile->CurrentCommand->Line:0);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
@@ -920,12 +920,12 @@ ShellCommandRunIf (
|
||||
// we are at the then
|
||||
//
|
||||
if (CurrentParameter+1 != gEfiShellParametersProtocol->Argc) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_TEXT_AFTER_THEN), gShellLevel1HiiHandle, L"if");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_TEXT_AFTER_THEN), gShellLevel1HiiHandle, L"if");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = PerformResultOperation(CurrentValue);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SYNTAX_AFTER_BAD), gShellLevel1HiiHandle, L"if", gEfiShellParametersProtocol->Argv[CurrentParameter]);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SYNTAX_AFTER_BAD), gShellLevel1HiiHandle, L"if", gEfiShellParametersProtocol->Argv[CurrentParameter]);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
@@ -937,14 +937,14 @@ ShellCommandRunIf (
|
||||
if (!BuildNextStatement(CurrentParameter, &EndParameter, &Ending)) {
|
||||
CurrentScriptFile = ShellCommandGetCurrentScriptFile();
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"Then",
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"Then",
|
||||
L"If",
|
||||
CurrentScriptFile!=NULL
|
||||
CurrentScriptFile!=NULL
|
||||
&& CurrentScriptFile->CurrentCommand!=NULL
|
||||
? CurrentScriptFile->CurrentCommand->Line:0);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
@@ -963,7 +963,7 @@ ShellCommandRunIf (
|
||||
if ((Ending == EndTagOr && CurrentValue) || (Ending == EndTagAnd && !CurrentValue)) {
|
||||
Status = PerformResultOperation(CurrentValue);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SYNTAX_AFTER_BAD), gShellLevel1HiiHandle, L"if", gEfiShellParametersProtocol->Argv[CurrentParameter]);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SYNTAX_AFTER_BAD), gShellLevel1HiiHandle, L"if", gEfiShellParametersProtocol->Argv[CurrentParameter]);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
break;
|
||||
@@ -1004,7 +1004,7 @@ ShellCommandRunElse (
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
if (gEfiShellParametersProtocol->Argc > 1) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel1HiiHandle, L"if");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel1HiiHandle, L"if");
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
|
||||
@@ -1017,28 +1017,28 @@ ShellCommandRunElse (
|
||||
|
||||
if (!MoveToTag(GetPreviousNode, L"if", L"endif", NULL, CurrentScriptFile, FALSE, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"If",
|
||||
L"Else",
|
||||
CurrentScriptFile!=NULL
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"If",
|
||||
L"Else",
|
||||
CurrentScriptFile!=NULL
|
||||
&& CurrentScriptFile->CurrentCommand!=NULL
|
||||
? CurrentScriptFile->CurrentCommand->Line:0);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
if (!MoveToTag(GetPreviousNode, L"if", L"else", NULL, CurrentScriptFile, FALSE, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"If",
|
||||
L"Else",
|
||||
CurrentScriptFile!=NULL
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"If",
|
||||
L"Else",
|
||||
CurrentScriptFile!=NULL
|
||||
&& CurrentScriptFile->CurrentCommand!=NULL
|
||||
? CurrentScriptFile->CurrentCommand->Line:0);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
@@ -1046,14 +1046,14 @@ ShellCommandRunElse (
|
||||
|
||||
if (!MoveToTag(GetNextNode, L"endif", L"if", NULL, CurrentScriptFile, FALSE, FALSE, FALSE)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"EndIf",
|
||||
"Else",
|
||||
CurrentScriptFile!=NULL
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"EndIf",
|
||||
"Else",
|
||||
CurrentScriptFile!=NULL
|
||||
&& CurrentScriptFile->CurrentCommand!=NULL
|
||||
? CurrentScriptFile->CurrentCommand->Line:0);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
@@ -1082,7 +1082,7 @@ ShellCommandRunEndIf (
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
if (gEfiShellParametersProtocol->Argc > 1) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel1HiiHandle, L"if");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel1HiiHandle, L"if");
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
|
||||
@@ -1094,14 +1094,14 @@ ShellCommandRunEndIf (
|
||||
CurrentScriptFile = ShellCommandGetCurrentScriptFile();
|
||||
if (!MoveToTag(GetPreviousNode, L"if", L"endif", NULL, CurrentScriptFile, FALSE, TRUE, FALSE)) {
|
||||
ShellPrintHiiEx(
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"If",
|
||||
L"EndIf",
|
||||
CurrentScriptFile!=NULL
|
||||
-1,
|
||||
-1,
|
||||
NULL,
|
||||
STRING_TOKEN (STR_SYNTAX_NO_MATCHING),
|
||||
gShellLevel1HiiHandle,
|
||||
L"If",
|
||||
L"EndIf",
|
||||
CurrentScriptFile!=NULL
|
||||
&& CurrentScriptFile->CurrentCommand!=NULL
|
||||
? CurrentScriptFile->CurrentCommand->Line:0);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for Shift shell level 1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2010, 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
|
||||
@@ -36,7 +36,7 @@ ShellCommandRunShift (
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
if (!gEfiShellProtocol->BatchIsActive()) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_NO_SCRIPT), gShellLevel1HiiHandle, L"shift");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_NO_SCRIPT), gShellLevel1HiiHandle, L"shift");
|
||||
return (SHELL_UNSUPPORTED);
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ ShellCommandRunShift (
|
||||
ASSERT(CurrentScriptFile != NULL);
|
||||
|
||||
if (CurrentScriptFile->Argc < 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel1HiiHandle, L"shift");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel1HiiHandle, L"shift");
|
||||
return (SHELL_UNSUPPORTED);
|
||||
}
|
||||
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for stall shell level 1 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2011, 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
|
||||
@@ -51,7 +51,7 @@ ShellCommandRunStall (
|
||||
Status = ShellCommandLineParse (EmptyParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel1HiiHandle, L"stall", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel1HiiHandle, L"stall", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -59,20 +59,20 @@ ShellCommandRunStall (
|
||||
}
|
||||
} else {
|
||||
if (ShellCommandLineGetRawValue(Package, 2) != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel1HiiHandle, L"stall");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel1HiiHandle, L"stall");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetRawValue(Package, 1) == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel1HiiHandle, L"stall");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel1HiiHandle, L"stall");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ShellConvertStringToUint64(ShellCommandLineGetRawValue(Package, 1), &Intermediate, FALSE, FALSE);
|
||||
if (EFI_ERROR(Status) || ((UINT64)(UINTN)(Intermediate)) != Intermediate) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel1HiiHandle, L"stall", ShellCommandLineGetRawValue(Package, 1));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel1HiiHandle, L"stall", ShellCommandLineGetRawValue(Package, 1));
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = gBS->Stall((UINTN)Intermediate);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_STALL_FAILED), gShellLevel1HiiHandle, L"stall");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_STALL_FAILED), gShellLevel1HiiHandle, L"stall");
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for NULL named library for level 1 shell command functions.
|
||||
|
||||
(C) Copyright 2013 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2011, 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
|
||||
@@ -103,18 +103,18 @@ ShellLevel1CommandsLibDestructor (
|
||||
It functions so that count starts at 1 and it increases or decreases when it
|
||||
hits the specified tags. when it hits zero the location has been found.
|
||||
|
||||
DecrementerTag and IncrementerTag are used to get around for/endfor and
|
||||
DecrementerTag and IncrementerTag are used to get around for/endfor and
|
||||
similar paired types where the entire middle should be ignored.
|
||||
|
||||
If label is used it will be used instead of the count.
|
||||
|
||||
@param[in] Function The function to use to enumerate through the
|
||||
@param[in] Function The function to use to enumerate through the
|
||||
list. Normally GetNextNode or GetPreviousNode.
|
||||
@param[in] DecrementerTag The tag to decrement the count at.
|
||||
@param[in] IncrementerTag The tag to increment the count at.
|
||||
@param[in] Label A label to look for.
|
||||
@param[in, out] ScriptFile The pointer to the current script file structure.
|
||||
@param[in] MovePast TRUE makes function return 1 past the found
|
||||
@param[in] MovePast TRUE makes function return 1 past the found
|
||||
location.
|
||||
@param[in] FindOnly TRUE to not change the ScriptFile.
|
||||
@param[in] CommandNode The pointer to the Node to test.
|
||||
@@ -227,21 +227,21 @@ TestNodeForMove (
|
||||
It functions so that count starts at 1 and it increases or decreases when it
|
||||
hits the specified tags. when it hits zero the location has been found.
|
||||
|
||||
DecrementerTag and IncrementerTag are used to get around for/endfor and
|
||||
DecrementerTag and IncrementerTag are used to get around for/endfor and
|
||||
similar paired types where the entire middle should be ignored.
|
||||
|
||||
If label is used it will be used instead of the count.
|
||||
|
||||
@param[in] Function The function to use to enumerate through the
|
||||
@param[in] Function The function to use to enumerate through the
|
||||
list. Normally GetNextNode or GetPreviousNode.
|
||||
@param[in] DecrementerTag The tag to decrement the count at.
|
||||
@param[in] IncrementerTag The tag to increment the count at.
|
||||
@param[in] Label A label to look for.
|
||||
@param[in, out] ScriptFile The pointer to the current script file structure.
|
||||
@param[in] MovePast TRUE makes function return 1 past the found
|
||||
@param[in] MovePast TRUE makes function return 1 past the found
|
||||
location.
|
||||
@param[in] FindOnly TRUE to not change the ScriptFile.
|
||||
@param[in] WrapAroundScript TRUE to wrap end-to-begining or vise versa in
|
||||
@param[in] WrapAroundScript TRUE to wrap end-to-begining or vise versa in
|
||||
searching.
|
||||
**/
|
||||
BOOLEAN
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Main file for NULL named library for level 1 shell command 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
|
||||
@@ -176,21 +176,21 @@ LIST_ENTRY *
|
||||
It functions so that count starts at 1 and it increases or decreases when it
|
||||
hits the specified tags. when it hits zero the location has been found.
|
||||
|
||||
DecrementerTag and IncrementerTag are used to get around for/endfor and
|
||||
DecrementerTag and IncrementerTag are used to get around for/endfor and
|
||||
similar paired types where the entire middle should be ignored.
|
||||
|
||||
If label is used it will be used instead of the count.
|
||||
|
||||
@param[in] Function The function to use to enumerate through the
|
||||
@param[in] Function The function to use to enumerate through the
|
||||
list. Normally GetNextNode or GetPreviousNode.
|
||||
@param[in] DecrementerTag The tag to decrement the count at.
|
||||
@param[in] IncrementerTag The tag to increment the count at.
|
||||
@param[in] Label A label to look for.
|
||||
@param[in, out] ScriptFile The pointer to the current script file structure.
|
||||
@param[in] MovePast TRUE makes function return 1 past the found
|
||||
@param[in] MovePast TRUE makes function return 1 past the found
|
||||
location.
|
||||
@param[in] FindOnly TRUE to not change the ScriptFile.
|
||||
@param[in] WrapAroundScript TRUE to wrap end-to-begining or vise versa in
|
||||
@param[in] WrapAroundScript TRUE to wrap end-to-begining or vise versa in
|
||||
searching.
|
||||
**/
|
||||
BOOLEAN
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for attrib shell level 2 function.
|
||||
|
||||
(C) Copyright 2014-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2010, 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
|
||||
@@ -70,7 +70,7 @@ ShellCommandRunAttrib (
|
||||
Status = ShellCommandLineParse (AttribParamList, &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"attrib", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel2HiiHandle, L"attrib", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -133,7 +133,7 @@ ShellCommandRunAttrib (
|
||||
ASSERT(ListOfFiles == NULL);
|
||||
Status = ShellOpenFileMetaArg((CHAR16*)FileName, EFI_FILE_MODE_READ, &ListOfFiles);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel2HiiHandle, L"attrib", ShellCommandLineGetRawValue(Package, ParamNumberCount));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel2HiiHandle, L"attrib", ShellCommandLineGetRawValue(Package, ParamNumberCount));
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
} else {
|
||||
for (FileNode = (EFI_SHELL_FILE_INFO*)GetFirstNode(&ListOfFiles->Link)
|
||||
@@ -153,7 +153,7 @@ ShellCommandRunAttrib (
|
||||
FileNode->Info->Attribute&EFI_FILE_READ_ONLY? L'R':L' ',
|
||||
FileNode->FileName
|
||||
);
|
||||
|
||||
|
||||
if (ShellGetExecutionBreakFlag()) {
|
||||
ShellStatus = SHELL_ABORTED;
|
||||
break;
|
||||
@@ -162,7 +162,7 @@ ShellCommandRunAttrib (
|
||||
Status = ShellCloseFileMetaArg(&ListOfFiles);
|
||||
ListOfFiles = NULL;
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_CLOSE_FAIL), gShellLevel2HiiHandle, L"attrib", ShellCommandLineGetRawValue(Package, ParamNumberCount));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_CLOSE_FAIL), gShellLevel2HiiHandle, L"attrib", ShellCommandLineGetRawValue(Package, ParamNumberCount));
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
}
|
||||
} // for loop for handling wildcard filenames
|
||||
@@ -171,7 +171,7 @@ ShellCommandRunAttrib (
|
||||
//
|
||||
// fail as we have conflcting params.
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CON), gShellLevel2HiiHandle, L"attrib");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CON), gShellLevel2HiiHandle, L"attrib");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@@ -188,7 +188,7 @@ ShellCommandRunAttrib (
|
||||
// make sure we are not failing on the first one we do... if yes that's an error...
|
||||
//
|
||||
if (ParamNumberCount == 1) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel2HiiHandle, L"attrib");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel2HiiHandle, L"attrib");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
break;
|
||||
@@ -205,7 +205,7 @@ ShellCommandRunAttrib (
|
||||
ASSERT(ListOfFiles == NULL);
|
||||
Status = ShellOpenFileMetaArg((CHAR16*)FileName, EFI_FILE_MODE_READ, &ListOfFiles);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel2HiiHandle, L"attrib", ShellCommandLineGetRawValue(Package, ParamNumberCount));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel2HiiHandle, L"attrib", ShellCommandLineGetRawValue(Package, ParamNumberCount));
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
} else {
|
||||
for (FileNode = (EFI_SHELL_FILE_INFO*)GetFirstNode(&ListOfFiles->Link)
|
||||
@@ -231,7 +231,7 @@ ShellCommandRunAttrib (
|
||||
//
|
||||
Status = ShellSetFileInfo(FileNode->Handle, FileInfo);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_AD), gShellLevel2HiiHandle, L"attrib", ShellCommandLineGetRawValue(Package, ParamNumberCount));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_AD), gShellLevel2HiiHandle, L"attrib", ShellCommandLineGetRawValue(Package, ParamNumberCount));
|
||||
ShellStatus = SHELL_ACCESS_DENIED;
|
||||
}
|
||||
}
|
||||
@@ -247,7 +247,7 @@ ShellCommandRunAttrib (
|
||||
//
|
||||
Status = ShellSetFileInfo(FileNode->Handle, FileInfo);
|
||||
if (EFI_ERROR(Status)) {;
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_AD), gShellLevel2HiiHandle, L"attrib", ShellCommandLineGetRawValue(Package, ParamNumberCount));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_AD), gShellLevel2HiiHandle, L"attrib", ShellCommandLineGetRawValue(Package, ParamNumberCount));
|
||||
ShellStatus = SHELL_ACCESS_DENIED;
|
||||
}
|
||||
|
||||
@@ -256,7 +256,7 @@ ShellCommandRunAttrib (
|
||||
Status = ShellCloseFileMetaArg(&ListOfFiles);
|
||||
ListOfFiles = NULL;
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_CLOSE_FAIL), gShellLevel2HiiHandle, L"attrib", ShellCommandLineGetRawValue(Package, ParamNumberCount));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_CLOSE_FAIL), gShellLevel2HiiHandle, L"attrib", ShellCommandLineGetRawValue(Package, ParamNumberCount));
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
}
|
||||
} // for loop for handling wildcard filenames
|
||||
|
@@ -217,7 +217,7 @@ ShellCommandRunCd (
|
||||
Status = ShellCommandLineParse (EmptyParamList, &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"cd", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel2HiiHandle, L"cd", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -231,7 +231,7 @@ ShellCommandRunCd (
|
||||
if (ShellCommandLineGetFlag(Package, L"-?")) {
|
||||
ASSERT(FALSE);
|
||||
} else if (ShellCommandLineGetRawValue(Package, 2) != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"cd");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"cd");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
|
@@ -132,7 +132,7 @@ CopySingleFile(
|
||||
if (ShellIsDirectory(Source) == EFI_SUCCESS) {
|
||||
Status = ShellCreateDirectory(Dest, &DestHandle);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_CP_DEST_DIR_FAIL), gShellLevel2HiiHandle, CmdName, Dest);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_CP_DEST_DIR_FAIL), gShellLevel2HiiHandle, CmdName, Dest);
|
||||
return (SHELL_ACCESS_DENIED);
|
||||
}
|
||||
|
||||
@@ -161,7 +161,7 @@ CopySingleFile(
|
||||
//
|
||||
Status = ShellOpenFileByName(Dest, &DestHandle, EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE|EFI_FILE_MODE_CREATE, 0);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_CP_DEST_OPEN_FAIL), gShellLevel2HiiHandle, CmdName, Dest);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_CP_DEST_OPEN_FAIL), gShellLevel2HiiHandle, CmdName, Dest);
|
||||
return (SHELL_ACCESS_DENIED);
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ CopySingleFile(
|
||||
//not enough space on destination directory to copy file
|
||||
//
|
||||
SHELL_FREE_NON_NULL(DestVolumeInfo);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_CPY_FAIL), gShellLevel2HiiHandle, CmdName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_CPY_FAIL), gShellLevel2HiiHandle, CmdName);
|
||||
return(SHELL_VOLUME_FULL);
|
||||
} else {
|
||||
//
|
||||
@@ -237,19 +237,19 @@ CopySingleFile(
|
||||
Status = ShellWriteFile(DestHandle, &ReadSize, Buffer);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellStatus = (SHELL_STATUS) (Status & (~MAX_BIT));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_CPY_WRITE_ERROR), gShellLevel2HiiHandle, CmdName, Dest);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_CPY_WRITE_ERROR), gShellLevel2HiiHandle, CmdName, Dest);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
ShellStatus = (SHELL_STATUS) (Status & (~MAX_BIT));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_CPY_READ_ERROR), gShellLevel2HiiHandle, CmdName, Source);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_CPY_READ_ERROR), gShellLevel2HiiHandle, CmdName, Source);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
SHELL_FREE_NON_NULL(DestVolumeInfo);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// close files
|
||||
//
|
||||
@@ -324,7 +324,7 @@ ValidateAndCopyFiles(
|
||||
ASSERT(FileList != NULL);
|
||||
ASSERT(DestDir != NULL);
|
||||
|
||||
|
||||
|
||||
Status = ShellLevel2StripQuotes (DestDir, &CleanFilePathStr);
|
||||
if (EFI_ERROR (Status)) {
|
||||
if (Status == EFI_OUT_OF_RESOURCES) {
|
||||
@@ -333,7 +333,7 @@ ValidateAndCopyFiles(
|
||||
return SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ASSERT (CleanFilePathStr != NULL);
|
||||
|
||||
//
|
||||
@@ -343,7 +343,7 @@ ValidateAndCopyFiles(
|
||||
//
|
||||
// Error for destination not a directory
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NOT_DIR), gShellLevel2HiiHandle, L"cp", CleanFilePathStr);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NOT_DIR), gShellLevel2HiiHandle, L"cp", CleanFilePathStr);
|
||||
FreePool (CleanFilePathStr);
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
@@ -369,7 +369,7 @@ ValidateAndCopyFiles(
|
||||
// Make sure got -r if required
|
||||
//
|
||||
if (!RecursiveMode && !EFI_ERROR(ShellIsDirectory(Node->FullName))) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_CP_DIR_REQ), gShellLevel2HiiHandle, L"cp");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_CP_DIR_REQ), gShellLevel2HiiHandle, L"cp");
|
||||
FreePool (CleanFilePathStr);
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
@@ -381,7 +381,7 @@ ValidateAndCopyFiles(
|
||||
//
|
||||
// Error for destination not a directory
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NOT_DIR), gShellLevel2HiiHandle, L"cp", CleanFilePathStr);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NOT_DIR), gShellLevel2HiiHandle, L"cp", CleanFilePathStr);
|
||||
FreePool (CleanFilePathStr);
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
@@ -430,7 +430,7 @@ ValidateAndCopyFiles(
|
||||
StrCpyS(DestPath, PathSize / sizeof(CHAR16), Cwd);
|
||||
StrCatS(DestPath, PathSize / sizeof(CHAR16), L"\\");
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_DIR_NF), gShellLevel2HiiHandle, L"cp", CleanFilePathStr);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_DIR_NF), gShellLevel2HiiHandle, L"cp", CleanFilePathStr);
|
||||
FreePool (CleanFilePathStr);
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
@@ -447,7 +447,7 @@ ValidateAndCopyFiles(
|
||||
//
|
||||
// we have multiple files or a directory in the DestDir
|
||||
//
|
||||
|
||||
|
||||
//
|
||||
// Check for leading slash
|
||||
//
|
||||
@@ -459,7 +459,7 @@ ValidateAndCopyFiles(
|
||||
StrCpyS(DestPath, PathSize/sizeof(CHAR16), Cwd);
|
||||
StrCatS(DestPath, PathSize/sizeof(CHAR16), L"\\");
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_DIR_NF), gShellLevel2HiiHandle, L"cp", CleanFilePathStr);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_DIR_NF), gShellLevel2HiiHandle, L"cp", CleanFilePathStr);
|
||||
FreePool(CleanFilePathStr);
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
@@ -471,7 +471,7 @@ ValidateAndCopyFiles(
|
||||
StrCpyS(DestPath, PathSize/sizeof(CHAR16), Cwd);
|
||||
StrCatS(DestPath, PathSize/sizeof(CHAR16), L"\\");
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_DIR_NF), gShellLevel2HiiHandle, L"cp", CleanFilePathStr);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_DIR_NF), gShellLevel2HiiHandle, L"cp", CleanFilePathStr);
|
||||
FreePool(CleanFilePathStr);
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
@@ -498,12 +498,12 @@ ValidateAndCopyFiles(
|
||||
StrCatS(DestPath, PathSize/sizeof(CHAR16), Node->FileName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Make sure the path exists
|
||||
//
|
||||
if (EFI_ERROR(VerifyIntermediateDirectories(DestPath))) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_CP_DIR_WNF), gShellLevel2HiiHandle, L"cp", DestPath);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_CP_DIR_WNF), gShellLevel2HiiHandle, L"cp", DestPath);
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
break;
|
||||
}
|
||||
@@ -512,12 +512,12 @@ ValidateAndCopyFiles(
|
||||
&& !EFI_ERROR(ShellIsDirectory(DestPath))
|
||||
&& StrniCmp(Node->FullName, DestPath, StrLen(DestPath)) == 0
|
||||
){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_CP_SD_PARENT), gShellLevel2HiiHandle, L"cp");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_CP_SD_PARENT), gShellLevel2HiiHandle, L"cp");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
break;
|
||||
}
|
||||
if (StringNoCaseCompare(&Node->FullName, &DestPath) == 0) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_CP_SD_SAME), gShellLevel2HiiHandle, L"cp");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_CP_SD_SAME), gShellLevel2HiiHandle, L"cp");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
break;
|
||||
}
|
||||
@@ -525,7 +525,7 @@ ValidateAndCopyFiles(
|
||||
if ((StrniCmp(Node->FullName, DestPath, StrLen(Node->FullName)) == 0)
|
||||
&& (DestPath[StrLen(Node->FullName)] == CHAR_NULL || DestPath[StrLen(Node->FullName)] == L'\\')
|
||||
) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_CP_SD_SAME), gShellLevel2HiiHandle, L"cp");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_CP_SD_SAME), gShellLevel2HiiHandle, L"cp");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
break;
|
||||
}
|
||||
@@ -561,7 +561,7 @@ ValidateAndCopyFiles(
|
||||
}
|
||||
|
||||
/**
|
||||
Validate and if successful copy all the files from the list into
|
||||
Validate and if successful copy all the files from the list into
|
||||
destination directory.
|
||||
|
||||
@param[in] FileList The list of files to copy.
|
||||
@@ -591,7 +591,7 @@ ProcessValidateAndCopyFiles(
|
||||
|
||||
ShellOpenFileMetaArg((CHAR16*)DestDir, EFI_FILE_MODE_READ, &List);
|
||||
if (List != NULL && List->Link.ForwardLink != List->Link.BackLink) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_MARG_ERROR), gShellLevel2HiiHandle, L"cp", DestDir);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_MARG_ERROR), gShellLevel2HiiHandle, L"cp", DestDir);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
ShellCloseFileMetaArg(&List);
|
||||
} else if (List != NULL) {
|
||||
@@ -604,7 +604,7 @@ ProcessValidateAndCopyFiles(
|
||||
if ((FileInfo->Attribute & EFI_FILE_READ_ONLY) == 0) {
|
||||
ShellStatus = ValidateAndCopyFiles(FileList, FullName, SilentMode, RecursiveMode, NULL);
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_CP_DEST_ERROR), gShellLevel2HiiHandle, L"cp");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_CP_DEST_ERROR), gShellLevel2HiiHandle, L"cp");
|
||||
ShellStatus = SHELL_ACCESS_DENIED;
|
||||
}
|
||||
} else {
|
||||
@@ -668,7 +668,7 @@ ShellCommandRunCp (
|
||||
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"cp", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel2HiiHandle, L"cp", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -698,7 +698,7 @@ ShellCommandRunCp (
|
||||
//
|
||||
// we have insufficient parameters
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel2HiiHandle, L"cp");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel2HiiHandle, L"cp");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
break;
|
||||
case 2:
|
||||
@@ -707,12 +707,12 @@ ShellCommandRunCp (
|
||||
//
|
||||
Cwd = ShellGetCurrentDir(NULL);
|
||||
if (Cwd == NULL){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_CWD), gShellLevel2HiiHandle, L"cp");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_CWD), gShellLevel2HiiHandle, L"cp");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ShellOpenFileMetaArg((CHAR16*)ShellCommandLineGetRawValue(Package, 1), EFI_FILE_MODE_WRITE|EFI_FILE_MODE_READ, &FileList);
|
||||
if (FileList == NULL || IsListEmpty(&FileList->Link) || EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_NF), gShellLevel2HiiHandle, L"cp", ShellCommandLineGetRawValue(Package, 1));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_NF), gShellLevel2HiiHandle, L"cp", ShellCommandLineGetRawValue(Package, 1));
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
} else {
|
||||
FullCwd = AllocateZeroPool(StrSize(Cwd) + sizeof(CHAR16));
|
||||
@@ -738,7 +738,7 @@ ShellCommandRunCp (
|
||||
}
|
||||
Status = ShellOpenFileMetaArg((CHAR16*)ShellCommandLineGetRawValue(Package, LoopCounter), EFI_FILE_MODE_WRITE|EFI_FILE_MODE_READ, &FileList);
|
||||
if (EFI_ERROR(Status) || FileList == NULL || IsListEmpty(&FileList->Link)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_NF), gShellLevel2HiiHandle, L"cp", ShellCommandLineGetRawValue(Package, LoopCounter));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_NF), gShellLevel2HiiHandle, L"cp", ShellCommandLineGetRawValue(Package, LoopCounter));
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
@@ -752,7 +752,7 @@ ShellCommandRunCp (
|
||||
ShellStatus = ProcessValidateAndCopyFiles(FileList, PathCleanUpDirectories((CHAR16*)ShellCommandLineGetRawValue(Package, ParamCount)), SilentMode, RecursiveMode);
|
||||
Status = ShellCloseFileMetaArg(&FileList);
|
||||
if (EFI_ERROR(Status) && ShellStatus == SHELL_SUCCESS) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_FILE), gShellLevel2HiiHandle, L"cp", ShellCommandLineGetRawValue(Package, ParamCount), ShellStatus|MAX_BIT);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_FILE), gShellLevel2HiiHandle, L"cp", ShellCommandLineGetRawValue(Package, ParamCount), ShellStatus|MAX_BIT);
|
||||
ShellStatus = SHELL_ACCESS_DENIED;
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for attrib shell level 2 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2011, 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
|
||||
@@ -212,7 +212,7 @@ ShellCommandRunLoad (
|
||||
Status = ShellCommandLineParse (LoadParamList, &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"load", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel2HiiHandle, L"load", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -228,7 +228,7 @@ ShellCommandRunLoad (
|
||||
//
|
||||
// we didnt get a single file to load parameter
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel2HiiHandle, L"load");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel2HiiHandle, L"load");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
for ( ParamCount = 1
|
||||
@@ -259,7 +259,7 @@ ShellCommandRunLoad (
|
||||
//
|
||||
// no files found.
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_NF), gShellLevel2HiiHandle, L"load", (CHAR16*)ShellCommandLineGetRawValue(Package, ParamCount));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_NF), gShellLevel2HiiHandle, L"load", (CHAR16*)ShellCommandLineGetRawValue(Package, ParamCount));
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
}
|
||||
} // for loop for params
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for ls shell level 2 function.
|
||||
|
||||
(C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2017, 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
|
||||
@@ -154,10 +154,10 @@ PrintSfoVolumeInfoTableEntry(
|
||||
**/
|
||||
VOID
|
||||
PrintFileInformation(
|
||||
IN CONST BOOLEAN Sfo,
|
||||
IN CONST EFI_SHELL_FILE_INFO *TheNode,
|
||||
IN UINT64 *Files,
|
||||
IN UINT64 *Size,
|
||||
IN CONST BOOLEAN Sfo,
|
||||
IN CONST EFI_SHELL_FILE_INFO *TheNode,
|
||||
IN UINT64 *Files,
|
||||
IN UINT64 *Size,
|
||||
IN UINT64 *Dirs
|
||||
)
|
||||
{
|
||||
@@ -300,8 +300,8 @@ PrintNonSfoHeader(
|
||||
**/
|
||||
VOID
|
||||
PrintNonSfoFooter(
|
||||
IN UINT64 Files,
|
||||
IN UINT64 Size,
|
||||
IN UINT64 Files,
|
||||
IN UINT64 Size,
|
||||
IN UINT64 Dirs
|
||||
)
|
||||
{
|
||||
@@ -370,7 +370,7 @@ FileTimeToLocalTime (
|
||||
//
|
||||
HourNumberOfTempMinute = TempMinute / 60;
|
||||
if(TempMinute < 0) {
|
||||
HourNumberOfTempMinute --;
|
||||
HourNumberOfTempMinute --;
|
||||
}
|
||||
TempHour = Time->Hour + HourNumberOfTempMinute;
|
||||
Time->Minute = (UINT8)(TempMinute - 60 * HourNumberOfTempMinute);
|
||||
@@ -582,7 +582,7 @@ PrintLsOutput(
|
||||
}
|
||||
CorrectedPath = StrnCatGrow(&CorrectedPath, &LongestPath, L"*", 0);
|
||||
Status = ShellOpenFileMetaArg((CHAR16*)CorrectedPath, EFI_FILE_MODE_READ, &ListHead);
|
||||
|
||||
|
||||
if (!EFI_ERROR(Status)) {
|
||||
for ( Node = (EFI_SHELL_FILE_INFO *)GetFirstNode(&ListHead->Link)
|
||||
; !IsNull(&ListHead->Link, &Node->Link) && ShellStatus == SHELL_SUCCESS
|
||||
@@ -609,7 +609,7 @@ PrintLsOutput(
|
||||
&FoundOne,
|
||||
Count,
|
||||
TimeZone);
|
||||
|
||||
|
||||
//
|
||||
// Since it's running recursively, we have to break immediately when returned SHELL_ABORTED
|
||||
//
|
||||
@@ -698,7 +698,7 @@ ShellCommandRunLs (
|
||||
Status = ShellCommandLineParse (LsParamList, &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"ls", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel2HiiHandle, L"ls", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -713,7 +713,7 @@ ShellCommandRunLs (
|
||||
}
|
||||
|
||||
if (ShellCommandLineGetCount(Package) > 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"ls");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"ls");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@@ -751,7 +751,7 @@ ShellCommandRunLs (
|
||||
Count++;
|
||||
continue;
|
||||
default:
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ATTRIBUTE), gShellLevel2HiiHandle, L"ls", ShellCommandLineGetValue(Package, L"-a"));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ATTRIBUTE), gShellLevel2HiiHandle, L"ls", ShellCommandLineGetValue(Package, L"-a"));
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
break;
|
||||
} // switch
|
||||
@@ -772,7 +772,7 @@ ShellCommandRunLs (
|
||||
CurDir = gEfiShellProtocol->GetCurDir(NULL);
|
||||
if (CurDir == NULL) {
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_CWD), gShellLevel2HiiHandle, L"ls");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_CWD), gShellLevel2HiiHandle, L"ls");
|
||||
}
|
||||
//
|
||||
// Copy to the 2 strings for starting path and file search string
|
||||
@@ -789,7 +789,7 @@ ShellCommandRunLs (
|
||||
// If we got something and it doesnt have a fully qualified path, then we needed to have a CWD.
|
||||
//
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_CWD), gShellLevel2HiiHandle, L"ls");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_CWD), gShellLevel2HiiHandle, L"ls");
|
||||
} else {
|
||||
//
|
||||
// We got a valid fully qualified path or we have a CWD
|
||||
@@ -809,7 +809,7 @@ ShellCommandRunLs (
|
||||
ShellCommandLineFreeVarList (Package);
|
||||
return SHELL_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
|
||||
if (ShellIsDirectory(PathName) == EFI_SUCCESS) {
|
||||
//
|
||||
// is listing ends with a directory, then we list all files in that directory
|
||||
@@ -832,7 +832,7 @@ ShellCommandRunLs (
|
||||
}
|
||||
Status = gRT->GetTime(&TheTime, NULL);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_UEFI_FUNC_WARN), gShellLevel2HiiHandle, L"ls", L"gRT->GetTime", Status);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_UEFI_FUNC_WARN), gShellLevel2HiiHandle, L"ls", L"gRT->GetTime", Status);
|
||||
TheTime.TimeZone = EFI_UNSPECIFIED_TIMEZONE;
|
||||
}
|
||||
|
||||
@@ -848,15 +848,15 @@ ShellCommandRunLs (
|
||||
TheTime.TimeZone
|
||||
);
|
||||
if (ShellStatus == SHELL_NOT_FOUND) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_LS_FILE_NOT_FOUND), gShellLevel2HiiHandle, L"ls", FullPath);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_LS_FILE_NOT_FOUND), gShellLevel2HiiHandle, L"ls", FullPath);
|
||||
} else if (ShellStatus == SHELL_INVALID_PARAMETER) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel2HiiHandle, L"ls", FullPath);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel2HiiHandle, L"ls", FullPath);
|
||||
} else if (ShellStatus == SHELL_ABORTED) {
|
||||
//
|
||||
// Ignore aborting.
|
||||
//
|
||||
} else if (ShellStatus != SHELL_SUCCESS) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel2HiiHandle, L"ls", FullPath);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel2HiiHandle, L"ls", FullPath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@
|
||||
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
(C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<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
|
||||
@@ -56,12 +56,12 @@ IsNumberLetterOnly(
|
||||
|
||||
@param[in] List The list to seatch in.
|
||||
@param[in] MetaTarget The item to search for. MetaMatching supported.
|
||||
@param[out] FullName Optional pointer to an allocated buffer containing
|
||||
@param[out] FullName Optional pointer to an allocated buffer containing
|
||||
the match.
|
||||
@param[in] Meta TRUE to use MetaMatching.
|
||||
@param[in] SkipTrailingNumbers TRUE to allow for numbers after the MetaTarget.
|
||||
@param[in] Target The single character that delimits list
|
||||
items (";" normally).
|
||||
@param[in] Target The single character that delimits list
|
||||
items (";" normally).
|
||||
**/
|
||||
BOOLEAN
|
||||
SearchList(
|
||||
@@ -119,7 +119,7 @@ SearchList(
|
||||
}
|
||||
|
||||
/**
|
||||
Determine what type of device is represented and return it's string. The
|
||||
Determine what type of device is represented and return it's string. The
|
||||
string is in allocated memory and must be callee freed. The HII is is listed below.
|
||||
The actual string cannot be determined.
|
||||
|
||||
@@ -223,7 +223,7 @@ MappingListHasType(
|
||||
CHAR16 *NewSpecific;
|
||||
RETURN_STATUS Status;
|
||||
UINTN Length;
|
||||
|
||||
|
||||
//
|
||||
// specific has priority
|
||||
//
|
||||
@@ -529,7 +529,7 @@ PerformMappingDisplay(
|
||||
BOOLEAN Found;
|
||||
|
||||
if (!Consist && !Normal && Specific == NULL && TypeString == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel2HiiHandle, L"map");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel2HiiHandle, L"map");
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
|
||||
@@ -540,7 +540,7 @@ PerformMappingDisplay(
|
||||
if (StrnCmp(TypeString, Test, StrLen(Test)-1) != 0) {
|
||||
Test = (CHAR16*)Fp;
|
||||
if (StrnCmp(TypeString, Test, StrLen(Test)-1) != 0) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel2HiiHandle, L"map", TypeString);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel2HiiHandle, L"map", TypeString);
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
} else if (Test == NULL) {
|
||||
@@ -665,9 +665,9 @@ PerformMappingDisplay(
|
||||
}
|
||||
if (!Found) {
|
||||
if (Specific != NULL) {
|
||||
ShellPrintHiiEx(gST->ConOut->Mode->CursorColumn, gST->ConOut->Mode->CursorRow-1, NULL, STRING_TOKEN (STR_MAP_NF), gShellLevel2HiiHandle, L"map", Specific);
|
||||
ShellPrintHiiEx(gST->ConOut->Mode->CursorColumn, gST->ConOut->Mode->CursorRow-1, NULL, STRING_TOKEN (STR_MAP_NF), gShellLevel2HiiHandle, L"map", Specific);
|
||||
} else {
|
||||
ShellPrintHiiEx(gST->ConOut->Mode->CursorColumn, gST->ConOut->Mode->CursorRow-1, NULL, STRING_TOKEN (STR_CD_NF), gShellLevel2HiiHandle, L"map");
|
||||
ShellPrintHiiEx(gST->ConOut->Mode->CursorColumn, gST->ConOut->Mode->CursorRow-1, NULL, STRING_TOKEN (STR_CD_NF), gShellLevel2HiiHandle, L"map");
|
||||
}
|
||||
}
|
||||
return (SHELL_SUCCESS);
|
||||
@@ -879,7 +879,7 @@ AddMappingFromMapping(
|
||||
EFI_STATUS Status;
|
||||
CHAR16 *NewSName;
|
||||
RETURN_STATUS StrRetStatus;
|
||||
|
||||
|
||||
NewSName = AllocateCopyPool(StrSize(SName) + sizeof(CHAR16), SName);
|
||||
if (NewSName == NULL) {
|
||||
return (SHELL_OUT_OF_RESOURCES);
|
||||
@@ -935,7 +935,7 @@ AddMappingFromHandle(
|
||||
EFI_STATUS Status;
|
||||
CHAR16 *NewSName;
|
||||
RETURN_STATUS StrRetStatus;
|
||||
|
||||
|
||||
NewSName = AllocateCopyPool(StrSize(SName) + sizeof(CHAR16), SName);
|
||||
if (NewSName == NULL) {
|
||||
return (SHELL_OUT_OF_RESOURCES);
|
||||
@@ -1084,7 +1084,7 @@ ShellCommandRunMap (
|
||||
Status = ShellCommandLineParse (MapParamList, &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"map", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel2HiiHandle, L"map", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -1100,7 +1100,7 @@ ShellCommandRunMap (
|
||||
if (ShellCommandLineGetFlag(Package, L"-?")) {
|
||||
ASSERT(FALSE);
|
||||
} else if (ShellCommandLineGetRawValue(Package, 3) != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"map");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"map");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@@ -1114,7 +1114,7 @@ ShellCommandRunMap (
|
||||
|| ShellCommandLineGetFlag(Package, L"-u")
|
||||
|| ShellCommandLineGetFlag(Package, L"-t")
|
||||
){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CON), gShellLevel2HiiHandle, L"map");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CON), gShellLevel2HiiHandle, L"map");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
SName = ShellCommandLineGetValue(Package, L"-d");
|
||||
@@ -1122,18 +1122,18 @@ ShellCommandRunMap (
|
||||
Status = PerformMappingDelete(SName);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_ACCESS_DENIED) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_AD), gShellLevel2HiiHandle, L"map");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_AD), gShellLevel2HiiHandle, L"map");
|
||||
ShellStatus = SHELL_ACCESS_DENIED;
|
||||
} else if (Status == EFI_NOT_FOUND) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MAP_NF), gShellLevel2HiiHandle, L"map", SName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MAP_NF), gShellLevel2HiiHandle, L"map", SName);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK), gShellLevel2HiiHandle, L"map", Status);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK), gShellLevel2HiiHandle, L"map", Status);
|
||||
ShellStatus = SHELL_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel2HiiHandle, L"map");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel2HiiHandle, L"map");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
@@ -1151,7 +1151,7 @@ ShellCommandRunMap (
|
||||
//
|
||||
Status = ShellCommandCreateInitialMappingsAndPaths();
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK), gShellLevel2HiiHandle, L"map", Status);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK), gShellLevel2HiiHandle, L"map", Status);
|
||||
ShellStatus = SHELL_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
@@ -1161,7 +1161,7 @@ ShellCommandRunMap (
|
||||
//
|
||||
Status = ShellCommandUpdateMapping ();
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK), gShellLevel2HiiHandle, L"map", Status);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_UK), gShellLevel2HiiHandle, L"map", Status);
|
||||
ShellStatus = SHELL_UNSUPPORTED;
|
||||
}
|
||||
}
|
||||
@@ -1241,7 +1241,7 @@ ShellCommandRunMap (
|
||||
MapAsHandle = NULL;
|
||||
}
|
||||
if (MapAsHandle == NULL && Mapping[StrLen(Mapping)-1] != L':') {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel2HiiHandle, L"map", Mapping);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel2HiiHandle, L"map", Mapping);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
TempStringLength = StrLen(SName);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for attrib shell level 2 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2010, 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
|
||||
@@ -55,7 +55,7 @@ ShellCommandRunMkDir (
|
||||
Status = ShellCommandLineParse (EmptyParamList, &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"mkdir", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel2HiiHandle, L"mkdir", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -76,7 +76,7 @@ ShellCommandRunMkDir (
|
||||
//
|
||||
// we didnt get a single parameter
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel2HiiHandle, L"mkdir");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel2HiiHandle, L"mkdir");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
for ( DirCreateCount = 1
|
||||
@@ -108,7 +108,7 @@ ShellCommandRunMkDir (
|
||||
ASSERT(FileHandle == NULL);
|
||||
//
|
||||
// create the nested directory from parent to child.
|
||||
// if NewDirName = test1\test2\test3, first create "test1\" directory, then "test1\test2\", finally "test1\test2\test3".
|
||||
// if NewDirName = test1\test2\test3, first create "test1\" directory, then "test1\test2\", finally "test1\test2\test3".
|
||||
//
|
||||
NewDirNameCopy = AllocateCopyPool (StrSize(NewDirName), NewDirName);
|
||||
NewDirNameCopy = PathCleanUpDirectories (NewDirNameCopy);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for mv shell level 2 function.
|
||||
|
||||
(C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
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
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
/**
|
||||
function to determine if a move is between file systems.
|
||||
|
||||
|
||||
@param FullName [in] The name of the file to move.
|
||||
@param Cwd [in] The current working directory
|
||||
@param DestPath [in] The target location to move to
|
||||
@@ -170,14 +170,14 @@ IsValidMove(
|
||||
//
|
||||
// invalid to move read only or move to a read only destination
|
||||
//
|
||||
if (((Attribute & EFI_FILE_READ_ONLY) != 0)
|
||||
if (((Attribute & EFI_FILE_READ_ONLY) != 0)
|
||||
|| (FileStatus == EFI_WRITE_PROTECTED)
|
||||
|| ((DestAttr & EFI_FILE_READ_ONLY) != 0)
|
||||
) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_MV_INV_RO), gShellLevel2HiiHandle, SourcePath);
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DestPathCopy = AllocateCopyPool(StrSize(DestPath), DestPath);
|
||||
if (DestPathCopy == NULL) {
|
||||
return (FALSE);
|
||||
@@ -196,7 +196,7 @@ IsValidMove(
|
||||
// If they're the same, or if source is "above" dest on file path tree
|
||||
//
|
||||
if ( StringNoCaseCompare (&DestPathWalker, &SourcePath) == 0 ||
|
||||
((StrStr(DestPathWalker, SourcePath) == DestPathWalker) &&
|
||||
((StrStr(DestPathWalker, SourcePath) == DestPathWalker) &&
|
||||
(DestPathWalker[StrLen(SourcePath)] == '\\')
|
||||
)
|
||||
) {
|
||||
@@ -311,7 +311,7 @@ GetDestinationLocation(
|
||||
//
|
||||
if (!IsNodeAtEnd(&DestList->Link, &Node->Link)) {
|
||||
ShellCloseFileMetaArg(&DestList);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_MARG_ERROR), gShellLevel2HiiHandle, L"mv", DestParameter);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_MARG_ERROR), gShellLevel2HiiHandle, L"mv", DestParameter);
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
|
||||
@@ -331,7 +331,7 @@ GetDestinationLocation(
|
||||
// cant move multiple files onto a single file.
|
||||
//
|
||||
ShellCloseFileMetaArg(&DestList);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_ERROR), gShellLevel2HiiHandle, L"mv", DestParameter);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_ERROR), gShellLevel2HiiHandle, L"mv", DestParameter);
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
}
|
||||
@@ -401,7 +401,7 @@ MoveBetweenFileSystems(
|
||||
EFI_STATUS
|
||||
CreateFullDestPath(
|
||||
IN CONST CHAR16 **DestPath,
|
||||
OUT CHAR16 **FullDestPath,
|
||||
OUT CHAR16 **FullDestPath,
|
||||
IN CONST CHAR16 *FileName
|
||||
)
|
||||
{
|
||||
@@ -555,7 +555,7 @@ ValidateAndMoveFiles(
|
||||
StrCpyS(FullCwd, StrSize(Cwd)/sizeof(CHAR16)+1, Cwd);
|
||||
StrCatS(FullCwd, StrSize(Cwd)/sizeof(CHAR16)+1, L"\\");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Status = ShellLevel2StripQuotes (DestParameter, &CleanFilePathStr);
|
||||
if (EFI_ERROR (Status)) {
|
||||
@@ -757,7 +757,7 @@ ShellCommandRunMv (
|
||||
Status = ShellCommandLineParse (EmptyParamList, &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"mv", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel2HiiHandle, L"mv", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -777,7 +777,7 @@ ShellCommandRunMv (
|
||||
//
|
||||
// we have insufficient parameters
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel2HiiHandle, L"mv");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel2HiiHandle, L"mv");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
break;
|
||||
case 2:
|
||||
@@ -785,12 +785,12 @@ ShellCommandRunMv (
|
||||
// must have valid CWD for single parameter...
|
||||
//
|
||||
if (ShellGetCurrentDir(NULL) == NULL){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_CWD), gShellLevel2HiiHandle, L"mv");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_CWD), gShellLevel2HiiHandle, L"mv");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ShellOpenFileMetaArg((CHAR16*)ShellCommandLineGetRawValue(Package, 1), EFI_FILE_MODE_WRITE|EFI_FILE_MODE_READ, &FileList);
|
||||
if (FileList == NULL || IsListEmpty(&FileList->Link) || EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_NF), gShellLevel2HiiHandle, L"mv", ShellCommandLineGetRawValue(Package, 1));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_NF), gShellLevel2HiiHandle, L"mv", ShellCommandLineGetRawValue(Package, 1));
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
} else {
|
||||
//
|
||||
@@ -819,7 +819,7 @@ ShellCommandRunMv (
|
||||
}
|
||||
Status = ShellOpenFileMetaArg((CHAR16*)ShellCommandLineGetRawValue(Package, LoopCounter), EFI_FILE_MODE_WRITE|EFI_FILE_MODE_READ, &FileList);
|
||||
if (FileList == NULL || IsListEmpty(&FileList->Link) || EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_NF), gShellLevel2HiiHandle, L"mv", ShellCommandLineGetRawValue(Package, LoopCounter));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_NF), gShellLevel2HiiHandle, L"mv", ShellCommandLineGetRawValue(Package, LoopCounter));
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
} else {
|
||||
//
|
||||
@@ -836,7 +836,7 @@ ShellCommandRunMv (
|
||||
Status = ShellCloseFileMetaArg(&FileList);
|
||||
if (EFI_ERROR(Status) && ShellStatus == SHELL_SUCCESS) {
|
||||
ShellStatus = SHELL_ACCESS_DENIED;
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_FILE), gShellLevel2HiiHandle, L"mv", ShellCommandLineGetRawValue(Package, 1), ShellStatus|MAX_BIT);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_ERR_FILE), gShellLevel2HiiHandle, L"mv", ShellCommandLineGetRawValue(Package, 1), ShellStatus|MAX_BIT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for Parse shell level 2 function.
|
||||
|
||||
(C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2017, 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
|
||||
@@ -19,9 +19,9 @@
|
||||
Check if data is coming from StdIn output.
|
||||
|
||||
@param[in] None
|
||||
|
||||
@retval TRUE StdIn stream data available to parse
|
||||
@retval FALSE StdIn stream data is not available to parse.
|
||||
|
||||
@retval TRUE StdIn stream data available to parse
|
||||
@retval FALSE StdIn stream data is not available to parse.
|
||||
**/
|
||||
BOOLEAN
|
||||
IsStdInDataAvailable (
|
||||
@@ -30,11 +30,11 @@ IsStdInDataAvailable (
|
||||
{
|
||||
SHELL_FILE_HANDLE FileHandle;
|
||||
EFI_STATUS Status;
|
||||
CHAR16 CharBuffer;
|
||||
CHAR16 CharBuffer;
|
||||
UINTN CharSize;
|
||||
UINT64 OriginalFilePosition;
|
||||
|
||||
Status = EFI_SUCCESS;
|
||||
Status = EFI_SUCCESS;
|
||||
FileHandle = NULL;
|
||||
OriginalFilePosition = 0;
|
||||
|
||||
@@ -57,11 +57,11 @@ IsStdInDataAvailable (
|
||||
|
||||
/**
|
||||
Handle stings for SFO Output with escape character ^ in a string
|
||||
1. Quotation marks in the string must be escaped by using a ^ character (i.e. ^").
|
||||
1. Quotation marks in the string must be escaped by using a ^ character (i.e. ^").
|
||||
2. The ^ character may be inserted using ^^.
|
||||
|
||||
@param[in] String The Unicode NULL-terminated string.
|
||||
|
||||
|
||||
@retval NewString The new string handled for SFO.
|
||||
**/
|
||||
EFI_STRING
|
||||
@@ -76,7 +76,7 @@ HandleStringWithEscapeCharForParse (
|
||||
if (String == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// start to parse the input string.
|
||||
//
|
||||
@@ -96,13 +96,13 @@ HandleStringWithEscapeCharForParse (
|
||||
StrWalker++;
|
||||
NewStr++;
|
||||
}
|
||||
|
||||
|
||||
return ReturnStr;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Do the actual parsing of the file. the file should be SFO output from a
|
||||
Do the actual parsing of the file. the file should be SFO output from a
|
||||
shell command or a similar format.
|
||||
|
||||
@param[in] FileName The filename to open.
|
||||
@@ -143,14 +143,14 @@ PerformParsing(
|
||||
|
||||
Status = ShellOpenFileByName(FileName, &FileHandle, EFI_FILE_MODE_READ, 0);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel2HiiHandle, L"parse", FileName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel2HiiHandle, L"parse", FileName);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
} else if (!EFI_ERROR (FileHandleIsDirectory (FileHandle))) {
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_NOT_FILE), gShellLevel2HiiHandle, L"parse", FileName);
|
||||
ShellPrintHiiEx (-1, -1, NULL, STRING_TOKEN (STR_GEN_NOT_FILE), gShellLevel2HiiHandle, L"parse", FileName);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
} else {
|
||||
for (LoopVariable = 0 ; LoopVariable < ShellCommandInstance && !ShellFileHandleEof(FileHandle);) {
|
||||
TempLine = ShellFileHandleReturnLine (FileHandle, &Ascii);
|
||||
TempLine = ShellFileHandleReturnLine (FileHandle, &Ascii);
|
||||
|
||||
if ((TempLine == NULL) || (*TempLine == CHAR_NULL && StreamingUnicode)) {
|
||||
break;
|
||||
@@ -169,7 +169,7 @@ PerformParsing(
|
||||
if (LoopVariable == ShellCommandInstance) {
|
||||
LoopVariable = 0;
|
||||
while(1) {
|
||||
TempLine = ShellFileHandleReturnLine (FileHandle, &Ascii);
|
||||
TempLine = ShellFileHandleReturnLine (FileHandle, &Ascii);
|
||||
if (TempLine == NULL
|
||||
|| *TempLine == CHAR_NULL
|
||||
|| StrStr (TempLine, L"ShellCommand,") == TempLine) {
|
||||
@@ -188,7 +188,7 @@ PerformParsing(
|
||||
}
|
||||
if (ColumnLoop == ColumnIndex) {
|
||||
if (ColumnPointer == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellLevel2HiiHandle, L"parse", L"Column Index");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellLevel2HiiHandle, L"parse", L"Column Index");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
TempSpot = StrStr (ColumnPointer, L",\"");
|
||||
@@ -266,7 +266,7 @@ ShellCommandRunParse (
|
||||
Status = ShellCommandLineParseEx (ParamList, &Package, &ProblemParam, TRUE, FALSE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel2HiiHandle, L"parse", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel2HiiHandle, L"parse", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -276,11 +276,11 @@ ShellCommandRunParse (
|
||||
StreamingUnicode = IsStdInDataAvailable ();
|
||||
if ((!StreamingUnicode && (ShellCommandLineGetCount(Package) < 4)) ||
|
||||
(ShellCommandLineGetCount(Package) < 3)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel2HiiHandle, L"parse");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel2HiiHandle, L"parse");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if ((StreamingUnicode && (ShellCommandLineGetCount(Package) > 3)) ||
|
||||
(ShellCommandLineGetCount(Package) > 4)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"parse");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"parse");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
if (StreamingUnicode) {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for attrib shell level 2 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
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
|
||||
@@ -60,7 +60,7 @@ ShellCommandRunReset (
|
||||
Status = ShellCommandLineParse (ResetParamList, &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"reset", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel2HiiHandle, L"reset", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
} else {
|
||||
@@ -73,7 +73,7 @@ ShellCommandRunReset (
|
||||
if (ShellCommandLineGetFlag(Package, L"-?")) {
|
||||
ASSERT(FALSE);
|
||||
} else if (ShellCommandLineGetRawValue(Package, 1) != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"reset");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"reset");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
|
||||
@@ -114,7 +114,7 @@ ShellCommandRunReset (
|
||||
//
|
||||
if (ShellCommandLineGetFlag(Package, L"-w")) {
|
||||
if (ShellCommandLineGetFlag(Package, L"-s") || ShellCommandLineGetFlag(Package, L"-c")) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"reset");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"reset");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
String = ShellCommandLineGetValue(Package, L"-w");
|
||||
@@ -126,7 +126,7 @@ ShellCommandRunReset (
|
||||
}
|
||||
} else if (ShellCommandLineGetFlag(Package, L"-s")) {
|
||||
if (ShellCommandLineGetFlag(Package, L"-c")) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"reset");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"reset");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
String = ShellCommandLineGetValue(Package, L"-s");
|
||||
|
@@ -24,7 +24,7 @@ STATIC CONST SHELL_PARAM_ITEM ParamList[] = {
|
||||
Determine if a directory has no files in it.
|
||||
|
||||
@param[in] FileHandle The EFI_HANDLE to the directory.
|
||||
|
||||
|
||||
@retval TRUE The directory has no files (or directories).
|
||||
@retval FALSE The directory has at least 1 file or directory in it.
|
||||
**/
|
||||
@@ -85,7 +85,7 @@ CascadeDelete(
|
||||
Status = EFI_SUCCESS;
|
||||
|
||||
if ((Node->Info->Attribute & EFI_FILE_READ_ONLY) == EFI_FILE_READ_ONLY) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_RM_LOG_DETELE_RO), gShellLevel2HiiHandle, L"rm", Node->FullName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_RM_LOG_DETELE_RO), gShellLevel2HiiHandle, L"rm", Node->FullName);
|
||||
return (SHELL_ACCESS_DENIED);
|
||||
}
|
||||
|
||||
@@ -292,7 +292,7 @@ ShellCommandRunRm (
|
||||
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"rm", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel2HiiHandle, L"rm", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -309,7 +309,7 @@ ShellCommandRunRm (
|
||||
//
|
||||
// we insufficient parameters
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel2HiiHandle, L"rm");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel2HiiHandle, L"rm");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@@ -322,7 +322,7 @@ ShellCommandRunRm (
|
||||
){
|
||||
Status = ShellOpenFileMetaArg((CHAR16*)Param, EFI_FILE_MODE_WRITE|EFI_FILE_MODE_READ, &FileList);
|
||||
if (EFI_ERROR(Status) || FileList == NULL || IsListEmpty(&FileList->Link)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_NF), gShellLevel2HiiHandle, L"rm", (CHAR16*)Param);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_NF), gShellLevel2HiiHandle, L"rm", (CHAR16*)Param);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
break;
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for attrib shell level 2 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2015, 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
|
||||
@@ -91,7 +91,7 @@ ShellCommandRunSet (
|
||||
Status = ShellCommandLineParse (SetParamList, &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"set", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel2HiiHandle, L"set", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
} else {
|
||||
@@ -104,10 +104,10 @@ ShellCommandRunSet (
|
||||
if (ShellCommandLineGetFlag(Package, L"-?")) {
|
||||
ASSERT(FALSE);
|
||||
} else if (ShellCommandLineGetRawValue(Package, 3) != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"set");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"set");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetRawValue(Package, 1) != NULL && ShellCommandLineGetFlag(Package, L"-d")) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"set");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"set");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetFlag(Package, L"-d")) {
|
||||
//
|
||||
@@ -115,12 +115,12 @@ ShellCommandRunSet (
|
||||
//
|
||||
KeyName = ShellCommandLineGetValue(Package, L"-d");
|
||||
if (KeyName == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellLevel2HiiHandle, L"set", L"-d");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellLevel2HiiHandle, L"set", L"-d");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
Status = ShellSetEnvironmentVariable(KeyName, L"", ShellCommandLineGetFlag(Package, L"-v"));
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SET_ND), gShellLevel2HiiHandle, L"set", KeyName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SET_ND), gShellLevel2HiiHandle, L"set", KeyName);
|
||||
ShellStatus = SHELL_DEVICE_ERROR;
|
||||
}
|
||||
}
|
||||
@@ -144,7 +144,7 @@ ShellCommandRunSet (
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SET_ERROR_SET), gShellLevel2HiiHandle, L"set", KeyName);
|
||||
ShellStatus = (SHELL_STATUS) (Status & (~MAX_BIT));
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
if (KeyName != NULL) {
|
||||
//
|
||||
@@ -152,7 +152,7 @@ ShellCommandRunSet (
|
||||
//
|
||||
Value = ShellGetEnvironmentVariable(KeyName);
|
||||
if (Value == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SET_NF), gShellLevel2HiiHandle, L"set", KeyName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SET_NF), gShellLevel2HiiHandle, L"set", KeyName);
|
||||
ShellStatus = SHELL_SUCCESS;
|
||||
} else {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SET_DISP), gShellLevel2HiiHandle, KeyName, Value);
|
||||
|
@@ -76,7 +76,7 @@ InternalIsTimeLikeString (
|
||||
}
|
||||
|
||||
/**
|
||||
Verify that the DateString is valid and if so set that as the current
|
||||
Verify that the DateString is valid and if so set that as the current
|
||||
date.
|
||||
|
||||
@param[in] DateString The pointer to a string representation of the date.
|
||||
@@ -102,7 +102,7 @@ CheckAndSetDate (
|
||||
|
||||
Status = gRT->GetTime(&TheTime, NULL);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_UEFI_FUNC_WARN), gShellLevel2HiiHandle, L"date", L"gRT->GetTime", Status);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_UEFI_FUNC_WARN), gShellLevel2HiiHandle, L"date", L"gRT->GetTime", Status);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
|
||||
@@ -195,7 +195,7 @@ ShellCommandRunDate (
|
||||
Status = ShellCommandLineParse (SfoParamList, &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"date", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel2HiiHandle, L"date", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -208,7 +208,7 @@ ShellCommandRunDate (
|
||||
if (ShellCommandLineGetFlag(Package, L"-?")) {
|
||||
ASSERT(FALSE);
|
||||
} else if (ShellCommandLineGetRawValue(Package, 2) != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"date");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"date");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@@ -221,7 +221,7 @@ ShellCommandRunDate (
|
||||
//
|
||||
Status = gRT->GetTime(&TheTime, NULL);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_UEFI_FUNC_WARN), gShellLevel2HiiHandle, L"date", L"gRT->GetTime", Status);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_UEFI_FUNC_WARN), gShellLevel2HiiHandle, L"date", L"gRT->GetTime", Status);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ ShellCommandRunDate (
|
||||
}
|
||||
} else {
|
||||
if (PcdGet8(PcdShellSupportLevel) == 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"date");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"date");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@@ -254,7 +254,7 @@ ShellCommandRunDate (
|
||||
ShellStatus = CheckAndSetDate(Param1);
|
||||
}
|
||||
if (ShellStatus != SHELL_SUCCESS) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel2HiiHandle, L"date", Param1);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel2HiiHandle, L"date", Param1);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
@@ -287,7 +287,7 @@ STATIC CONST SHELL_PARAM_ITEM TimeParamList3[] = {
|
||||
};
|
||||
|
||||
/**
|
||||
Verify that the TimeString is valid and if so set that as the current
|
||||
Verify that the TimeString is valid and if so set that as the current
|
||||
time.
|
||||
|
||||
@param[in] TimeString The pointer to a string representation of the time.
|
||||
@@ -320,7 +320,7 @@ CheckAndSetTime (
|
||||
|
||||
Status = gRT->GetTime(&TheTime, NULL);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_UEFI_FUNC_WARN), gShellLevel2HiiHandle, L"time", L"gRT->GetTime", Status);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_UEFI_FUNC_WARN), gShellLevel2HiiHandle, L"time", L"gRT->GetTime", Status);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
|
||||
@@ -433,7 +433,7 @@ ShellCommandRunTime (
|
||||
}
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel2HiiHandle, L"time", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel2HiiHandle, L"time", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -445,14 +445,14 @@ ShellCommandRunTime (
|
||||
//
|
||||
Status = gRT->GetTime(&TheTime, NULL);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_UEFI_FUNC_WARN), gShellLevel2HiiHandle, L"time", L"gRT->GetTime", Status);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_UEFI_FUNC_WARN), gShellLevel2HiiHandle, L"time", L"gRT->GetTime", Status);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
|
||||
if (ShellCommandLineGetFlag(Package, L"-?")) {
|
||||
ASSERT(FALSE);
|
||||
} else if (ShellCommandLineGetRawValue(Package, 2) != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"time");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"time");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@@ -539,11 +539,11 @@ ShellCommandRunTime (
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_TIME_DST3), gShellLevel2HiiHandle);
|
||||
break;
|
||||
default:
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_UEFI_FUNC_ERROR), gShellLevel2HiiHandle, L"time", L"gRT->GetTime", L"TheTime.Daylight", TheTime.Daylight);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_UEFI_FUNC_ERROR), gShellLevel2HiiHandle, L"time", L"gRT->GetTime", L"TheTime.Daylight", TheTime.Daylight);
|
||||
}
|
||||
} else {
|
||||
if (PcdGet8(PcdShellSupportLevel) == 2) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"time");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"time");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@@ -578,7 +578,7 @@ ShellCommandRunTime (
|
||||
}
|
||||
}
|
||||
if (!(Tz >= -1440 && Tz <= 1440) && Tz != EFI_UNSPECIFIED_TIMEZONE) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM_VAL), gShellLevel2HiiHandle, L"time", TempLocation, L"-tz");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM_VAL), gShellLevel2HiiHandle, L"time", TempLocation, L"-tz");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
} else {
|
||||
@@ -599,7 +599,7 @@ ShellCommandRunTime (
|
||||
Daylight = 0xff; //make it invalid = will not use
|
||||
}
|
||||
if (Daylight != 0 && Daylight != 1 && Daylight != 3) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM_VAL), gShellLevel2HiiHandle, L"time", TempLocation, L"-d");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM_VAL), gShellLevel2HiiHandle, L"time", TempLocation, L"-d");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
} else {
|
||||
@@ -611,7 +611,7 @@ ShellCommandRunTime (
|
||||
if (ShellStatus == SHELL_SUCCESS) {
|
||||
ShellStatus = CheckAndSetTime(ShellCommandLineGetRawValue(Package, 1), Tz, Daylight);
|
||||
if (ShellStatus != SHELL_SUCCESS) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel2HiiHandle, L"time", ShellCommandLineGetRawValue(Package, 1));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel2HiiHandle, L"time", ShellCommandLineGetRawValue(Package, 1));
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
@@ -688,7 +688,7 @@ STATIC CONST SHELL_PARAM_ITEM TimeZoneParamList3[] = {
|
||||
};
|
||||
|
||||
/**
|
||||
Verify that the TimeZoneString is valid and if so set that as the current
|
||||
Verify that the TimeZoneString is valid and if so set that as the current
|
||||
timezone.
|
||||
|
||||
@param[in] TimeZoneString The pointer to a string representation of the timezone.
|
||||
@@ -733,7 +733,7 @@ CheckAndSetTimeZone (
|
||||
|
||||
Status = gRT->GetTime(&TheTime, NULL);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_UEFI_FUNC_WARN), gShellLevel2HiiHandle, L"timezone", L"gRT->GetTime", Status);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_UEFI_FUNC_WARN), gShellLevel2HiiHandle, L"timezone", L"gRT->GetTime", Status);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
|
||||
@@ -829,7 +829,7 @@ ShellCommandRunTimeZone (
|
||||
}
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel2HiiHandle, L"timezone", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel2HiiHandle, L"timezone", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -840,18 +840,18 @@ ShellCommandRunTimeZone (
|
||||
// check for "-?"
|
||||
//
|
||||
if (ShellCommandLineGetCount(Package) > 1) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"timezone");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel2HiiHandle, L"timezone");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetFlag(Package, L"-?")) {
|
||||
ASSERT(FALSE);
|
||||
} else if (ShellCommandLineGetFlag(Package, L"-s")) {
|
||||
if ((ShellCommandLineGetFlag(Package, L"-l")) || (ShellCommandLineGetFlag(Package, L"-f"))) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel2HiiHandle, L"timezone", L"-l or -f");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel2HiiHandle, L"timezone", L"-l or -f");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
ASSERT(PcdGet8(PcdShellSupportLevel) == 3);
|
||||
if (ShellCommandLineGetValue(Package, L"-s") == NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellLevel2HiiHandle, L"timezone", L"-s");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_VALUE), gShellLevel2HiiHandle, L"timezone", L"-s");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@@ -859,7 +859,7 @@ ShellCommandRunTimeZone (
|
||||
//
|
||||
ShellStatus = CheckAndSetTimeZone(ShellCommandLineGetValue(Package, L"-s"));
|
||||
if (ShellStatus != SHELL_SUCCESS) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel2HiiHandle, L"timezone", ShellCommandLineGetValue(Package, L"-s"));
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel2HiiHandle, L"timezone", ShellCommandLineGetValue(Package, L"-s"));
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
@@ -880,7 +880,7 @@ ShellCommandRunTimeZone (
|
||||
//
|
||||
Status = gRT->GetTime(&TheTime, NULL);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_UEFI_FUNC_WARN), gShellLevel2HiiHandle, L"timezone", L"gRT->GetTime", Status);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_UEFI_FUNC_WARN), gShellLevel2HiiHandle, L"timezone", L"gRT->GetTime", Status);
|
||||
return (SHELL_DEVICE_ERROR);
|
||||
}
|
||||
|
||||
@@ -951,7 +951,7 @@ ShellCommandRunTimeZone (
|
||||
//
|
||||
ShellPrintHiiEx (-1, -1, NULL, TimeZoneList[LoopVar].StringId, gShellLevel2HiiHandle);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//
|
||||
|
@@ -269,7 +269,7 @@ VerifyIntermediateDirectories (
|
||||
|
||||
@retval 0 Source and Target are identical strings without regard to case.
|
||||
@retval !=0 Source is not identical to Target.
|
||||
|
||||
|
||||
**/
|
||||
INTN
|
||||
StrniCmp(
|
||||
@@ -301,7 +301,7 @@ StrniCmp(
|
||||
FreePool (SourceCopy);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
SourceCopy[SourceLength] = L'\0';
|
||||
TargetCopy[TargetLength] = L'\0';
|
||||
Result = gUnicodeCollation->StriColl (gUnicodeCollation, SourceCopy, TargetCopy);
|
||||
@@ -315,8 +315,8 @@ StrniCmp(
|
||||
Cleans off all the quotes in the string.
|
||||
|
||||
@param[in] OriginalString pointer to the string to be cleaned.
|
||||
@param[out] CleanString The new string with all quotes removed.
|
||||
Memory allocated in the function and free
|
||||
@param[out] CleanString The new string with all quotes removed.
|
||||
Memory allocated in the function and free
|
||||
by caller.
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
@@ -328,7 +328,7 @@ ShellLevel2StripQuotes (
|
||||
)
|
||||
{
|
||||
CHAR16 *Walker;
|
||||
|
||||
|
||||
if (OriginalString == NULL || CleanString == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@
|
||||
* functions are non-interactive only
|
||||
|
||||
|
||||
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
|
||||
@@ -288,7 +288,7 @@ VerifyIntermediateDirectories (
|
||||
|
||||
@retval 0 Source and Target are identical strings without regard to case.
|
||||
@retval !=0 Source is not identical to Target.
|
||||
|
||||
|
||||
**/
|
||||
INTN
|
||||
StrniCmp(
|
||||
@@ -301,8 +301,8 @@ StrniCmp(
|
||||
Cleans off all the quotes in the string.
|
||||
|
||||
@param[in] OriginalString pointer to the string to be cleaned.
|
||||
@param[out] CleanString The new string with all quotes removed.
|
||||
Memory allocated in the function and free
|
||||
@param[out] CleanString The new string with all quotes removed.
|
||||
Memory allocated in the function and free
|
||||
by caller.
|
||||
|
||||
@retval EFI_SUCCESS The operation was successful.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
// /**
|
||||
//
|
||||
// (C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
// Copyright (c) 2009 - 2015, 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
|
||||
@@ -271,7 +271,7 @@
|
||||
" variable %cwd%.\r\n"
|
||||
".SH EXAMPLES\r\n"
|
||||
" \r\n"
|
||||
"EXAMPLES:\r\n"
|
||||
"EXAMPLES:\r\n"
|
||||
" * To change the current file system to the mapped fs0 file system:\r\n"
|
||||
" Shell> fs0:\r\n"
|
||||
" \r\n"
|
||||
@@ -294,7 +294,7 @@
|
||||
" fs1:\> cd Tmp\r\n"
|
||||
".SH RETURNVALUES\r\n"
|
||||
" \r\n"
|
||||
"RETURN VALUES:\r\n"
|
||||
"RETURN VALUES:\r\n"
|
||||
" SHELL_SUCCESS The action was completed as requested.\r\n"
|
||||
" SHELL_SECURITY_VIOLATION This function was not performed due to a security\r\n"
|
||||
" violation.\r\n"
|
||||
@@ -723,7 +723,7 @@
|
||||
" is specified by sname is deleted.\r\n"
|
||||
".SH EXAMPLES\r\n"
|
||||
" \r\n"
|
||||
"EXAMPLES:\r\n"
|
||||
"EXAMPLES:\r\n"
|
||||
" * To add an environment variable:\r\n"
|
||||
" Shell> set DiagnosticPath fs0:\efi\diag;fs1:\efi\diag\r\n"
|
||||
" \r\n"
|
||||
|
@@ -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(
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for Alias shell level 3 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2017, 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
|
||||
@@ -186,7 +186,7 @@ ShellCommandRunAlias (
|
||||
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), gShellLevel3HiiHandle, L"alias", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel3HiiHandle, L"alias", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -257,7 +257,7 @@ ShellCommandRunAlias (
|
||||
// Set volatile alias.
|
||||
//
|
||||
ASSERT (VolatileFlag);
|
||||
ASSERT (!DeleteFlag);
|
||||
ASSERT (!DeleteFlag);
|
||||
switch (ShellCommandLineGetCount (Package)) {
|
||||
case 1:
|
||||
case 2:
|
||||
|
@@ -3,7 +3,7 @@
|
||||
|
||||
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2014, 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
|
||||
@@ -63,7 +63,7 @@ ShellCommandRunCls (
|
||||
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), gShellLevel3HiiHandle, L"cls", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel3HiiHandle, L"cls", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for Echo shell level 3 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2012, 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
|
||||
@@ -61,7 +61,7 @@ ShellCommandRunEcho (
|
||||
Status = ShellCommandLineParseEx (ParamList, &Package, &ProblemParam, TRUE, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel3HiiHandle, L"echo", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel3HiiHandle, L"echo", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -104,7 +104,7 @@ ShellCommandRunEcho (
|
||||
StrnCatGrow(&PrintString, &Size, ShellCommandLineGetRawValue(Package, ParamCount), 0);
|
||||
if (ShellCommandLineGetRawValue(Package, ParamCount+1) != NULL) {
|
||||
StrnCatGrow(&PrintString, &Size, L" ", 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
ShellPrintEx(-1, -1, L"%s\r\n", PrintString);
|
||||
SHELL_FREE_NON_NULL(PrintString);
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for GetMtc shell level 3 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2013, 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
|
||||
@@ -51,7 +51,7 @@ ShellCommandRunGetMtc (
|
||||
Status = ShellCommandLineParse (EmptyParamList, &Package, &ProblemParam, TRUE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
if (Status == EFI_VOLUME_CORRUPTED && ProblemParam != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel3HiiHandle, L"getmtc", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel3HiiHandle, L"getmtc", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -64,7 +64,7 @@ ShellCommandRunGetMtc (
|
||||
if (ShellCommandLineGetFlag(Package, L"-?")) {
|
||||
ASSERT(FALSE);
|
||||
} else if (ShellCommandLineGetRawValue(Package, 1) != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel3HiiHandle, L"getmtc");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel3HiiHandle, L"getmtc");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Main file for Help shell level 3 function.
|
||||
|
||||
Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved. <BR>
|
||||
Copyright (c) 2014, ARM Limited. All rights reserved. <BR>
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
the resultant list is a double NULL terminated list of NULL terminated strings.
|
||||
|
||||
upon successful return the memory must be caller freed (unless passed back in
|
||||
upon successful return the memory must be caller freed (unless passed back in
|
||||
via a loop where it will get reallocated).
|
||||
|
||||
@param[in,out] DestList double pointer to the list. may be NULL.
|
||||
@@ -38,7 +38,7 @@
|
||||
**/
|
||||
EFI_STATUS
|
||||
LexicalInsertIntoList(
|
||||
IN OUT CHAR16 **DestList,
|
||||
IN OUT CHAR16 **DestList,
|
||||
IN OUT UINTN *DestSize,
|
||||
IN CONST CHAR16 *Item
|
||||
)
|
||||
@@ -116,7 +116,7 @@ LexicalInsertIntoList(
|
||||
**/
|
||||
EFI_STATUS
|
||||
CopyListOfCommandNames(
|
||||
IN OUT CHAR16 **DestList,
|
||||
IN OUT CHAR16 **DestList,
|
||||
IN OUT UINTN *DestSize,
|
||||
IN CONST COMMAND_LIST *SourceList
|
||||
)
|
||||
@@ -146,7 +146,7 @@ CopyListOfCommandNames(
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
CopyListOfCommandNamesWithDynamic(
|
||||
IN OUT CHAR16** DestList,
|
||||
IN OUT CHAR16** DestList,
|
||||
IN OUT UINTN *DestSize
|
||||
)
|
||||
{
|
||||
@@ -325,7 +325,7 @@ ShellCommandRunHelp (
|
||||
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), gShellLevel3HiiHandle, L"help", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel3HiiHandle, L"help", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -339,10 +339,10 @@ ShellCommandRunHelp (
|
||||
&&ShellCommandLineGetFlag(Package, L"-section")
|
||||
&&(ShellCommandLineGetFlag(Package, L"-verbose") || ShellCommandLineGetFlag(Package, L"-v"))
|
||||
){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CON), gShellLevel3HiiHandle, L"help");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_CON), gShellLevel3HiiHandle, L"help");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else if (ShellCommandLineGetRawValue(Package, 2) != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel3HiiHandle, L"help");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel3HiiHandle, L"help");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@@ -396,7 +396,7 @@ ShellCommandRunHelp (
|
||||
CopyListOfCommandNames(&SortedCommandList, &SortedCommandListSize, ShellCommandGetCommandList(TRUE));
|
||||
CopyListOfCommandNamesWithDynamic(&SortedCommandList, &SortedCommandListSize);
|
||||
|
||||
for (CurrentCommand = SortedCommandList
|
||||
for (CurrentCommand = SortedCommandList
|
||||
; CurrentCommand != NULL && CurrentCommand < SortedCommandList + SortedCommandListSize/sizeof(CHAR16) && *CurrentCommand != CHAR_NULL
|
||||
; CurrentCommand += StrLen(CurrentCommand) + 1
|
||||
) {
|
||||
@@ -405,7 +405,7 @@ ShellCommandRunHelp (
|
||||
//
|
||||
if (ShellGetExecutionBreakFlag ()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ((gUnicodeCollation->MetaiMatch(gUnicodeCollation, (CHAR16*)CurrentCommand, CommandToGetHelpOn)) ||
|
||||
(gEfiShellProtocol->GetAlias(CommandToGetHelpOn, NULL) != NULL && (gUnicodeCollation->MetaiMatch(gUnicodeCollation, (CHAR16*)CurrentCommand, (CHAR16*)(gEfiShellProtocol->GetAlias(CommandToGetHelpOn, NULL)))))) {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for Pause shell level 3 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2014, 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
|
||||
@@ -53,7 +53,7 @@ ShellCommandRunPause (
|
||||
ASSERT_EFI_ERROR(Status);
|
||||
|
||||
if (!gEfiShellProtocol->BatchIsActive()) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_NO_SCRIPT), gShellLevel3HiiHandle, L"pause");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_NO_SCRIPT), gShellLevel3HiiHandle, L"pause");
|
||||
return (SHELL_UNSUPPORTED);
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ ShellCommandRunPause (
|
||||
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), gShellLevel3HiiHandle, L"pause", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel3HiiHandle, L"pause", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -76,7 +76,7 @@ ShellCommandRunPause (
|
||||
if (ShellCommandLineGetFlag(Package, L"-?")) {
|
||||
ASSERT(FALSE);
|
||||
} else if (ShellCommandLineGetRawValue(Package, 1) != NULL) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel3HiiHandle, L"pause");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_MANY), gShellLevel3HiiHandle, L"pause");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
if (!ShellCommandLineGetFlag(Package, L"-q")) {
|
||||
|
@@ -2,7 +2,7 @@
|
||||
Main file for Touch shell level 3 function.
|
||||
|
||||
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
||||
Copyright (c) 2009 - 2011, 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
|
||||
@@ -98,7 +98,7 @@ DoTouchByHandle (
|
||||
//
|
||||
Status = TouchFileByHandle(Handle);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel3HiiHandle, L"touch", Name);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel3HiiHandle, L"touch", Name);
|
||||
return (Status);
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ DoTouchByHandle (
|
||||
//
|
||||
Status = gEfiShellProtocol->OpenFileByName (Walker->FullName, &Walker->Handle, EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel3HiiHandle, L"touch", Walker->FullName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel3HiiHandle, L"touch", Walker->FullName);
|
||||
Status = EFI_ACCESS_DENIED;
|
||||
} else {
|
||||
Status = DoTouchByHandle(Walker->FullName, FS, Walker->Handle, TRUE);
|
||||
@@ -196,7 +196,7 @@ ShellCommandRunTouch (
|
||||
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), gShellLevel3HiiHandle, L"touch", ProblemParam);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PROBLEM), gShellLevel3HiiHandle, L"touch", ProblemParam);
|
||||
FreePool(ProblemParam);
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
@@ -213,7 +213,7 @@ ShellCommandRunTouch (
|
||||
//
|
||||
// we insufficient parameters
|
||||
//
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel3HiiHandle, L"touch");
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellLevel3HiiHandle, L"touch");
|
||||
ShellStatus = SHELL_INVALID_PARAMETER;
|
||||
} else {
|
||||
//
|
||||
@@ -226,7 +226,7 @@ ShellCommandRunTouch (
|
||||
){
|
||||
Status = ShellOpenFileMetaArg((CHAR16*)Param, EFI_FILE_MODE_READ|EFI_FILE_MODE_WRITE, &FileList);
|
||||
if (EFI_ERROR(Status)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel3HiiHandle, L"touch", (CHAR16*)Param);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_PARAM_INV), gShellLevel3HiiHandle, L"touch", (CHAR16*)Param);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
break;
|
||||
}
|
||||
@@ -239,7 +239,7 @@ ShellCommandRunTouch (
|
||||
// check that we have at least 1 file
|
||||
//
|
||||
if (FileList == NULL || IsListEmpty(&FileList->Link)) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_NF), gShellLevel3HiiHandle, L"touch", Param);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_NF), gShellLevel3HiiHandle, L"touch", Param);
|
||||
continue;
|
||||
} else {
|
||||
//
|
||||
@@ -253,14 +253,14 @@ ShellCommandRunTouch (
|
||||
// make sure the file opened ok
|
||||
//
|
||||
if (EFI_ERROR(Node->Status)){
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel3HiiHandle, L"touch", Node->FileName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel3HiiHandle, L"touch", Node->FileName);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
continue;
|
||||
}
|
||||
|
||||
Status = DoTouchByHandle(Node->FullName, NULL, Node->Handle, ShellCommandLineGetFlag(Package, L"-r"));
|
||||
if (EFI_ERROR(Status) && Status != EFI_ACCESS_DENIED) {
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel3HiiHandle, L"touch", Node->FileName);
|
||||
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_FILE_OPEN_FAIL), gShellLevel3HiiHandle, L"touch", Node->FileName);
|
||||
ShellStatus = SHELL_NOT_FOUND;
|
||||
}
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user